@@ -27,7 +27,10 @@ def __get__(self, instance, owner):
2727
2828class NodeObject (object ):
2929 """
30- base class for all node objects.
30+ The ``NodeGraphQt.NodeObject`` class is the main base class that all
31+ nodes inherit from.
32+
33+ **Inherited by:** :class:`NodeGraphQt.BaseNode`, :class:`NodeGraphQt.BackdropNode`
3134
3235 Args:
3336 qgraphics_item (AbstractNodeItem): graphic item used for drawing.
@@ -78,7 +81,7 @@ def id(self):
7881 @property
7982 def graph (self ):
8083 """
81- The parent node graph controller .
84+ The parent node graph.
8285
8386 Returns:
8487 NodeGraphQt.NodeGraph: node graph.
@@ -366,7 +369,37 @@ def pos(self):
366369
367370class BaseNode (NodeObject ):
368371 """
369- base class of a typical Node with input and output ports.
372+ The ``NodeGraphQt.BaseNode`` class is the base class for nodes that allows
373+ port connections from one node to another.
374+
375+ **Inherited from:** :class:`NodeGraphQt.NodeObject`
376+
377+ .. image:: ../_images/node.png
378+ :width: 250px
379+
380+ example snippet:
381+
382+ .. code-block:: python
383+ :linenos:
384+
385+ from NodeGraphQt import BaseNode
386+
387+ class FooNode(BaseNode):
388+
389+ # unique node identifier domain.
390+ __identifier__ = 'com.chantasticvfx'
391+
392+ # initial default node name.
393+ NODE_NAME = 'Foo Node'
394+
395+ def __init__(self):
396+ super(FooNode, self).__init__()
397+
398+ # create an input port.
399+ self.add_input('in')
400+
401+ # create an output port.
402+ self.add_output('out')
370403 """
371404
372405 NODE_NAME = 'Base Node'
@@ -664,7 +697,13 @@ def on_input_disconnected(self, in_port, out_port):
664697
665698class BackdropNode (NodeObject ):
666699 """
667- base class of a Backdrop node.
700+ The ``NodeGraphQt.BackdropNode`` class allows other node object to be
701+ nested inside, it's mainly good for grouping nodes together.
702+
703+ **Inherited from:** :class:`NodeGraphQt.NodeObject`
704+
705+ .. image:: ../_images/backdrop.png
706+ :width: 250px
668707 """
669708
670709 NODE_NAME = 'Backdrop'
0 commit comments