Skip to content

Commit 0656246

Browse files
committed
doc update
1 parent e2ffc42 commit 0656246

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

NodeGraphQt/base/graph.py

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -772,7 +772,7 @@ def set_context_menu(self, menu_name, data):
772772
"""
773773
Populate a context menu from serialized data.
774774
775-
serialized menu data example:
775+
example of serialized menu data:
776776
777777
.. highlight:: python
778778
.. code-block:: python
@@ -795,6 +795,15 @@ def set_context_menu(self, menu_name, data):
795795
},
796796
]
797797
798+
the ``run_test`` example function:
799+
800+
.. highlight:: python
801+
.. code-block:: python
802+
803+
def run_test(graph):
804+
print(graph.selected_nodes())
805+
806+
798807
Args:
799808
menu_name (str): name of the parent context menu to populate under.
800809
data (dict): serialized menu data.
@@ -806,7 +815,8 @@ def set_context_menu_from_file(self, file_path, menu=None):
806815
"""
807816
Populate a context menu from a serialized json file.
808817
809-
Menu Types:
818+
menu types:
819+
810820
- ``"graph"`` context menu from the node graph.
811821
- ``"nodes"`` context menu for the nodes.
812822

0 commit comments

Comments
 (0)