Skip to content

Commit b2afccd

Browse files
committed
doc updates.
1 parent 723e4cf commit b2afccd

File tree

6 files changed

+25
-28
lines changed

6 files changed

+25
-28
lines changed

NodeGraphQt/__init__.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
1818
class MyNode(BaseNode):
1919
20-
__identifier__ = 'com.chantasticvfx'
20+
__identifier__ = 'io.github.jchanvfx'
2121
NODE_NAME = 'My Node'
2222
2323
def __init__(self):
@@ -33,8 +33,8 @@ def __init__(self):
3333
graph.register_node(BackdropNode)
3434
3535
backdrop = graph.create_node('nodeGraphQt.nodes.Backdrop', name='Backdrop')
36-
node_a = graph.create_node('com.chantasticvfx.MyNode', name='Node A')
37-
node_b = graph.create_node('com.chantasticvfx.MyNode', name='Node B', color='#5b162f')
36+
node_a = graph.create_node('io.github.jchanvfx.MyNode', name='Node A')
37+
node_b = graph.create_node('io.github.jchanvfx.MyNode', name='Node B', color='#5b162f')
3838
3939
node_a.set_input(0, node_b.output(0))
4040

NodeGraphQt/base/model.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,7 @@ def to_dict(self):
261261
'color': (48, 58, 69, 255),
262262
'border_color': (85, 100, 100, 255),
263263
'text_color': (255, 255, 255, 180),
264-
'type_': 'com.chantasticvfx.FooNode',
264+
'type_': 'io.github.jchanvfx.FooNode',
265265
'selected': False,
266266
'disabled': False,
267267
'visible': True,

NodeGraphQt/base/node.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ def __init__(self, qgraphics_item=None):
3737
3838
"""
3939

40-
# Unique node identifier domain. `eg.` ``"com.chantacticvfx"``
40+
# Unique node identifier domain. `eg.` ``"io.github.jchanvfx"``
4141
__identifier__ = 'nodeGraphQt.nodes'
4242

4343
# Base node name.
@@ -192,7 +192,7 @@ def serialize(self):
192192
'color': (48, 58, 69, 255),
193193
'border_color': (85, 100, 100, 255),
194194
'text_color': (255, 255, 255, 180),
195-
'type': 'com.chantasticvfx.MyNode',
195+
'type': 'io.github.jchanvfx.MyNode',
196196
'selected': False,
197197
'disabled': False,
198198
'visible': True,

docs/examples/ex_menu.rst

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ Adding to the Nodes Menu
5757
Aside from the main context menu, the NodeGraph also has a nodes menu where you
5858
can override context menus on a per node type basis.
5959

60-
| Below is an example for overriding a context menu for the node type ``"com.chantasticvfx.FooNode"``
60+
| Below is an example for overriding a context menu for the node type ``"io.github.jchanvfx.FooNode"``
6161
6262
.. code-block:: python
6363
:linenos:
@@ -67,7 +67,7 @@ can override context menus on a per node type basis.
6767
# define a couple example nodes.
6868
class FooNode(BaseNode):
6969
70-
__identifier__ = 'com.chantasticvfx'
70+
__identifier__ = 'io.github.jchanvfx'
7171
NODE_NAME = 'foo node'
7272
7373
def __init__(self):
@@ -94,14 +94,14 @@ can override context menus on a per node type basis.
9494
# get the nodes menu.
9595
nodes_menu = node_graph.get_context_menu('nodes')
9696
97-
# here we add override the context menu for "com.chantasticvfx.FooNode".
97+
# here we add override the context menu for "io.github.jchanvfx.FooNode".
9898
nodes_menu.add_command('Test',
9999
func=test_func,
100-
node_type='com.chantasticvfx.FooNode')
100+
node_type='io.github.jchanvfx.FooNode')
101101
102102
# create some nodes.
103-
foo_node = graph.create_node('com.chantasticvfx.FooNode')
104-
bar_node = graph.create_node('com.chantasticvfx.BarNode', pos=[300, 100])
103+
foo_node = graph.create_node('io.github.jchanvfx.FooNode')
104+
bar_node = graph.create_node('io.github.jchanvfx', pos=[300, 100])
105105
106106
# show widget.
107-
node_graph.widget.show()
107+
node_graph.widget.show()

docs/examples/ex_node.rst

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Creating Nodes
1616
1717
class MyNode(BaseNode):
1818
19-
__identifier__ = 'com.chantasticvfx'
19+
__identifier__ = 'io.github.jchanvfx'
2020
NODE_NAME = 'my node'
2121
2222
def __init__(self):
@@ -34,8 +34,8 @@ Creating Nodes
3434
node_graph.widget.show()
3535
3636
# here we create a couple nodes in the node graph.
37-
node_a = node_graph.create_node('com.chantasticvfx.MyNode', name='node a')
38-
node_b = node_graph.create_node('com.chantasticvfx.MyNode', name='node b', pos=[300, 100])
37+
node_a = node_graph.create_node('io.github.jchanvfx.MyNode', name='node a')
38+
node_b = node_graph.create_node('io.github.jchanvfx.MyNode', name='node b', pos=[300, 100])
3939
4040
app.exec_()
4141
@@ -53,7 +53,7 @@ example to simply embed a ``QComboBox`` widget when reimplementing the ``BaseNod
5353
5454
class MyListNode(BaseNode):
5555
56-
__identifier__ = 'com.chantasticvfx'
56+
__identifier__ = 'io.github.jchanvfx'
5757
NODE_NAME = 'node'
5858
5959
def __init__(self):
@@ -174,7 +174,7 @@ Here's an example to embed a custom widget where we subclass the
174174
"""
175175
176176
# set a unique node identifier.
177-
__identifier__ = 'com.chantasticvfx'
177+
__identifier__ = 'io.github.jchanvfx'
178178
179179
# set the initial default node name.
180180
NODE_NAME = 'my node'
@@ -246,7 +246,7 @@ Here's an example where we subclass the ``NodeGraph`` and connect it up to a
246246
247247
class MyNode(BaseNode):
248248
249-
__identifier__ = 'com.chantasticvfx'
249+
__identifier__ = 'io.github.jchanvfx'
250250
NODE_NAME = 'my node'
251251
252252
def __init__(self):
@@ -283,7 +283,7 @@ Here's an example where we subclass the ``NodeGraph`` and connect it up to a
283283
node_graph.register_node(MyNode)
284284
node_graph.widget.show()
285285
286-
node_a = node_graph.create_node('com.chantasticvfx.MyNode')
286+
node_a = node_graph.create_node('io.github.jchanvfx.MyNode')
287287
288288
app.exec_()
289289

