RLPy.RILight
+ Inheritance diagram for RLPy.RILight:

Public Member Functions

def __init__ (self, args, kwargs)
 
def SetActive (self, bActive)
 Set if light is active. More...
 
def GetActive (self)
 Get if light is active. More...
 
def SetMultiplier (self, kTime, fMultiplier)
 Set the light's multiplier. More...
 
def GetMultiplier (self)
 Get the light's multiplier. More...
 
def SetColor (self, kTime, kColor)
 Set the light's color. More...
 
def GetColor (self)
 Get the light's color. More...
 
- Public Member Functions inherited from RLPy.RIObject
def __init__ (self, args, kwargs)
 
def GetName (self)
 Get name of the object. More...
 
def GetID (self)
 Get unique id of the object. More...
 
def GetControl (self, strKey)
 Get control of the object. More...
 
def GetType (self)
 Get object type of the object. More...
 
def GetMeshNames (self)
 Get all mesh names of the object. More...
 
def __eq__ (self, kRhs)
 
def LocalTransform (self)
 Get local transform of the object. More...
 
def WorldTransform (self)
 Get world transform of the object. More...
 
- Public Member Functions inherited from RLPy.RIBase
def __init__ (self, args, kwargs)
 
def IsValid (self)
 Is valid or not. More...
 

Detailed Description

This class is the interface to lights in the scene.

It provides methods to access various parts of a light such as transformation, color, range etc. All methods of this class are implemented by the system. ( Experimental Class )

light_object = RLPy.RScene.FindObject(RLPy.EObjectType_Light, "Spotlight") # use light name to find object
light_object.SetActive(True)
print(light_object.GetActive())
# set light multiplier
light_object.SetMultiplier(RLPy.RTime(0), 8.0)
print(light_object.GetMultiplier())
# set light color
color = RLPy.RRgb.RED
light_object.SetColor(RLPy.RTime(0), color)
light_object.GetColor().R() # is 1.0
light_object.GetColor().G() # is 0.0
light_object.GetColor().B() # is 0.0
# change light transform
control = light_object.GetControl("Transform")
transform = RLPy.RTransform.IDENTITY
transform.T().x = -75.0
transform.T().y = -150.0
transform.T().z = 250.0
time = RLPy.RTime(0)
control.SetValue(time, transform)

Member Function Documentation

§ GetActive()

def RLPy.RILight.GetActive (   self)

Get if light is active.

( Experimental API )

Returns
True if light is active, False if light is not active - bool

§ GetColor()

def RLPy.RILight.GetColor (   self)

Get the light's color.

( Experimental API )

Returns
The value of the "color" attribute of the light node - RLPy.RRgb

§ GetMultiplier()

def RLPy.RILight.GetMultiplier (   self)

Get the light's multiplier.

( Experimental API )

Returns
The value of the "multiplier" attribute of the light node - float

§ SetActive()

def RLPy.RILight.SetActive (   self,
  bActive 
)

Set if light is active.

( Experimental API )

Parameters
bActive[in] If light is active - bool
Return values
RLPy.RStatus.SuccessSuccess
RLPy.RStatus.FailureFail

§ SetColor()

def RLPy.RILight.SetColor (   self,
  kTime,
  kColor 
)

Set the light's color.

( Experimental API )

Parameters
kTime[in] The time at which to set the color - RLPy.RTime
kColor[in] The Light RGB value - RLPy.RRgb
Return values
RLPy.RStatus.SuccessSuccess
RLPy.RStatus.FailureFail

§ SetMultiplier()

def RLPy.RILight.SetMultiplier (   self,
  kTime,
  fMultiplier 
)

Set the light's multiplier.

( Experimental API )

Parameters
kTime[in] The time at which to set the multiplier - RLPy.RTime
fMultiplier[in] The Light multiplier value - float
Return values
RLPy.RStatus.SuccessSuccess
RLPy.RStatus.FailureFail