fix features for gizmo menu

This commit is contained in:
Thomas Fricard 2023-01-04 18:22:48 +01:00
parent 8b1b09b338
commit f47b52aea7
2 changed files with 13 additions and 2 deletions

View file

@ -53,12 +53,18 @@ class GizmoMenu():
item_type = item.get("sourcetype")
if item_type == ("python" or "file"):
if item_type == "python":
parent.addCommand(
item["title"],
command=str(item["command"]),
icon=item.get("icon"),
shortcut=item.get("hotkey")
shortcut=item.get("shortcut")
)
elif item_type == "file":
parent.addCommand(
item['title'],
"nuke.createNode('{}')".format(item.get('file_name')),
shortcut=item.get('shortcut')
)
# add separator

View file

@ -72,6 +72,11 @@
"key": "command",
"label": "Python command"
},
{
"type": "text",
"key": "icon",
"label": "Icon Path"
},
{
"type": "text",
"key": "shortcut",