I'm trying to set nodes context menus using a .json.
I found that there is a kwarg in NodeGraph.set_context_menu_from_file to make this happen: menu='nodes'
But using it, I get the following error:
File "E:\WORK\CODING\packages\nomad\examples\basic_example.py", line 28, in <module>
graph.set_context_menu_from_file('../nomad/hotkeys/hotkeys.json', menu='nodes')
File "C:\Users\Gaspounet\AppData\Roaming\Python\Python37\site-packages\NodeGraphQt\base\graph.py", line 883, in set_context_menu_from_file
self._deserialize_context_menu(context_menu, data)
File "C:\Users\Gaspounet\AppData\Roaming\Python\Python37\site-packages\NodeGraphQt\base\graph.py", line 817, in _deserialize_context_menu
self._deserialize_context_menu(menu, item_data)
File "C:\Users\Gaspounet\AppData\Roaming\Python\Python37\site-packages\NodeGraphQt\base\graph.py", line 810, in _deserialize_context_menu
build_menu_command(menu, menu_data)
File "C:\Users\Gaspounet\AppData\Roaming\Python\Python37\site-packages\NodeGraphQt\base\graph.py", line 803, in build_menu_command
menu.add_command(name=cmd_name, **cmd_kwargs)
TypeError: add_command() got an unexpected keyword argument 'shortcut'
When I remove the menu='nodes', it works fine on the graph menu.
Here's the command I use:
graph.set_context_menu_from_file('../nomad/nodes/hotkeys.json', menu='nodes')
Hello!
I'm trying to set nodes context menus using a .json. I found that there is a kwarg in NodeGraph.set_context_menu_from_file to make this happen: menu='nodes' But using it, I get the following error:
When I remove the menu='nodes', it works fine on the graph menu.
Here's the command I use:
graph.set_context_menu_from_file('../nomad/nodes/hotkeys.json', menu='nodes')
Here's my hotkeys.json:
Here's my hotkey_functions.py: