Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions NodeGraphQt/base/graph.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@ class NodeGraph(QtCore.QObject):
The ``NodeGraph`` class is the main controller for managing all nodes
and the node graph.

Inherited from: :class:`PySide2.QtCore.QObject`
.. inheritance-diagram:: NodeGraphQt.NodeGraph
:top-classes: PySide2.QtCore.QObject

.. image:: _images/graph.png
:width: 60%
Expand Down Expand Up @@ -2226,7 +2227,8 @@ class SubGraph(NodeGraph):
The ``SubGraph`` class is just like the ``NodeGraph`` but is the main
controller for managing the expanded node graph for a group node.

Inherited from: :class:`NodeGraphQt.NodeGraph`
.. inheritance-diagram:: NodeGraphQt.SubGraph
:top-classes: PySide2.QtCore.QObject

.. image:: _images/sub_graph.png
:width: 70%
Expand Down
4 changes: 1 addition & 3 deletions NodeGraphQt/base/node.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,7 @@ class NodeObject(object):
The ``NodeGraphQt.NodeObject`` class is the main base class that all
nodes inherit from.

**Inherited by:**
:class:`NodeGraphQt.BaseNode`,
:class:`NodeGraphQt.BackdropNode`
.. inheritance-diagram:: NodeGraphQt.NodeObject

Args:
qgraphics_item (AbstractNodeItem): QGraphicsItem item used for drawing.
Expand Down
2 changes: 2 additions & 0 deletions NodeGraphQt/base/port.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ class Port(object):
"""
The ``Port`` class is used for connecting one node to another.

.. inheritance-diagram:: NodeGraphQt.Port

.. image:: ../_images/port.png
:width: 50%

Expand Down
3 changes: 3 additions & 0 deletions NodeGraphQt/custom_widgets/nodes_palette.py
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,9 @@ class NodesPaletteWidget(QtWidgets.QWidget):

| *Implemented on NodeGraphQt:* ``v0.1.7``

.. inheritance-diagram:: NodeGraphQt.NodesPaletteWidget
:parts: 1

.. image:: _images/nodes_palette.png
:width: 400px

Expand Down
4 changes: 4 additions & 0 deletions NodeGraphQt/custom_widgets/nodes_tree.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ class NodesTreeWidget(QtWidgets.QTreeWidget):
registered nodes from the node graph with this widget a user can create
nodes by dragging and dropping.

.. inheritance-diagram:: NodeGraphQt.NodesTreeWidget
:parts: 1
:top-classes: PySide2.QtWidgets.QWidget

.. image:: _images/nodes_tree.png
:width: 300px

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -331,6 +331,9 @@ class PropertiesBinWidget(QtWidgets.QWidget):
The :class:`NodeGraphQt.PropertiesBinWidget` is a list widget for displaying
and editing a nodes properties.

.. inheritance-diagram:: NodeGraphQt.PropertiesBinWidget
:parts: 1

.. image:: _images/prop_bin.png
:width: 950px

Expand Down
2 changes: 1 addition & 1 deletion NodeGraphQt/nodes/backdrop_node.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ class BackdropNode(NodeObject):
The ``NodeGraphQt.BackdropNode`` class allows other node object to be
nested inside, it's mainly good for grouping nodes together.

**Inherited from:** :class:`NodeGraphQt.NodeObject`
.. inheritance-diagram:: NodeGraphQt.BackdropNode

.. image:: ../_images/backdrop.png
:width: 250px
Expand Down
2 changes: 1 addition & 1 deletion NodeGraphQt/nodes/base_node.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class BaseNode(NodeObject):
The ``NodeGraphQt.BaseNode`` class is the base class for nodes that allows
port connections from one node to another.

**Inherited from:** :class:`NodeGraphQt.NodeObject`
.. inheritance-diagram:: NodeGraphQt.BaseNode

.. image:: ../_images/node.png
:width: 250px
Expand Down
2 changes: 1 addition & 1 deletion NodeGraphQt/nodes/base_node_circle.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ class BaseNodeCircle(BaseNode):
The ``NodeGraphQt.BaseNodeCircle`` is pretty much the same class as the
:class:`NodeGraphQt.BaseNode` except with a different design.

**Inherited from:** :class:`NodeGraphQt.BaseNode`
.. inheritance-diagram:: NodeGraphQt.BaseNodeCircle

.. image:: ../_images/node_circle.png
:width: 250px
Expand Down
2 changes: 1 addition & 1 deletion NodeGraphQt/nodes/group_node.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class GroupNode(BaseNode):
The ``NodeGraphQt.GroupNode`` class extends from the :class:``NodeGraphQt.BaseNode``
class with the ability to nest other nodes inside of it.

**Inherited from:** :class:`NodeGraphQt.BaseNode`
.. inheritance-diagram:: NodeGraphQt.GroupNode

.. image:: ../_images/group_node.png
:width: 250px
Expand Down
6 changes: 4 additions & 2 deletions NodeGraphQt/nodes/port_node.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ class PortInputNode(BaseNode):
:class:`NodeGraphQt.GroupNode` when expanded in a
:class:`NodeGraphQt.SubGraph`.

**Inherited from:** :class:`NodeGraphQt.BaseNode`
.. inheritance-diagram:: NodeGraphQt.nodes.port_node.PortInputNode
:parts: 1

.. image:: ../_images/port_in_node.png
:width: 150px
Expand Down Expand Up @@ -68,7 +69,8 @@ class PortOutputNode(BaseNode):
from a :class:`NodeGraphQt.GroupNode` when expanded in a
:class:`NodeGraphQt.SubGraph`.

**Inherited from:** :class:`NodeGraphQt.BaseNode`
.. inheritance-diagram:: NodeGraphQt.nodes.port_node.PortOutputNode
:parts: 1

.. image:: ../_images/port_out_node.png
:width: 150px
Expand Down
12 changes: 9 additions & 3 deletions NodeGraphQt/widgets/node_widgets.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,9 @@ class NodeBaseWidget(QtWidgets.QGraphicsProxyWidget):
This is the main wrapper class that allows a ``QtWidgets.QWidget`` to be
added in a :class:`NodeGraphQt.BaseNode` object.

.. inheritance-diagram:: NodeGraphQt.NodeBaseWidget
:parts: 1

Args:
parent (NodeGraphQt.BaseNode.view): parent node view.
name (str): property name for the parent node.
Expand Down Expand Up @@ -245,7 +248,8 @@ class NodeComboBox(NodeBaseWidget):
"""
Displays as a ``QComboBox`` in a node.

