Exemple #1
0
 def setEmitter(self, type):
     if (self.emitterType == type):
         return None
     if (self.emitter):
         self.emitter = None
     self.emitterType = type
     if (type == "ArcEmitter"):
         self.emitter = ArcEmitter()
     elif (type == "BoxEmitter"):
         self.emitter = BoxEmitter()
     elif (type == "DiscEmitter"):
         self.emitter = DiscEmitter()
     elif (type == "LineEmitter"):
         self.emitter = LineEmitter()
     elif (type == "PointEmitter"):
         self.emitter = PointEmitter()
     elif (type == "RectangleEmitter"):
         self.emitter = RectangleEmitter()
     elif (type == "RingEmitter"):
         self.emitter = RingEmitter()
     elif (type == "SphereSurfaceEmitter"):
         self.emitter = SphereSurfaceEmitter()
     elif (type == "SphereVolumeEmitter"):
         self.emitter = SphereVolumeEmitter()
         self.emitter.setRadius(1.0)
     elif (type == "TangentRingEmitter"):
         self.emitter = TangentRingEmitter()
     else:
         print "unknown emitter type: %s" % type
         return None
     ParticleSystem.setEmitter(self, self.emitter)
 def setEmitter(self, type):
     if self.emitterType == type:
         return None
     
     if self.emitter:
         self.emitter = None
     
     self.emitterType = type
     if type == 'ArcEmitter':
         self.emitter = ArcEmitter()
     elif type == 'BoxEmitter':
         self.emitter = BoxEmitter()
     elif type == 'DiscEmitter':
         self.emitter = DiscEmitter()
     elif type == 'LineEmitter':
         self.emitter = LineEmitter()
     elif type == 'PointEmitter':
         self.emitter = PointEmitter()
     elif type == 'RectangleEmitter':
         self.emitter = RectangleEmitter()
     elif type == 'RingEmitter':
         self.emitter = RingEmitter()
     elif type == 'SphereSurfaceEmitter':
         self.emitter = SphereSurfaceEmitter()
     elif type == 'SphereVolumeEmitter':
         self.emitter = SphereVolumeEmitter()
         self.emitter.setRadius(1.0)
     elif type == 'TangentRingEmitter':
         self.emitter = TangentRingEmitter()
     else:
         print 'unknown emitter type: %s' % type
         return None
     ParticleSystem.setEmitter(self, self.emitter)