This is a work in progress widget I'm working on in my spare time, as a learning exercise to write a custom node graph in PySide.
NodeGraphQt is node graph widget that can be implemented and repurposed into applications that supports PySide.
Zoom in/out : Right Mouse Click + Drag
or Mouse Scroll Up
/Mouse Scroll Down
Pan scene : Middle Mouse Click + Drag
or Alt + Left Mouse Click + Drag
Fit to screen : F
Select all nodes : Ctrl + A
Delete selected node(s) : Backspace
or Delete
Copy node(s): Ctrl + C
(copy to clipboard)
Paste node(s): Ctrl + V
(paste from clipboard)
Duplicate node(s) : Alt + C
Save node layout : Ctrl + S
Open node layout : Ctrl + O
undo action: Ctrl+z
or Command+z
(OSX)
Redo action: Ctrl+Shift+z
or Command+Shift+z
(OSX)
Toggle (enable/disable) node: d
Show node search: Tab
Create node from selected: enter
from NodeGraphQt import NodeGraphWidget, Node
# create a node object
class MyNode(Node):
"""example test node."""
NODE_NAME = 'Test Node'
def __init__(self):
super(MyNode, self).__init__()
self.add_input('foo')
self.add_output('bar')
# create a node
my_node = MyNode()
# create node graph.
graph = NodeGraphWidget()
# register node into the node graph.
graph.register_node(MyNode)
# add node to the node graph.
graph.add_node(my_node)
graph.show()