diff --git a/NodeGraphQt/__init__.py b/NodeGraphQt/__init__.py index 211da5f3..79d59fe5 100644 --- a/NodeGraphQt/__init__.py +++ b/NodeGraphQt/__init__.py @@ -17,7 +17,7 @@ class MyNode(BaseNode): - __identifier__ = 'com.chantasticvfx' + __identifier__ = 'io.github.jchanvfx' NODE_NAME = 'My Node' def __init__(self): @@ -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)) diff --git a/NodeGraphQt/base/model.py b/NodeGraphQt/base/model.py index a533b38e..88141e0b 100644 --- a/NodeGraphQt/base/model.py +++ b/NodeGraphQt/base/model.py @@ -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, diff --git a/NodeGraphQt/base/node.py b/NodeGraphQt/base/node.py index d7ab8ecb..183a5415 100644 --- a/NodeGraphQt/base/node.py +++ b/NodeGraphQt/base/node.py @@ -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. @@ -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, diff --git a/docs/examples/ex_menu.rst b/docs/examples/ex_menu.rst index 3f29e19e..d6f7341e 100644 --- a/docs/examples/ex_menu.rst +++ b/docs/examples/ex_menu.rst @@ -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: @@ -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): @@ -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() \ No newline at end of file + node_graph.widget.show() diff --git a/docs/examples/ex_node.rst b/docs/examples/ex_node.rst index 26f0a4f0..3787aa6e 100644 --- a/docs/examples/ex_node.rst +++ b/docs/examples/ex_node.rst @@ -16,7 +16,7 @@ Creating Nodes class MyNode(BaseNode): - __identifier__ = 'com.chantasticvfx' + __identifier__ = 'io.github.jchanvfx' NODE_NAME = 'my node' def __init__(self): @@ -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_() @@ -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): @@ -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' @@ -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): @@ -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_() diff --git a/docs/examples/ex_overview.rst b/docs/examples/ex_overview.rst index a0039fea..14bc269c 100644 --- a/docs/examples/ex_overview.rst +++ b/docs/examples/ex_overview.rst @@ -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' @@ -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) @@ -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)) @@ -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% \ No newline at end of file + :width: 60%