Beispiel #1
0
 def node_init(self, name):
     NodeBase.__init__(self, name)
     for i in range(item['color_count']):
         node_pin = NodeBase.createOutputPin(self, f'color_{i}', 'FramePin')
         node_pin.enableOptions(PinOptions.AllowMultipleConnections)
         setattr(self, f'color_{i}', node_pin)
     for i in range(item['mono_count']):
         node_pin = NodeBase.createOutputPin(self, f'mono_{i}', 'FramePin')
         node_pin.enableOptions(PinOptions.AllowMultipleConnections)
         setattr(self, f'mono_{i}', node_pin)
Beispiel #2
0
 def serialize(self):
     default = NodeBase.serialize(self)
     if self.var is not None:
         default['varUid'] = str(self.var.uid)
     return default
 def serialize(self):
     default = NodeBase.serialize(self)
     default['graphData'] = self.rawGraph.serialize()
     return default
Beispiel #4
0
def createFunction(packageName, libName, functionName):
    packages = GET_PACKAGES()
    lib = packages[packageName].GetFunctionLibraries()[libName]
    defFoos = lib.getFunctions()
    fun = NodeBase.initializeFromFunction(defFoos[functionName])
    return fun
Beispiel #5
0
 def kill(self):
     self._timer.stop()
     self._timer.timeout.disconnect()
     NodeBase.kill(self)