mirror of
https://github.com/ynput/ayon-core.git
synced 2026-01-01 16:34:53 +01:00
fix features for gizmo menu
This commit is contained in:
parent
8b1b09b338
commit
f47b52aea7
2 changed files with 13 additions and 2 deletions
|
|
@ -53,12 +53,18 @@ class GizmoMenu():
|
||||||
|
|
||||||
item_type = item.get("sourcetype")
|
item_type = item.get("sourcetype")
|
||||||
|
|
||||||
if item_type == ("python" or "file"):
|
if item_type == "python":
|
||||||
parent.addCommand(
|
parent.addCommand(
|
||||||
item["title"],
|
item["title"],
|
||||||
command=str(item["command"]),
|
command=str(item["command"]),
|
||||||
icon=item.get("icon"),
|
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
|
# add separator
|
||||||
|
|
|
||||||
|
|
@ -72,6 +72,11 @@
|
||||||
"key": "command",
|
"key": "command",
|
||||||
"label": "Python command"
|
"label": "Python command"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"type": "text",
|
||||||
|
"key": "icon",
|
||||||
|
"label": "Icon Path"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"type": "text",
|
"type": "text",
|
||||||
"key": "shortcut",
|
"key": "shortcut",
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue