IC Python API:RLPy RFloatControl

From Reallusion Wiki!
Revision as of 19:14, 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 manage float keys ( RFloatkey ). RFloatControl can access RFloatkey via SetValue and GetValue. GetValue can retrieve the key value at a requested time, and if a key does not exist then it will return the neartes float key value.

See Also: RKey, RFloatkey

Inheritance

RControl > RFloatControl

Member Functions

GetValue ( self, kTime, fValue )

Get the float key value, if the key does not exist for the requested time then extract an interpolated value.

See Also: SetValue

Parameters

kTime [IN] The specified time - RTime
fValue [OUT] The float key value - float.

Return

Success - RLPy.RStatus.Success
Failure - RLPy.RStatus.Failure
1 avatar_list = RLPy.RScene.GetAvatars()
2 avatar = avatar_list[0]
3  
4 # get value
5 float_control = avatar.GetControl("PathPosition")
6 print(float_control.GetValue(time,value))

SetValue ( self, kTime, fValue )

Set the float key value for the requested time.

See Also: GetValue

Parameters

kTime [IN] The specified time- RTime
fValue [IN] The Key value - float

Return

Success - RLPy.RStatus.Success
Failure - RLPy.RStatus.Failure
1 avatar_list = RLPy.RScene.GetAvatars()
2 avatar = avatar_list[0]
3  
4 # set value
5 float_control = avatar.GetControl("PathPosition")
6 value = 1
7 float_control.SetValue(RLPy.RTime(100),value)