File tree Expand file tree Collapse file tree 5 files changed +27
-6
lines changed Expand file tree Collapse file tree 5 files changed +27
-6
lines changed Original file line number Diff line number Diff line change @@ -12,5 +12,8 @@ docs/_build/
1212# test stuff
1313dist
1414build
15+
16+ tests /*
17+
1518* .egg-info
1619* .json
Original file line number Diff line number Diff line change @@ -529,6 +529,15 @@ def inputs(self):
529529 """
530530 return {p .name (): p for p in self ._inputs }
531531
532+ def input_ports (self ):
533+ """
534+ Return all input ports.
535+
536+ Returns:
537+ list[NodeGraphQt.Port]: node input ports.
538+ """
539+ return self ._inputs
540+
532541 def outputs (self ):
533542 """
534543 Returns all the output ports from the node.
@@ -538,6 +547,15 @@ def outputs(self):
538547 """
539548 return {p .name (): p for p in self ._outputs }
540549
550+ def output_ports (self ):
551+ """
552+ Return all output ports.
553+
554+ Returns:
555+ list[NodeGraphQt.Port]: node output ports.
556+ """
557+ return self ._outputs
558+
541559 def input (self , index ):
542560 """
543561 Return the input port with the matching index.
Original file line number Diff line number Diff line change 33 PortDisconnectedCmd ,
44 PortVisibleCmd )
55from NodeGraphQt .base .model import PortModel
6+ from NodeGraphQt .constants import IN_PORT , OUT_PORT
67
78
89class Port (object ):
@@ -118,9 +119,9 @@ def connected_ports(self):
118119 for node_id , port_names in self .model .connected_ports .items ():
119120 for port_name in port_names :
120121 node = graph .get_node_by_id (node_id )
121- if self .type_ () == 'in' :
122+ if self .type_ () == IN_PORT :
122123 ports .append (node .outputs ()[port_name ])
123- elif self .type_ () == 'out' :
124+ elif self .type_ () == OUT_PORT :
124125 ports .append (node .inputs ()[port_name ])
125126 return ports
126127
Original file line number Diff line number Diff line change 11#!/usr/bin/python
22# -*- coding: utf-8 -*-
33import os
4- import sys
54
65from NodeGraphQt import (NodeGraph ,
76 BaseNode ,
@@ -34,7 +33,7 @@ def __init__(self):
3433
3534
3635if __name__ == '__main__' :
37- app = QtWidgets .QApplication (sys . argv )
36+ app = QtWidgets .QApplication ([] )
3837
3938 # create node graph.
4039 graph = NodeGraph ()
Original file line number Diff line number Diff line change 1515 'supports PySide & PySide2'
1616)
1717classifiers = [
18- 'Programming Language :: Python :: 3.7' ,
19- 'License :: OSI Approved :: MIT License' ,
2018 'Operating System :: OS Independent' ,
19+ 'License :: OSI Approved :: MIT License' ,
20+ 'Programming Language :: Python :: 3.7' ,
2121]
2222
2323setuptools .setup (
You can’t perform that action at this time.
0 commit comments