Giter VIP home page Giter VIP logo

nodegraphqt's Introduction

NodeGraphQt

License: MIT python 3.7+ PEP8 stability-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

action controls
Zoom in/out Alt + MMB Drag or Mouse Scroll Up/Down
Pan Alt + LMB Drag or MMB Drag
Node search Tab

Slice Connections

action controls
Slice Connections Shift + Alt + LMB Drag

Properties Bin

Vertical Layout

Example

import sys

from NodeGraphQt import QtWidgets
from NodeGraphQt import NodeGraph, BaseNode, BackdropNode, setup_context_menu

# create a example node object with a input/output port.
class MyNode(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.widget
    graph_widget.show()

    app.exec_()

nodegraphqt's People

Contributors

ahmedhussein89 avatar arnochenfx avatar bigroy avatar cesioarg avatar davidlatwe avatar jchanvfx avatar jdpatt avatar nallath avatar ray-barrett avatar riggitlikeyoudiggit avatar thimic 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.