mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-24 21:04:40 +01:00
implement try except statement - ondrej's comment
This commit is contained in:
parent
b2921651ae
commit
4640f115de
1 changed files with 11 additions and 8 deletions
|
|
@ -75,14 +75,17 @@ def install(project_settings):
|
|||
|
||||
cmds.setParent("..", menu=True)
|
||||
|
||||
ayon_menu = project_settings["core"]["tools"].get("ayon_menu")
|
||||
if ayon_menu:
|
||||
if ayon_menu.get("version_up_current_workfile"):
|
||||
cmds.menuItem(divider=True)
|
||||
cmds.menuItem(
|
||||
"Version Up Workfile",
|
||||
command=lambda *args: version_up_current_workfile()
|
||||
)
|
||||
try:
|
||||
if project_settings["core"]["tools"]["ayon_menu"].get(
|
||||
"version_up_current_workfile"):
|
||||
cmds.menuItem(divider=True)
|
||||
cmds.menuItem(
|
||||
"Version Up Workfile",
|
||||
command=lambda *args: version_up_current_workfile()
|
||||
)
|
||||
except KeyError:
|
||||
print("Version Up Workfile setting not found in "
|
||||
"Core Settings. Please update Core Addon")
|
||||
|
||||
cmds.menuItem(divider=True)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue