Skip to content

Commit 5ab1a26

Browse files
committed
doc strings typos
1 parent 90153fc commit 5ab1a26

File tree

2 files changed

+44
-3
lines changed

2 files changed

+44
-3
lines changed

NodeGraphQt/__init__.py

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,47 @@
2929
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
3030
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
3131
# EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
32+
"""
33+
NodeGraphQt is a node graph framework that can be implemented and re purposed
34+
into applications that supports PySide2.
35+
36+
url: https://github.com/jchanvfx/NodeGraphQt
37+
docs: http://chantasticvfx.com/nodeGraphQt/html/index.html
38+
39+
Basic Example:
40+
41+
import sys
42+
from NodeGraphQt import QtWidgets, NodeGraph, BaseNode
43+
44+
45+
class MyNode(BaseNode):
46+
47+
__identifier__ = 'com.chantasticvfx'
48+
NODE_NAME = 'My Node'
49+
50+
def __init__(self):
51+
super(MyNode, self).__init__()
52+
self.add_input('foo', color=(180, 80, 0))
53+
self.add_output('bar')
54+
55+
if __name__ == '__main__':
56+
app = QtWidgets.QApplication(sys.argv)
57+
graph = NodeGraph()
58+
59+
graph.register_node(BaseNode)
60+
graph.register_node(BackdropNode)
61+
62+
backdrop = graph.create_node('nodeGraphQt.nodes.Backdrop', name='Backdrop')
63+
node_a = graph.create_node('com.chantasticvfx.MyNode', name='Node A')
64+
node_b = graph.create_node('com.chantasticvfx.MyNode', name='Node B', color='#5b162f')
65+
66+
node_a.set_input(0, node_b.output(0))
67+
68+
viewer = graph.viewer()
69+
viewer.show()
70+
71+
app.exec_()
72+
"""
3273

3374
try:
3475
from Qt import QtWidgets, QtGui, QtCore, QtCompat

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,10 @@ http://chantasticvfx.com/nodeGraphQt/html/index.html
4141
import sys
4242

4343
from NodeGraphQt import QtWidgets
44-
from NodeGraphQt import NodeGraph, Node, Backdrop, setup_context_menu
44+
from NodeGraphQt import NodeGraph, BaseNode, BackdropNode, setup_context_menu
4545

4646
# create a example node object with a input/output port.
47-
class MyNode(Node):
47+
class MyNode(BaseNode):
4848
"""example test node."""
4949

5050
# unique node identifier domain. ("com.chantasticvfx.MyNode")
@@ -69,7 +69,7 @@ if __name__ == '__main__':
6969
setup_context_menu(graph)
7070

7171
# register backdrop node. (included in the NodeGraphQt module)
72-
graph.register_node(Backdrop)
72+
graph.register_node(BackdropNode)
7373

7474
# register example node into the node graph.
7575
graph.register_node(MyNode)

0 commit comments

Comments
 (0)