This is a work in progress widget I'm working on in my spare time, as a learning exercise on how to write a custom node graph in PySide.
NodeGraphQt
is node graph widget that can be implemented and repurposed into vfx 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 node (enable/disable): d
from NodeGraphQt.interfaces import NodeGraphWidget, Node
# define a node object
class MyNode(Node):
"""This is a example test node."""
NODE_TYPE = 'MyNode'
def __init__(self):
super(MyNode, self).__init__()
self.set_name('foo node')
self.set_color(81, 54, 88)
self.add_input('in')
self.add_output('out')
# create a node
my_node = MyNode()
# create node graph.
graph = NodeGraphWidget()
# add node to the node graph.
graph.add_node(my_node)
graph.show()