diff --git a/docs/examples/ex_menu.rst b/docs/examples/ex_menu.rst index 8af3d8ef..3f29e19e 100644 --- a/docs/examples/ex_menu.rst +++ b/docs/examples/ex_menu.rst @@ -1,18 +1,26 @@ Menu Overview ############# -Examples for customizing context menus in NodeGraphQt. +.. currentmodule:: NodeGraphQt + +| Examples for customizing context menus in NodeGraphQt. Default Context Menu ******************** -The ``NodeGraphQt.NodeGraph`` has a default context menu with a few essential -menu commands built when initialized it can be accessed with the -:meth:`NodeGraph.context_menu` function. +The ``NodeGraphQt.NodeGraph`` has a context menu can be accessed with +:meth:`NodeGraph.context_menu`. + + +It can also be populated it with a config file in ``JSON`` format by using +:meth:`NodeGraph.set_context_menu_from_file`. .. image:: ../_images/menu_hotkeys.png :width: 300px +| Here's a link to the example config file with a few essential menu commands. +| https://github.com/jchanvfx/NodeGraphQt/blob/master/examples/hotkeys/hotkeys.json + Adding to the Graph Menu ************************ @@ -49,7 +57,7 @@ Adding to the Nodes Menu Aside from the main context menu, the NodeGraph also has a nodes menu where you can override context menus on a per node type basis. -Below is an example for overriding a context menu for the node type ``"com.chantasticvfx.FooNode"`` +| Below is an example for overriding a context menu for the node type ``"com.chantasticvfx.FooNode"`` .. code-block:: python :linenos: diff --git a/docs/menu.rst b/docs/menu.rst index c27afaa2..4776cf9d 100644 --- a/docs/menu.rst +++ b/docs/menu.rst @@ -3,10 +3,16 @@ Menus .. currentmodule:: NodeGraphQt +.. seealso:: + + Context menus can also be set from a config file or a dictionary with: + :meth:`NodeGraph.set_context_menu_from_file`, :meth:`NodeGraph.set_context_menu` + + Graph Menu ********** -The context menu triggered from the node graph. +| The context menu triggered from the node graph. .. autoclass:: NodeGraphMenu :members: @@ -16,7 +22,7 @@ The context menu triggered from the node graph. Nodes Menu ********** -The context menu triggered from a node. +| The context menu triggered from a node. .. autoclass:: NodesMenu :members: