11from NodeGraphQt import QtCore
22from NodeGraphQt .constants import (NODE_PROP_VECTOR2 ,
33 NODE_PROP_VECTOR3 ,
4- NODE_PROP_VECTOR4 ,
5- NODE_PROP_SLIDER )
4+ NODE_PROP_VECTOR4 )
65
76from .node_base .auto_node import AutoNode
87import os
@@ -19,7 +18,7 @@ class FloatInputNode(AutoNode):
1918 def __init__ (self ):
2019 super (FloatInputNode , self ).__init__ ()
2120 self .output = self .add_output ('out' , float )
22- self .add_float_input ('out' , 'Float Value' , value = 0.0 ,range = (- 10 ,10 ))
21+ self .add_float_input ('out' , 'Float Value' , value = 0.0 , range = (- 10 , 10 ))
2322
2423
2524class IntInputNode (AutoNode ):
@@ -44,7 +43,7 @@ def __init__(self):
4443 super (Vector2InputNode , self ).__init__ ()
4544 self .output = self .add_output ('out' , list )
4645 self .create_property (
47- "out" , [0 , 0 ], widget_type = NODE_PROP_VECTOR2 )
46+ "out" , [0.0 , 0. 0 ], widget_type = NODE_PROP_VECTOR2 )
4847
4948
5049class Vector3InputNode (AutoNode ):
@@ -55,7 +54,7 @@ def __init__(self):
5554 super (Vector3InputNode , self ).__init__ ()
5655 self .output = self .add_output ('out' , list )
5756 self .create_property (
58- "out" , [0 , 0 , 0 ], widget_type = NODE_PROP_VECTOR3 )
57+ "out" , [0.0 , 0.0 , 0. 0 ], widget_type = NODE_PROP_VECTOR3 )
5958
6059
6160class Vector4InputNode (AutoNode ):
@@ -66,7 +65,7 @@ def __init__(self):
6665 super (Vector4InputNode , self ).__init__ ()
6766 self .output = self .add_output ('out' , list )
6867 self .create_property (
69- "out" , [0 , 0 , 0 , 0 ], widget_type = NODE_PROP_VECTOR4 )
68+ "out" , [0.0 , 0.0 , 0.0 , 0. 0 ], widget_type = NODE_PROP_VECTOR4 )
7069
7170
7271class TickTimeNode (AutoNode ):
@@ -106,7 +105,6 @@ def __init__(self):
106105 self .add_output ('file content' , str )
107106 self .create_property ('file content' , "" )
108107 self .add_output ('file path' , str )
109-
110108 self .add_file_input ('file path' , 'File Path' )
111109
112110 def run (self ):
@@ -119,7 +117,7 @@ def run(self):
119117 except Exception as e :
120118 self .error (e )
121119 else :
122- self .error ('No existe %s' % path )
120+ self .error ('No exist %s' % path )
123121 self .set_property ('file content' , '' )
124122
125123
@@ -142,3 +140,21 @@ def __init__(self):
142140
143141 # create QLineEdit text input widget.
144142 self .add_text_input ('out' , 'Text Input' )
143+
144+
145+ class BoolInputNode (AutoNode ):
146+ """
147+ Input Bool data.
148+ """
149+
150+ __identifier__ = 'Inputs'
151+ NODE_NAME = 'Bool'
152+
153+ def __init__ (self ):
154+ super (BoolInputNode , self ).__init__ ()
155+ self .add_output ('out' , bool )
156+ self .create_property ('out' , True )
157+ self .add_combo_menu ('combo' , 'Bool value' , items = ['True' , 'False' ])
158+
159+ def run (self ):
160+ self .set_property ('out' , eval (self .get_property ('combo' )))
0 commit comments