**Inherited from:** :class:`NodeBaseWidget`
.. inheritance-diagram:: NodeGraphQt.widgets.node_widgets.NodeComboBox
:parts: 1

.. note::
`To embed a` ``QComboBox`` `in a node see func:`
Expand Down Expand Up @@ -314,7 +318,8 @@ class NodeLineEdit(NodeBaseWidget):
"""
Displays as a ``QLineEdit`` in a node.

**Inherited from:** :class:`NodeBaseWidget`
.. inheritance-diagram:: NodeGraphQt.widgets.node_widgets.NodeLineEdit
:parts: 1

.. note::
`To embed a` ``QLineEdit`` `in a node see func:`
Expand Down Expand Up @@ -383,7 +388,8 @@ class NodeCheckBox(NodeBaseWidget):
"""
Displays as a ``QCheckBox`` in a node.

**Inherited from:** :class:`NodeBaseWidget`
.. inheritance-diagram:: NodeGraphQt.widgets.node_widgets.NodeCheckBox
:parts: 1

.. note::
`To embed a` ``QCheckBox`` `in a node see func:`
Expand Down
13 changes: 13 additions & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
'sphinx.ext.autosectionlabel',
'sphinx.ext.autosummary',
'sphinx.ext.coverage',
'sphinx.ext.inheritance_diagram',
'sphinx.ext.intersphinx',
'sphinx.ext.napoleon',
]
Expand All @@ -56,6 +57,18 @@
'PySide2': ('https://doc.qt.io/qtforpython/', None),
}

# inheritance diagram remapping.
inheritance_alias = {
'NodeGraphQt.base.graph.NodeGraph': 'NodeGraphQt.NodeGraph',
'NodeGraphQt.base.graph.SubGraph': 'NodeGraphQt.SubGraph',
'NodeGraphQt.base.node.NodeObject': 'NodeGraphQt.NodeObject',
'NodeGraphQt.base.port.Port': 'NodeGraphQt.Port',
'NodeGraphQt.nodes.backdrop_node.BackdropNode': 'NodeGraphQt.BackdropNode',
'NodeGraphQt.nodes.base_node.BaseNode': 'NodeGraphQt.BaseNode',
'NodeGraphQt.nodes.base_node_circle.BaseNodeCircle': 'NodeGraphQt.BaseNodeCircle',
'NodeGraphQt.nodes.group_node.GroupNode': 'NodeGraphQt.GroupNode',
}

# order of members.
autodoc_member_order = 'groupwise'

Expand Down
4 changes: 4 additions & 0 deletions docs/examples/ex_overview.rst
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,10 @@ Connection pipes can be disconnected easily with the built in slice tool.
| Slice connections | *Alt + Shift + LMB + Drag* |
+---------------------+----------------------------+

Additional Info:
To disable or enable the pipe slicer see
:meth:`NodeGraphQt.NodeGraph.set_pipe_slicing`


Getting Started
***************
Expand Down
4 changes: 2 additions & 2 deletions docs/examples/ex_port.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ Creating Custom Shapes

(*Implemented on* ``v0.1.1``)

To have custom port shapes the :meth:`BaseNode.add_input` and
:meth:`BaseNode.add_output` functions now have a ``painter_func``
To have custom port shapes the :meth:`NodeGraphQt.BaseNode.add_input` and
:meth:`NodeGraphQt.BaseNode.add_output` functions now have a ``painter_func``
argument where you specify you custom port painter function.

.. image:: ../_images/custom_ports.png
Expand Down
4 changes: 2 additions & 2 deletions docs/host_apps/ex_app_nuke.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ Creating a node graph widget in Nuke.
.. image:: ../_images/app_nuke_example.png
:width: 800px

| Here is an example where the :attr:`NodeGraph.widget` can be registered as a
panel in the compositing application NUKE.
| Here is an example where the :attr:`NodeGraphQt.NodeGraph.widget` can be
registered as a panel in the compositing application NUKE.

.. code-block:: python
:linenos:
Expand Down
4 changes: 2 additions & 2 deletions docs/host_apps/ex_app_silhouette.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ Creating a node graph widget in Silhouette FX.
.. image:: ../_images/app_silhouette_example.png
:width: 800px

| Here is an example where the :attr:`NodeGraph.widget` can be registered as a
dockable panel in the application .
| Here is an example where the :attr:`NodeGraphQt.NodeGraph.widget` can be
registered as a dockable panel in the application .

.. code-block:: python
:linenos:
Expand Down
1 change: 1 addition & 0 deletions docs/nodes/PortNode.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ PortNode
Port node are the nodes in a expanded :class:`NodeGraphQt.SubGraph` that
represent the ports from the parent :class:`NodeGraphQt.GroupNode` object.


PortInputNode
=============

Expand Down