Code Monkey home page Code Monkey logo

nodegraphqt's Introduction

NodeGraph Widget

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.

screencap01

Navigation:

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

Shortcuts:

screencap02

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

Node Search

screencap03

Show node search: Tab
Create node from selected: enter

Example Snippet

example script

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()

nodegraphqt's People

Contributors

jchanvfx avatar

Watchers

Tung avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.