IC8 Python API:RLPy RFloatControl

From Reallusion Wiki!
Jump to: navigation, search
Main article: iC8 Modules.
Last modified: 10/21/2026

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 nearest float key value.

Class Methods

RLPy.RFloatControl.GetValue(self, kTick, fValue, fDefaultValue = 0.0)

Get key value by time.

Parameters

kTime[IN] Specifies the time to get value.

fValue[OUT] Value of the key - float

Returns

RLPy.RStatus.Success - Succeed
RLPy.RStatus.Failure - Fail
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))

RLPy.RFloatControl.OptimizeKeys(self, kBeginTime, kEndTime, kFps, fError = 0.5)

Optimize Keys.

Parameters

kBeginTime[IN] Specifies the time to start - RLPy.RLTime
kEndTime[IN] Specifies the time to end - RLPy.RLTime
kFps[IN] Specifies the fps - RLPy.RLFps
fError[IN] Specifies the error value - float

Returns

RLPy.RStatus.Success - Succeed
RLPy.RStatus.Failure - Fail
1 # No example

RLPy.RFloatControl.ReserveKeyCapacity(self, uSize)

reserve key capacity.

Parameters

uSize[IN] Size - int

Returns

RLPy.RStatus.Success - Succeed
RLPy.RStatus.Failure - Fail
1 # No example

RLPy.RFloatControl.SetValue(self, args)

Set key value by time.

Parameters

kTime[IN] Specifies the time to get value.
fValue[IN] Value of the key - float

Returns

RLPy.RStatus.Success - Succeed
RLPy.RStatus.Failure - Fail
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)

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

Constructor & Destructor

__init__ (self, *args, **kwargs)

Initializes a new float control instance.

Parameters

  • args
  • kwargs

Member Functions

GetValue (self, kTick, fValue, fDefaultValue=0.0)

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

Parameters

  • kTick
  • fValue
  • fDefaultValue (default: 0.0)

OptimizeKeys (self, kBeginTime, kEndTime, kFps, fError=0.5)

Optimizes Keys.

Parameters

  • kBeginTime
  • kEndTime
  • kFps
  • fError (default: 0.5)

RemoveKeys (self, kTicks)

Removes multiple keys from the control by time.

Parameters

  • kTicks

ReserveKeyCapacity (self, uSize)

Reserve key capacity.

Parameters

  • uSize

SetValue (self, *args)

Set the float key value for the requested time. See Also: GetValue

Parameters

  • args

SetValueAt (self, uIndex, fValue)

Sets the float value at the specified key index.

Parameters

  • uIndex
  • fValue

SyncAdapterToControl (self)

Sync adapter to venus.

Properties

thisown

Indicates whether this SWIG proxy owns the underlying C++ object.