Ejemplo n.º 1
0
 def get_type(t):
     if Light.SUB_CLASSES == None:
         Light.SUB_CLASSES = {}
         classes = get_subclasses(Light)
         for c in classes: Light.SUB_CLASSES[c.TYPE] = c
     if not t in Light.SUB_CLASSES: raise Exception("Unknown light type: " + hex(t))
     return  Light.SUB_CLASSES[t]
Ejemplo n.º 2
0
 def get_event_class(self, type):
     if self.EVENT_CLASSES == None:
         self.EVENT_CLASSES = {}
         classes = get_subclasses(Event)
         for c in classes:
             if c.TYPE: self.EVENT_CLASSES[c.TYPE] = c
     if not type in self.EVENT_CLASSES: raise Exception("Clip Event Type %x is not supported!" % type)
     return self.EVENT_CLASSES[type]
Ejemplo n.º 3
0
 def get_step(id):
     if TextureStep.STEPS == None:
         TextureStep.STEPS = {}
         cs = get_subclasses(TextureStep)
         for c in cs:
             if c.ID > 0:
                 TextureStep.STEPS[c.ID] = c
     return TextureStep.STEPS[id]
Ejemplo n.º 4
0
 def get_step(id):
     if TextureStep.STEPS == None:
         TextureStep.STEPS = {}
         cs = get_subclasses(TextureStep)
         for c in cs:
             if c.ID > 0:
                 TextureStep.STEPS[c.ID] = c
     return TextureStep.STEPS[id]
Ejemplo n.º 5
0
 def get_event_class(self, type):
     if self.EVENT_CLASSES == None:
         self.EVENT_CLASSES = {}
         classes = get_subclasses(Event)
         for c in classes:
             if c.TYPE: self.EVENT_CLASSES[c.TYPE] = c
     if not type in self.EVENT_CLASSES:
         raise Exception("Clip Event Type %x is not supported!" % type)
     return self.EVENT_CLASSES[type]
Ejemplo n.º 6
0
 def get_type(t):
     if Light.SUB_CLASSES == None:
         Light.SUB_CLASSES = {}
         classes = get_subclasses(Light)
         for c in classes:
             Light.SUB_CLASSES[c.TYPE] = c
     if not t in Light.SUB_CLASSES:
         raise Exception("Unknown light type: " + hex(t))
     return Light.SUB_CLASSES[t]
Ejemplo n.º 7
0
 def get_node_types():
     if DecisionGraphNode.NODE_TYPES == None:
         DecisionGraphNode.NODE_TYPES = tuple(
             filter(lambda c: c.ID > 0, get_subclasses(DecisionGraphNode)))
     return DecisionGraphNode.NODE_TYPES
Ejemplo n.º 8
0
 def get_type(typecode):
     if TextureStep.Param.PARAM_TYPES == None:
         TextureStep.Param.PARAM_TYPES = {}
         for c in get_subclasses(TextureStep.Param):
             TextureStep.Param.PARAM_TYPES[c.TYPE] = c
     return TextureStep.Param.PARAM_TYPES[typecode]
Ejemplo n.º 9
0
 def get_type(typecode):
     if TextureStep.Param.PARAM_TYPES == None:
         TextureStep.Param.PARAM_TYPES = {}
         for c in get_subclasses(TextureStep.Param):
             TextureStep.Param.PARAM_TYPES[c.TYPE] = c
     return TextureStep.Param.PARAM_TYPES[typecode]
Ejemplo n.º 10
0
 def get_node_types():
     if DecisionGraphNode.NODE_TYPES == None:
         DecisionGraphNode.NODE_TYPES = tuple(filter(lambda c: c.ID > 0, get_subclasses(DecisionGraphNode)))
     return DecisionGraphNode.NODE_TYPES