示例#1
0
 def rerun (self):
   self.recalculate()
   for output, port in self.outputs:
     if not self.ofilter.has_key((output,port)):
       print textred("Err: Invalid output, port '"+str(output)+","+str(port)+"' for node ofilter")
       print textred("     Affected node: "+str(self))
       dumpstack()
       sys.exit(7)
     if self.ofilter[(output, port)]:
       output.update(port, self.value)
示例#2
0
 def update (self, port, value):
   if not self.inputs.has_key(port):
     print textred("Err: Invalid port '"+str(port)+"' for node input.")
     print textred("     Affected node: "+str(self))
     print textred("     Valid ports:"+("".join(map(lambda e: " "+str(e), self.inputs))))
     dumpstack()
     sys.exit(5)
   if not self.ifilter.has_key(port):
     print textred("Err: Invalid port '"+str(port)+"' for node ifilter")
     print textred("     Affected node: "+str(self))
     dumpstack()
     sys.exit(6)
   if not self.ifilter[port]: return
   self.inputs[port] = value
   self.rerun()