mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-24 21:04:40 +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")
|
||||
|
||||
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
|
||||
|
|
|
|||
|
|
@ -72,6 +72,11 @@
|
|||
"key": "command",
|
||||
"label": "Python command"
|
||||
},
|
||||
{
|
||||
"type": "text",
|
||||
"key": "icon",
|
||||
"label": "Icon Path"
|
||||
},
|
||||
{
|
||||
"type": "text",
|
||||
"key": "shortcut",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue