Merge pull request #573 from pypeclub/feature/maya-add-look-assigner

Maya: add look assigner to pype menu even if scriptsmenu is not available
This commit is contained in:
Milan Kolar 2020-10-02 14:42:47 +02:00 committed by GitHub
commit 932bc19659
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -32,8 +32,19 @@ def deferred():
command=lambda *args: BuildWorkfile().process()
)
def add_look_assigner_item():
import mayalookassigner
cmds.menuItem(
"Look assigner",
parent=pipeline._menu,
command=lambda *args: mayalookassigner.show()
)
log.info("Attempting to install scripts menu..")
add_build_workfiles_item()
add_look_assigner_item()
try:
import scriptsmenu.launchformaya as launchformaya
import scriptsmenu.scriptsmenu as scriptsmenu
@ -42,7 +53,6 @@ def deferred():
"Skipping studio.menu install, because "
"'scriptsmenu' module seems unavailable."
)
add_build_workfiles_item()
return
# load configuration of custom menu