IC Python API:RLPy RIObject
- Main article: Modules.
Inheritance
This class inherits public member functions from:
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
#clone object
clone_avatar = avatar.Clone()
print( clone_avatar )
#is selected
RLPy.RScene.SelectObject(avatar)
print(avatar.IsSelected()) #True
Operators
This class supports the following operators:
Member | Operation | Syntax | Description | Example |
---|---|---|---|---|
__eq__ | Equality | a == b | If the values of two operands are equal, then the condition becomes true. | (a == b) is not true. |
Member Functions
Clone
RLPy.RIObject.Clone ( self )
Clones the object original and returns the clone. ( Experimental API )
Return Values
cloned object.
GetBounds
RLPy.RIObject.GetBounds ( self, kMaxPoint, kCenterPoint, kMinPoint )
Get world bound of this object. ( Experimental API )
Parameters
kMaxPoint [OUT] The maximal point of the box - RLPy.RVector3f
kCenterPoint [OUT] The center of the bounding box - RLPy.RVector3f
kMinPoint [OUT] The minimal point of the box - RLPy.RVector3f
Return Values
RLPy.RStatus.Success Success
RLPy.RStatus.Failure Fail
GetControl
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
GetID
RLPy.RIObject.GetID ( self )
Get unique id of the object.
Returns
GetMeshNames
RLPy.RIObject.GetMeshNames ( self )
Get all mesh names of the object.
Returns
GetName
RLPy.RIObject.GetName ( self )
Get name of the object.
Returns
GetPivot
RLPy.RIObject.GetPivot ( self, kPosition, kOrientation )
Get this object's pivot. ( Experimental API )
Parameters
kPosition [OUT] current pivot position - RLPy.RVector3f
kOrientation [OUT] current pivot orientation - RLPy.RVector3f
Return Values
RLPy.RStatus.Success Success
RLPy.RStatus.Failure Fail
GetType
RLPy.RIObject.GetType ( self )
Get object type of the object.
Returns
- 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
IsSelected
RLPy.RIObject.IsSelected ( self )
A Boolean value indicating whether the object is in the selected state. ( Experimental API )
Return Values
selected or not
LinkTo
RLPy.RIObject.LinkTo ( self, spTargetObject, kTime )
Simultaneously move or rotate link target object and this object. And allowed to link your object to another one at a specific point of time. The Link never changes the Hierarchy Structure of the current object. ( Experimental API )
Parameters
spTargetObject [IN] Link target object - RLPy.RIObject
kTime [IN] Time of link - RLPy.RTime
Return Values
RLPy.RStatus.Success Success
RLPy.RStatus.Failure Fail
LocalTransform
RLPy.RIObject.LocalTransform ( self )
Get local transform of the object. ( Experimental API )
Returns
SetName
RLPy.RIObject.SetName ( self, strName )
Set object's name. ( Experimental API )
Parameters
strName [IN] object name - string
Return Values
RLPy.RStatus.Success Success
RLPy.RStatus.Failure Fail
SetParent
RLPy.RIObject.SetParent ( self, args )
( Experimental API )
Parameters
spParent [IN] If parent is null, this object will restore default parent - RLPy.RINode
Returns
UnLink
RLPy.RIObject.UnLink ( self, kTime )
Unlink object of time. ( Experimental API )
Parameters
kTime [IN] Time of unlink - RLPy.RTime
Return Values
RLPy.RStatus.Success Success
RLPy.RStatus.Failure Fail
WorldTransform
RLPy.RIObject.WorldTransform ( self )
Get world transform of the object. ( Experimental API )