Difference between revisions of "IC Python API:RLPy RINode"
Chuck (RL) (Talk | contribs) (Created page with "{{TOC}} {{Parent|IC_Python_API:RL_Python_Modules|Modules}} == Detailed Description == This class is the base class of the objects in the scene. <syntaxhighlight lang="Python">...") |
Chuck (RL) (Talk | contribs) m |
||
Line 38: | Line 38: | ||
===GetID=== | ===GetID=== | ||
<syntaxhighlight lang="Python"> | <syntaxhighlight lang="Python"> | ||
− | RLPy.RIObject.GetID ( self) | + | RLPy.RIObject.GetID ( self ) |
</syntaxhighlight> | </syntaxhighlight> | ||
Get unique id of the object. | Get unique id of the object. | ||
Line 48: | Line 48: | ||
===GetMeshNames=== | ===GetMeshNames=== | ||
<syntaxhighlight lang="Python"> | <syntaxhighlight lang="Python"> | ||
− | RLPy.RIObject.GetMeshNames ( self) | + | RLPy.RIObject.GetMeshNames ( self ) |
</syntaxhighlight> | </syntaxhighlight> | ||
Get all mesh names of the object. | Get all mesh names of the object. | ||
Line 58: | Line 58: | ||
===GetName=== | ===GetName=== | ||
<syntaxhighlight lang="Python"> | <syntaxhighlight lang="Python"> | ||
− | RLPy.RIObject.GetName ( self) | + | RLPy.RIObject.GetName ( self ) |
</syntaxhighlight> | </syntaxhighlight> | ||
Get name of the object. | Get name of the object. | ||
Line 68: | Line 68: | ||
===GetType=== | ===GetType=== | ||
<syntaxhighlight lang="Python"> | <syntaxhighlight lang="Python"> | ||
− | RLPy.RIObject.GetType ( self) | + | RLPy.RIObject.GetType ( self ) |
</syntaxhighlight> | </syntaxhighlight> | ||
Get object type of the object. | Get object type of the object. | ||
Line 87: | Line 87: | ||
===LocalTransform=== | ===LocalTransform=== | ||
<syntaxhighlight lang="Python"> | <syntaxhighlight lang="Python"> | ||
− | RLPy.RIObject.LocalTransform ( self) | + | RLPy.RIObject.LocalTransform ( self ) |
</syntaxhighlight> | </syntaxhighlight> | ||
Get local transform of the object. | Get local transform of the object. | ||
Line 98: | Line 98: | ||
===WorldTransform=== | ===WorldTransform=== | ||
<syntaxhighlight lang="Python"> | <syntaxhighlight lang="Python"> | ||
− | RLPy.RIObject.WorldTransform ( self) | + | RLPy.RIObject.WorldTransform ( self ) |
</syntaxhighlight> | </syntaxhighlight> | ||
Get world transform of the object. | Get world transform of the object. |
Revision as of 22:04, 25 March 2019
- Main article: Modules.
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 Functions
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
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
LocalTransform
RLPy.RIObject.LocalTransform ( self )
Get local transform of the object. ( Experimental API )
Returns
Object transform - RLPy.RTransformf
WorldTransform
RLPy.RIObject.WorldTransform ( self )
Get world transform of the object. ( Experimental API )
Returns
Object transform - RLPy.RTransformf