def __init__(self, parent=None, name='SpotLight'): LightNodeWrapper.__init__(self, parent, name, SPOTLIGHT_WRAPPER_DUMMYOBJECT, Spotlight) self.lens = PerspectiveLens() self.light.setLens(self.lens) self.mutableParameters['attenuation'] = [ Vec3, self.light.getAttenuation, self.light.setAttenuation, None, None, True ] self.mutableParameters['specularColor'] = [ Vec4, self.light.getSpecularColor, self.light.setSpecularColor, None, None, True ] self.mutableParameters['fov'] = [ Vec2, self.lens.getFov, self.lens.setFov, None, None, True ] self.mutableParameters['near'] = [ float, self.lens.getNear, self.lens.setNear, None, None, True ] self.mutableParameters['far'] = [ float, self.lens.getFar, self.lens.setFar, None, None, True ] self.mutableParameters['exponent'] = [ float, self.light.getExponent, self.setExponent, None, None, True ]
def __init__(self, parent=None, name='DirectionalLight'): # define the name of this object name = 'DirectionalLight' LightNodeWrapper.__init__(self, parent, name, DIRECTIONALLIGHT_WRAPPER_DUMMYOBJECT, DirectionalLight) self.mutableParameters['specularColor'] = [ Vec4, self.light.getSpecularColor, self.light.setSpecularColor, None, None, True ]
def __init__(self, parent=None, name='PointLight'): # define the name of this object name = 'PointLight' LightNodeWrapper.__init__(self, parent, name, POINTLIGHT_WRAPPER_DUMMYOBJECT, PointLight) self.mutableParameters['attenuation'] = [ Vec3, self.light.getAttenuation, self.light.setAttenuation, None, None, True ] self.mutableParameters['specularColor'] = [ Vec4, self.light.getSpecularColor, self.light.setSpecularColor, None, None, True ]
def stopEdit(self): # the object is deselected from being edited if self.isEditmodeEnabled(): self.light.hideFrustum() LightNodeWrapper.stopEdit(self)
def startEdit(self): # the object is selected to be edited # creates a directFrame to edit this object LightNodeWrapper.startEdit(self) if self.isEditmodeEnabled(): self.light.showFrustum()
def destroy(self): # delete the lens? #self.lensNode.removeNode() LightNodeWrapper.destroy(self)
def __init__(self, parent=None, name='AmbientLight'): # define the name of this object LightNodeWrapper.__init__(self, parent, name, AMBIENTLIGHT_WRAPPER_DUMMYOBJECT, AmbientLight)