add build workfile in menu

This commit is contained in:
Thomas Fricard 2022-05-25 14:28:28 +02:00
parent a5a3685f2b
commit f2ae0ffa59

View file

@ -6,7 +6,13 @@ from Qt import QtWidgets, QtGui
import maya.utils
import maya.cmds as cmds
from openpype.api import BuildWorkfile
from openpype.api import (
BuildWorkfile,
# build_workfile_template
# update_workfile_template
)
from openpype.lib.build_template import build_workfile_template, update_workfile_template
from openpype.settings import get_project_settings
from openpype.pipeline import legacy_io
from openpype.tools.utils import host_tools
@ -158,6 +164,16 @@ def install():
parent=builder_menu,
command=lambda *args: update_placeholder()
)
cmds.menuItem(
"Build Workfile from template",
parent=builder_menu,
command=lambda *args: build_workfile_template()
)
cmds.menuItem(
"Update Workfile from template",
parent=builder_menu,
command=lambda *args: update_workfile_template()
)
cmds.setParent(MENU_NAME, menu=True)