RLPy.RIObject
+ Inheritance diagram for RLPy.RIObject:

Public Member Functions

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 base class of the objects in the scene.

avatar_list = RLPy.RScene.GetAvatars()
avatar = avatar_list[0]
# basic information
print(avatar.GetName())
print(avatar.GetID())
print(avatar.GetType()) # RLPy.EObjectType_Avatar
# get control
transform_control = avatar.GetControl("Transform") # type RTransformControl
avatar_path_position_control = avatar.GetControl("PathPosition") # type RFloatControl
avatar_path_offset_control = avatar.GetControl("PathOffset") # type RTransformControl

Member Function Documentation

§ GetControl()

def RLPy.RIObject.GetControl (   self,
  strKey 
)

Get control of the object.

Parameters
strKey[IN] Key of the controller, allowing use "Transform" to retrieve the transform control of the Transform track, use "PathPosition" to retrieve the float control of Path position track, and use "PathOffset" to retrieve the transform control of the Path Offset track, - string
Returns
The specified control - RLPy.RControl

§ GetID()

def RLPy.RIObject.GetID (   self)

Get unique id of the object.

Returns
object id - int

§ GetMeshNames()

def RLPy.RIObject.GetMeshNames (   self)

Get all mesh names of the object.

Returns
mesh name list - string

§ GetName()

def RLPy.RIObject.GetName (   self)

Get name of the object.

Returns
object name - string

§ GetType()

def RLPy.RIObject.GetType (   self)

Get object type of the object.

Returns
object type - RLPy.EObjectType
  • RLPy.EObjectType_Object
  • RLPy.EObjectType_Avatar
  • RLPy.EObjectType_Prop
  • RLPy.EObjectType_Camera
  • RLPy.EObjectType_Particle
  • RLPy.EObjectType_Light
  • RLPy.EObjectType_SpotLight
  • RLPy.EObjectType_PointLight
  • RLPy.EObjectType_DirectionalLight

§ LocalTransform()

def RLPy.RIObject.LocalTransform (   self)

Get local transform of the object.

( Experimental API )

Returns
object transform - RLPy.RTransformf

§ WorldTransform()

def RLPy.RIObject.WorldTransform (   self)

Get world transform of the object.

( Experimental API )

Returns
object transform - RLPy.RTransformf