IC Python API:RLPy RTransformControl

From Reallusion Wiki!
Revision as of 02:24, 28 March 2019 by Chuck (RL) (Talk | contribs) (Created page with "{{TOC}} {{Parent|IC_Python_API:RL_Python_Modules|Modules}} ==Inheritance== This class inherits public member functions from: *RLPy.RControl ==D...")

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

Inheritance

This class inherits public member functions from:

Detailed Description

RTransformControl controls transform values.

avatar_list = RLPy.RScene.GetAvatars()
avatar = avatar_list[0]

# set transform value
control = avatar.GetControl("Transform")
scale = RLPy.RVector3()
rot = RLPy.RQuaternion.IDENTITY
pos = RLPy.RVector3.UNIT_XYZ
pos.x = 2
pos.y = 2.5
pos.z = 4
transform = RLPy.RTransform(scale, rot, pos)
control.SetValue(RLPy.RTime(1000), transform)

# get transform value
transform1 = RLPy.RTransform()
control.GetValue(RLPy.RTime(1000), transform1)
print(transform1.T().x) #2.0
print(transform1.T().y) #2.5
print(transform1.T().z) #4.0

Member Functions

GetTransformKey

RLPy.RTransformControl.GetTransformKey ( self, kTime, pKey )

Get transform key by time.

Parameters

kTime [IN] Specifies the time to set value - RLPy.RTime

pKey [OUT] Pointer to a transform key whose value will be set - RLPy.RTransformKey

Return Values

RLPy.RStatus.Success Success

RLPy.RStatus.Failure Fail


GetTransformKeyAt

RLPy.RTransformControl.GetTransformKeyAt ( self, uIndex, pKey )

Get transform key by index.

Parameters

uIndex [IN] Index of the key - int

pKey [OUT] Pointer to a transform key whose value will be set - RLPy.RTransformKey

Return Values

RLPy.RStatus.Success Success

RLPy.RStatus.Failure Fail


GetValue

RLPy.RTransformControl.GetValue ( self, kTime, kValue )

Get key value by time.

Parameters

kTime [IN] Specifies the time to get value - RLPy.RTime

kValue [OUT] Value of the key - RLPy.RTransformf

Return Values

RLPy.RStatus.Success Success

RLPy.RStatus.Failure Fail


SetValue

RLPy.RTransformControl.SetValue ( self, kTime, kValue )

Set key value by time.

Parameters

kTime [IN] Specifies the time to set value - RLPy.RTime

kValue [IN] Value of the key - RLPy.RTransformf

Return Values

RLPy.RStatus.Success Success

RLPy.RStatus.Failure Fail