Skip to content

Repository files navigation

NodeGraphQt

License: MITpython 3.7+PEP8stability-wip

(Note: this project is a work in progress and not production ready.)


NodeGraphQt is a node graph framework that can be implemented and re purposed into applications that supports PySide2.

Documentation

NodeGraphQt Documentation

Navigation

actioncontrols
Zoom in/outAlt + MMB Drag or Mouse Scroll Up/Down
PanAlt + LMB Drag or MMB Drag
Node searchTab

Slice Connections

actioncontrols
Slice ConnectionsShift + Alt + LMB Drag

Properties Bin

Vertical Layout

Pipe Layout

Example

importsysfromNodeGraphQtimportQtWidgetsfromNodeGraphQtimportNodeGraph, BaseNode, BackdropNode, setup_context_menu# create a example node object with a input/output port.classMyNode(BaseNode):
"""example test node."""# unique node identifier domain. ("com.chantasticvfx.MyNode")__identifier__='com.chantasticvfx'# initial default node name.NODE_NAME='My Node'def__init__(self):
super(MyNode, self).__init__()
self.add_input('foo', color=(180, 80, 0))
self.add_output('bar')
if__name__=='__main__':
app=QtWidgets.QApplication(sys.argv)
# create the node graph controller.graph=NodeGraph()
# set up default menu and commands.setup_context_menu(graph)
# register backdrop node. (included in the NodeGraphQt module)graph.register_node(BackdropNode)
# register example node into the node graph.graph.register_node(MyNode)
# create nodes.backdrop=graph.create_node('nodeGraphQt.nodes.Backdrop', name='Backdrop')
node_a=graph.create_node('com.chantasticvfx.MyNode', name='Node A')
node_b=graph.create_node('com.chantasticvfx.MyNode', name='Node B', color='#5b162f')
# connect node a input to node b output.node_a.set_input(0, node_b.output(0)) # get the widget and show.graph_widget=graph.widgetgraph_widget.show()
app.exec_()

About

Node graph framework that can be re-implemented into applications that supports PySide2

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages