IC Python API:RLPy RTransformKey

From Reallusion Wiki!
Revision as of 23:06, 15 April 2020 by Chuck (RL) (Talk | contribs)

Jump to: navigation, search
Main article: Modules.
Last modified: 04/15/2020

Description

This class is used to access the transform value for a transform key. It contains a RTransform member variable which can be read and written to via GetTransform and SetTransform. This class is managed by RTransformControl which has the ability to create and delete RTransformkey .

Inheritance

RKey > RTransformkey 
 1 # get avatar
 2 avatar_list = RLPy.RScene.GetAvatars()
 3 avatar = avatar_list[0]
 4 
 5 # get transform control and transform key
 6 transform_control = avatar.GetControl("Transform")
 7 transform_key = RLPy.RTransformKey()
 8 transform_control.GetTransformKey(RLPy.RTime(0), transform_key)
 9 
10 # manipulate transform key
11 transform = transform_key.GetTransform()
12 transform.T().x += 1.0
13 transform_key.SetTransform(transform)

See Also: RKey, RFloatkey, RFloatControl, RTransformControl.

Constructor

__init__( self, args )

Create a new transform key object with an existing RTransformkey object.

Parameters

kRhs [IN] A pre-existing transform key object - RTransformkey

1 key = RLPy.RTransformKey(key1)

Member Functions

Clone ( self )

Copy this transform key and return a new RTransformkey object.

See Also: GetTransform, SetTransform

Returns

New transform key object - RTransformkey

1 # Clone RTransformKey
2 cloned_key = transform_key.Clone()

GetTransform ( self )

Get the transform value for this transform key - RTransform

Returns

The transform value - RTransform

1 # Get Transform
2 transform = transform_key.GetTransform()

SetTransform ( self, kTransform )

Set the transform value for this transform key.

See Also: Clone, GetTransform

Parameters

kTransform [IN] transform - RTransform
1 # Set Transform
2 transform_key.SetTransform(transform)