IC Python API:RLPy RIObject

From Reallusion Wiki!
Revision as of 00:26, 27 March 2019 by Chuck (RL) (Talk | contribs) (Created page with "{{TOC}} {{Parent|IC_Python_API:RL_Python_Modules|Modules}} This class inherits member functions from: RLPy.RIBase == Detailed Description == This...")

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
Main article: Modules.

This class inherits member functions from: RLPy.RIBase

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

The specified control - RLPy.RControl

GetID

RLPy.RIObject.GetID ( self )

Get unique id of the object.

Returns

Object id - int

GetMeshNames

RLPy.RIObject.GetMeshNames ( self )

Get all mesh names of the object.

Returns

Mesh name list - string

GetName

RLPy.RIObject.GetName ( self )

Get name of the object.

Returns

Object name - string

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

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

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

Object transform - RLPy.RTransformf

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

RStatus - RLPy.RStatus

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 )

Returns

Object transform - RLPy.RTransformf