docs/examples/ex_overview.rst

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -65,14 +65,14 @@ Here's a basic example snippet for creating two nodes and connecting them togeth
6565
import sys
6666
6767
from Qt import QtWidgets
68-
from NodeGraphQt import NodeGraph, BaseNode, setup_context_menu
68+
from NodeGraphQt import NodeGraph, BaseNode
6969
7070
7171
# create a node class object inherited from BaseNode.
7272
class FooNode(BaseNode):
7373
7474
# unique node identifier domain.
75-
__identifier__ = 'com.chantasticvfx'
75+
__identifier__ = 'io.github.jchanvfx'
7676
7777
# initial default node name.
7878
NODE_NAME = 'Foo Node'
@@ -93,9 +93,6 @@ Here's a basic example snippet for creating two nodes and connecting them togeth
9393
# create node graph controller.
9494
graph = NodeGraph()
9595
96-
# set up default menu and commands.
97-
setup_context_menu(graph)
98-
9996
# register the FooNode node class.
10097
graph.register_node(FooNode)
10198
@@ -104,8 +101,8 @@ Here's a basic example snippet for creating two nodes and connecting them togeth
104101
graph_widget.show()
105102
106103
# create two nodes.
107-
node_a = graph.create_node('com.chantasticvfx.FooNode', name='node A')
108-
node_b = graph.create_node('com.chantasticvfx.FooNode', name='node B', pos=(300, 50))
104+
node_a = graph.create_node('io.github.jchanvfx.FooNode', name='node A')
105+
node_b = graph.create_node('io.github.jchanvfx.FooNode', name='node B', pos=(300, 50))
109106
110107
# connect node_a to node_b
111108
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
115112
result:
116113

117114
.. image:: ../_images/example_result.png
118-
:width: 60%
115+
:width: 60%

0 commit comments

Comments
 (0)