Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions NodeGraphQt/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

class MyNode(BaseNode):

__identifier__ = 'com.chantasticvfx'
__identifier__ = 'io.github.jchanvfx'
NODE_NAME = 'My Node'

def __init__(self):
Expand All @@ -33,8 +33,8 @@ def __init__(self):
graph.register_node(BackdropNode)

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')
node_a = graph.create_node('io.github.jchanvfx.MyNode', name='Node A')
node_b = graph.create_node('io.github.jchanvfx.MyNode', name='Node B', color='#5b162f')

node_a.set_input(0, node_b.output(0))

Expand Down
2 changes: 1 addition & 1 deletion NodeGraphQt/base/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ def to_dict(self):
'color': (48, 58, 69, 255),
'border_color': (85, 100, 100, 255),
'text_color': (255, 255, 255, 180),
'type_': 'com.chantasticvfx.FooNode',
'type_': 'io.github.jchanvfx.FooNode',
'selected': False,
'disabled': False,
'visible': True,
Expand Down
4 changes: 2 additions & 2 deletions NodeGraphQt/base/node.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def __init__(self, qgraphics_item=None):

"""

# Unique node identifier domain. `eg.` ``"com.chantacticvfx"``
# Unique node identifier domain. `eg.` ``"io.github.jchanvfx"``
__identifier__ = 'nodeGraphQt.nodes'

# Base node name.
Expand Down Expand Up @@ -192,7 +192,7 @@ def serialize(self):
'color': (48, 58, 69, 255),
'border_color': (85, 100, 100, 255),
'text_color': (255, 255, 255, 180),
'type': 'com.chantasticvfx.MyNode',
'type': 'io.github.jchanvfx.MyNode',
'selected': False,
'disabled': False,
'visible': True,
Expand Down
14 changes: 7 additions & 7 deletions docs/examples/ex_menu.rst
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ Adding to the Nodes Menu
Aside from the main context menu, the NodeGraph also has a nodes menu where you
can override context menus on a per node type basis.

| Below is an example for overriding a context menu for the node type ``"com.chantasticvfx.FooNode"``
| Below is an example for overriding a context menu for the node type ``"io.github.jchanvfx.FooNode"``

.. code-block:: python
:linenos:
Expand All @@ -67,7 +67,7 @@ can override context menus on a per node type basis.
# define a couple example nodes.
class FooNode(BaseNode):

__identifier__ = 'com.chantasticvfx'
__identifier__ = 'io.github.jchanvfx'
NODE_NAME = 'foo node'

def __init__(self):
Expand All @@ -94,14 +94,14 @@ can override context menus on a per node type basis.
# get the nodes menu.
nodes_menu = node_graph.get_context_menu('nodes')

# here we add override the context menu for "com.chantasticvfx.FooNode".
# here we add override the context menu for "io.github.jchanvfx.FooNode".
nodes_menu.add_command('Test',
func=test_func,
node_type='com.chantasticvfx.FooNode')
node_type='io.github.jchanvfx.FooNode')

# create some nodes.
foo_node = graph.create_node('com.chantasticvfx.FooNode')
bar_node = graph.create_node('com.chantasticvfx.BarNode', pos=[300, 100])
foo_node = graph.create_node('io.github.jchanvfx.FooNode')
bar_node = graph.create_node('io.github.jchanvfx', pos=[300, 100])

# show widget.
node_graph.widget.show()
node_graph.widget.show()
14 changes: 7 additions & 7 deletions docs/examples/ex_node.rst
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Creating Nodes

class MyNode(BaseNode):

__identifier__ = 'com.chantasticvfx'
__identifier__ = 'io.github.jchanvfx'
NODE_NAME = 'my node'

def __init__(self):
Expand All @@ -34,8 +34,8 @@ Creating Nodes
node_graph.widget.show()

# here we create a couple nodes in the node graph.
node_a = node_graph.create_node('com.chantasticvfx.MyNode', name='node a')
node_b = node_graph.create_node('com.chantasticvfx.MyNode', name='node b', pos=[300, 100])
node_a = node_graph.create_node('io.github.jchanvfx.MyNode', name='node a')
node_b = node_graph.create_node('io.github.jchanvfx.MyNode', name='node b', pos=[300, 100])

app.exec_()

Expand All @@ -53,7 +53,7 @@ example to simply embed a ``QComboBox`` widget when reimplementing the ``BaseNod

class MyListNode(BaseNode):

__identifier__ = 'com.chantasticvfx'
__identifier__ = 'io.github.jchanvfx'
NODE_NAME = 'node'

def __init__(self):
Expand Down Expand Up @@ -174,7 +174,7 @@ Here's an example to embed a custom widget where we subclass the
"""

# set a unique node identifier.
__identifier__ = 'com.chantasticvfx'
__identifier__ = 'io.github.jchanvfx'

# set the initial default node name.
NODE_NAME = 'my node'
Expand Down Expand Up @@ -246,7 +246,7 @@ Here's an example where we subclass the ``NodeGraph`` and connect it up to a

class MyNode(BaseNode):

__identifier__ = 'com.chantasticvfx'
__identifier__ = 'io.github.jchanvfx'
NODE_NAME = 'my node'

def __init__(self):
Expand Down Expand Up @@ -283,7 +283,7 @@ Here's an example where we subclass the ``NodeGraph`` and connect it up to a
node_graph.register_node(MyNode)
node_graph.widget.show()

node_a = node_graph.create_node('com.chantasticvfx.MyNode')
node_a = node_graph.create_node('io.github.jchanvfx.MyNode')

app.exec_()

Expand Down
13 changes: 5 additions & 8 deletions docs/examples/ex_overview.rst
Original file line number Diff line number Diff line change
Expand Up @@ -65,14 +65,14 @@ Here's a basic example snippet for creating two nodes and connecting them togeth
import sys

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


# create a node class object inherited from BaseNode.
class FooNode(BaseNode):

# unique node identifier domain.
__identifier__ = 'com.chantasticvfx'
__identifier__ = 'io.github.jchanvfx'

# initial default node name.
NODE_NAME = 'Foo Node'
Expand All @@ -93,9 +93,6 @@ Here's a basic example snippet for creating two nodes and connecting them togeth
# create node graph controller.
graph = NodeGraph()

# set up default menu and commands.
setup_context_menu(graph)

# register the FooNode node class.
graph.register_node(FooNode)

Expand All @@ -104,8 +101,8 @@ Here's a basic example snippet for creating two nodes and connecting them togeth
graph_widget.show()

# create two nodes.
node_a = graph.create_node('com.chantasticvfx.FooNode', name='node A')
node_b = graph.create_node('com.chantasticvfx.FooNode', name='node B', pos=(300, 50))
node_a = graph.create_node('io.github.jchanvfx.FooNode', name='node A')
node_b = graph.create_node('io.github.jchanvfx.FooNode', name='node B', pos=(300, 50))

# connect node_a to node_b
node_a.set_output(0, node_b.input(2))
Expand All @@ -115,4 +112,4 @@ Here's a basic example snippet for creating two nodes and connecting them togeth
result:

.. image:: ../_images/example_result.png
:width: 60%
:width: 60%