GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - mfessenden/SceneGraph: PySide scene graph UI framework.

BranchesTags
Open more actions menu

Latest commit

 

History

204 Commits
204 Commits

Folders and files

NameName
Last commit message
Last commit date
bin
bin
 
 
cfg
cfg
 
 
core
core
 
 
data
data
 
 
doc
doc
 
 
icn
icn
 
 
mtd
mtd
 
 
plugins
plugins
 
 
qss
qss
 
 
test
test
 
 
ui
ui
 
 
util
util
 
 
README.md
README.md
 
 
__init__.py
__init__.py
 
 
options.py
options.py
 
 
scenegraph.py
scenegraph.py
 
 
scenegraph_maya.py
scenegraph_maya.py
 
 
scenegraph_nuke.py
scenegraph_nuke.py
 
 

Repository files navigation

SceneGraph

Alt text

SceneGraph is a fast & flexible framework for visualizing node graphs in visual effects CC applications using PySide. Scenes can be saved and loaded in a variety of environments, and users can easily extend the toolset to include their own node types.

Requirements

  • PySide
  • NetworkX 1.9.1
  • simplejson

Installation

Clone the repository and ensure that the directory is included on your PYTHONPATH:

git clone [email protected]:mfessenden/SceneGraph.git

For Linux/macOS, symlink the launcher bin/SceneGraph somewhere on your PATH. For Windows, symlink bin/SceneGraph.bat.

Usage

To launch the UI via the command line (Linux/macOS), simply call:

$ SceneGraph

(For Windows, double-click the SceneGraph.bat shortcut).

SceneGraph API

from SceneGraph import scenegraph

# show the UI
sgui = scenegraph.SceneGraphUI()
sgui.show()

# access the node graph instance
graph = sgui.graph

# list all node names
node_names = graph.node_names()

# query all of the node widgets from the `GraphicsScene`
scene = sgui.view.scene()
nodes = scene.nodes()

# query all of the current DAG nodes
dags = graph.nodes()

# return a named DAG node
dagnode = graph.get_node('node1')

# query node attributes
dagnode.getNodeAttributes()

# set arbitrary attributes
dagnode.setNodeAttributes(env='maya', version='2014')

# querying widgets

# get an output connection widget
c_output=n1.get_connection('output')

# query an edge
e1=scene.get_edge('node1.output', 'node2.input')[0]

# get edge source item (Connection)
e1.source_item

# get connected nodes from an edge
e1.listConnections()

Maya Usage

from SceneGraph import scenegraph_maya
scenegraph_maya.main()

Nuke Usage

from SceneGraph import scenegraph_nuke
scenegraph_nuke.main()

API

# create a graph
from SceneGraph import core
g = core.Graph()

# query the currently loaded node types
node_types = g.node_types()

# add some default nodes
n1 = g.add_node('default', name='node1')
n2 = g.add_node('default', name='node2')

# query node connections
if n1.is_input_connection:
    conn = n1.output_connections()

# add a new input and output attribute
n1.add_input(name='fileIn')

# connect the nodes (default output/inputs assumed)
e1 = g.add_edge(n1, n2)

# connect two nodes via a connection string
e1 = g.connect('node1.output', 'node2.input')

# write the current graph to disk
g.write('~/graphs/my_graph.json')

# dump all nodes in the graph
print g.nodes()

# dump all node names
print g.node_names()

# dump all connections
print g.connections()

# updating attributes
d1 = g.add_node('default')
m1 = g.add_node('merge')

# connect two nodes via a named attribute
g.add_edge(d1, m1, dest_attr='inputA')

# change the input name
m1.rename_connection('inputA', 'newInput')

# add attributes to a dag node & flag it as an input connection
attr = n1.addAttr('env', value='maya', input=True)

# set an attribute value via the node
n1.env = 'nuke'

# set an attribute value via the attribute instance
attr.value = 'houdini'

About

PySide scene graph UI framework.

Topics

mayanukepyside

Resources

Readme
Activity

Stars

171 stars

Watchers

15 watching

Forks

33 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.