IC8 Python API:RLPy RIClip
Contents
- 1 Description
- 2 Class Methods
- 2.1 RLPy.RIClip.ClipTimeToSceneTime(self, kClipTick)
- 2.2 RLPy.RIClip.GetClipLength(self)
- 2.3 RLPy.RIClip.GetControl(self, strKey, spNode)
- 2.4 RLPy.RIClip.GetDataBlock(self, strKey, spBase)
- 2.5 RLPy.RIClip.GetEffectorDataBlock(self, strKey, spBase, spDataBlock, spActiveDataBlock)
- 2.6 RLPy.RIClip.GetLastKeyTime(self)
- 2.7 RLPy.RIClip.GetLength(self)
- 2.8 RLPy.RIClip.GetLoopCount(self)
- 2.9 RLPy.RIClip.GetSpeed(self)
- 2.10 RLPy.RIClip.GetTransitionData(self)
- 2.11 RLPy.RIClip.GetTransitionRange(self)
- 2.12 RLPy.RIClip.GetTransitionStrength(self, bFadeIn)
- 2.13 RLPy.RIClip.GetTransitionType(self, bFadeIn)
- 2.14 RLPy.RIClip.GetType(self)
- 2.15 RLPy.RIClip.SceneTimeToClipTime(self, kSceneTick)
- 2.16 RLPy.RIClip.SetLength(self, kLength)
- 2.17 RLPy.RIClip.SetSpeed(self, fSpeed)
- 2.18 RLPy.RIClip.SetTransitionData(self, kData)
- 2.19 RLPy.RIClip.SetTransitionRange(self, kLength)
- 2.20 RLPy.RIClip.SetTransitionType(self, bFadeIn, eTransitionType, fTransitionStrength)
- 3 Description
- 4 Constructor & Destructor
- 5 Member Functions
- 5.1 AddTimecodeData (self, fFps, fMilliseconds)
- 5.2 ClipTimeToSceneTime (self, kClipTick)
- 5.3 GetClipLength (self)
- 5.4 GetControl (self, strKey, spNode)
- 5.5 GetDataBlock (self, strKey, spBase)
- 5.6 GetEffectorDataBlock (self, strKey, spBase, spDataBlock, spActiveDataBlock)
- 5.7 GetLastKeyTime (self)
- 5.8 GetLength (self)
- 5.9 GetLoopCount (self)
- 5.10 GetRtsClipControlName (self)
- 5.11 GetRtsLayerControlName (self)
- 5.12 GetSpeed (self)
- 5.13 GetStartOffset (self)
- 5.14 GetTransitionData (self)
- 5.15 GetTransitionRange (self)
- 5.16 GetTransitionStrength (self, bFadeIn)
- 5.17 GetTransitionType (self, bFadeIn)
- 5.18 GetType (self)
- 5.19 GetWeightLayerControlName (self)
- 5.20 SceneTimeToClipTime (self, kSceneTick)
- 5.21 SetLength (self, kLength)
- 5.22 SetRtsClipControlName (self, strName)
- 5.23 SetRtsLayerControlName (self, strName)
- 5.24 SetSpeed (self, fSpeed)
- 5.25 SetTransitionData (self, kData)
- 5.26 SetTransitionRange (self, kLength)
- 5.27 SetTransitionType (self, bFadeIn, eTransitionType, fTransitionStrength)
- 5.28 SetWeightLayerControlName (self, strName)
- 6 Properties
- Main article: iC8 Modules.
- Last modified: 10/21/2026
Description
An animation clip representes a sequence of connected motions. Different types of animations can be derived from composing clips and applying various clip operations. Animation clips are recorded for each character bone node or a scene object itself. One can access an animation clip's transform control via RIClip, to facilitate subsequent key operations.
Animation keys reside in clips:
Class Methods
RLPy.RIClip.ClipTimeToSceneTime(self, kClipTick)
Convert clip time to Scene time.
Parameters
- kClipTime[IN] clip time.
Returns
Scene time - RLPy.RLTime
1 # Get skeleton component
2 avatar_list = RLPy.RScene.GetAvatars()
3 avatar = avatar_list[0]
4 bone = avatar.GetSkeletonComponent()
5
6 # Clip time to scene time
7 clip_index = 1
8 clip = bone.GetClip(clip_index)
9 clip_time = RLPy.RTime(2000)
10 scene_time = clip.ClipTimeToSceneTime(clip_time)
RLPy.RIClip.GetClipLength(self)
Get length of the clip.
Affected by whether there is loop and adjusting speed.)
Returns
clip length - RLPy.RLTime
1 # No example
RLPy.RIClip.GetControl(self, strKey, spNode)
Get transform control of the bone node.
Parameters
- strKey[IN] Key of the controller, allowing use "Layer" as the key to retrieve the control of the Motion Layer in the clip - string
- spNode[IN] Specifies the corresponding node to get the control - RLPy.RIBase
Returns
Return the controller of the specified key. It will return null while not found or the key is invalid - RLPy.RControl
1 # Get skeleton component
2 avatar_list = RLPy.RScene.GetAvatars()
3 avatar = avatar_list[0]
4 bone = avatar.GetSkeletonComponent()
5
6 # Get transform control from bone root
7 clip_index = 1
8 clip = bone.GetClip(clip_index)
9 transform_control = clip.GetControl("Layer", bone.GetRootBone())
RLPy.RIClip.GetDataBlock(self, strKey, spBase)
Get DataBlock of specify data.
Parameters
- strKey[IN] Key of the controller, allowing use "Layer" as the key to retrieve the data block of the layer keys in the clip - string
- spBase[IN] Specifies the corresponding object to get the data block - RLPy.RIBase
Returns
Return the data block of the specified key. It will return null while not found or the key is invalid - RLPy.RDataBlock
1 # No example
RLPy.RIClip.GetEffectorDataBlock(self, strKey, spBase, spDataBlock, spActiveDataBlock)
Get DataBlock of effector.
Parameters
- strKey[IN] Key of the controller, allowing use "Layer" as the key to retrieve the data block of the layer keys in the clip - string
- spBase[IN] Specifies the corresponding object to get the effector data block - RLPy.RIBase
spDataBlock[OUT] the translattion/rotation data block of effector - RLPy.RDataBlock spActiveDataBlock[OUT] the active data block of effector - RLPy.RDataBlock
Returns
- RLPy.RStatus.Success - Succeed
- RLPy.RStatus.Failure - Fail
1 # No example
RLPy.RIClip.GetLastKeyTime(self)
Get time of the last key in the clip.
Returns
time of the last key in the clip - RLPy.RLTime
1 # Get skeleton component
2 avatar_list = RLPy.RScene.GetAvatars()
3 avatar = avatar_list[0]
4 bone = avatar.GetSkeletonComponent()
5
6 # Get last key time
7 clip_index = 1
8 clip = bone.GetClip(clip_index)
9 last_key_time = clip.GetLastKeyTime()
RLPy.RIClip.GetLength(self)
Get length of the clip.
Returns
clip length - RLPy.RLTime
1 # Get skeleton component
2 avatar_list = RLPy.RScene.GetAvatars()
3 avatar = avatar_list[0]
4 bone = avatar.GetSkeletonComponent()
5
6 # Get clip length
7 clip_index = 1
8 clip = bone.GetClip(clip_index)
9 clip_len = clip.GetLength()
RLPy.RIClip.GetLoopCount(self)
get the loop count of the clip
Returns
loop count - float
1 # No example
RLPy.RIClip.GetSpeed(self)
get the speed of the clip
Returns
clip speed - float
1 # No example
RLPy.RIClip.GetTransitionData(self)
Get transition data of the clip.
Returns
list of the transition time [fade-in start, fade-in end, fade-out start, fade- out end] - list
1 # No example
RLPy.RIClip.GetTransitionRange(self)
Get fade-in transition time.
Returns
transition time - RLPy.RLTime
1 # No example
RLPy.RIClip.GetTransitionStrength(self, bFadeIn)
Get transition strength of the clip.
Parameters
- bFadeIn[IN] true: fade-in, false: fade-out - bool
Returns
Transition strength of the clip (0~100) - float
1 # No example
RLPy.RIClip.GetTransitionType(self, bFadeIn)
Get transition type of the clip.
Parameters
- bFadeIn[IN] true: fade-in, false: fade-out - bool
Returns
Transition type of the clip - RLPy.ETransitionType
- RLPy.ETransitionType_Invalid Invalid value.
- RLPy.ETransitionType_None None.
- RLPy.ETransitionType_Linear Linear.
- RLPy.ETransitionType_Step Step.
- RLPy.ETransitionType_Ease_Out Ease out.
- RLPy.ETransitionType_Ease_In Ease in.
- RLPy.ETransitionType_Ease_Out_In Ease out in.
- RLPy.ETransitionType_Ease_In_Out Ease in out.
- RLPy.ETransitionType_Ease_In_Sine Ease in sine.
- RLPy.ETransitionType_Ease_Out_Sine Ease out sine.
- RLPy.ETransitionType_Ease_In_Out_Sine Ease in out sine.
- RLPy.ETransitionType_Ease_In_Quad Ease in quad.
- RLPy.ETransitionType_Ease_Out_Quad Ease out quad.
- RLPy.ETransitionType_Ease_In_Out_Quad Ease in out quad.
- RLPy.ETransitionType_Ease_In_Cubic Ease in cubic.
- RLPy.ETransitionType_Ease_Out_Cubic Ease in out cubic.
- RLPy.ETransitionType_Ease_In_Out_Cubic Ease in out cubic.
- RLPy.ETransitionType_Ease_In_Quart Ease in quart.
- RLPy.ETransitionType_Ease_Out_Quart Ease out quart.
- RLPy.ETransitionType_Ease_In_Out_Quart Ease in out quart.
- RLPy.ETransitionType_Ease_In_Quint Ease in quint.
- RLPy.ETransitionType_Ease_Out_Quint Ease out quint.
- RLPy.ETransitionType_Ease_In_Out_Quint Ease in out quint.
- RLPy.ETransitionType_Ease_In_Expo Ease in expo.
- RLPy.ETransitionType_Ease_Out_Expo Ease out expo.
- RLPy.ETransitionType_Ease_In_Out_Expo Ease in out expo.
- RLPy.ETransitionType_Ease_In_Circ Ease in circ.
- RLPy.ETransitionType_Ease_Out_Circ Ease out circ.
- RLPy.ETransitionType_Ease_In_Out_Circ Ease in out circ.
- RLPy.ETransitionType_Ease_In_Back Ease in back.
- RLPy.ETransitionType_Ease_Out_Back Ease out back.
- RLPy.ETransitionType_Ease_In_Out_Back Ease in out back.
- RLPy.ETransitionType_Ease_In_Elastic Ease in elastic.
- RLPy.ETransitionType_Ease_Out_Elastic Ease out elastic.
- RLPy.ETransitionType_Ease_In_Out_Elastic Ease in out elastic.
- RLPy.ETransitionType_Ease_In_Bounce Ease in bounce.
- RLPy.ETransitionType_Ease_Out_Bounce Ease out bounce.
- RLPy.ETransitionType_Ease_In_Out_Bounce Ease in out bounce.
- RLPy.ETransitionType_Last Last.
- RLPy.ETransitionType_Count
1 # No example
RLPy.RIClip.GetType(self)
Get type of the clip.
Returns
clip type - int
1 # No example
RLPy.RIClip.SceneTimeToClipTime(self, kSceneTick)
Convert Scene time to clip time.
Parameters
- kSceneTime[IN] Scene time.
Returns
clip time - RLPy.RLTime
1 # Get skeleton component
2 avatar_list = RLPy.RScene.GetAvatars()
3 avatar = avatar_list[0]
4 bone = avatar.GetSkeletonComponent()
5
6 # Scene time to clip time
7 clip_index = 1
8 clip = bone.GetClip(clip_index)
9 scene_time = RLPy.RTime(13000)
10 clip_time = clip.SceneTimeToClipTime(scene_time)
RLPy.RIClip.SetLength(self, kLength)
Set length of the clip.
Parameters
- kLength[IN] clip length - RLPy.RLTime
Returns
- RLPy.RStatus.Success - Succeed
- RLPy.RStatus.Failure - Fail
1 # Get skeleton component
2 avatar_list = RLPy.RScene.GetAvatars()
3 avatar = avatar_list[0]
4 bone = avatar.GetSkeletonComponent()
5
6 # Set clip length
7 clip_index = 1
8 clip = bone.GetClip(clip_index)
9 clip_len = RLPy.RTime(2000)
10 clip.SetLength(clip_len)
RLPy.RIClip.SetSpeed(self, fSpeed)
set the speed of the clip
Parameters
- fSpeed[IN] speed of the clip - float
Returns
- RLPy.RStatus.Success - Succeed
- RLPy.RStatus.Failure - Fail
1 # No example
RLPy.RIClip.SetTransitionData(self, kData)
Modify the transition time.
Returns
- kData [IN] list of the transition time [fade-in start, fade-in end, fade-out start, fade-out end] - RLPy.RStatus
Returns
- RLPy.RStatus.Success - Succeed
- RLPy.RStatus.Failure - Fail
1 # No example
RLPy.RIClip.SetTransitionRange(self, kLength)
Modify the fade-in transition time.
Parameters
- kLength[IN] length of transition time - RLPy.RLTime
Returns
- RLPy.RStatus.Success - Succeed
- RLPy.RStatus.Failure - Fail
1 # No example
RLPy.RIClip.SetTransitionType(self, bFadeIn, eTransitionType, fTransitionStrength)
Set transition type of the clip.
Parameters
- bFadeIn[IN] true: fade-in, false: fade-out - bool
- eTransitionType[IN] Transition type of the clip - RLPy.ETransitionType
- RLPy.ETransitionType_Invalid Invalid value.
- RLPy.ETransitionType_None None.
- RLPy.ETransitionType_Linear Linear.
- RLPy.ETransitionType_Step Step.
- RLPy.ETransitionType_Ease_Out Ease out.
- RLPy.ETransitionType_Ease_In Ease in.
- RLPy.ETransitionType_Ease_Out_In Ease out in.
- RLPy.ETransitionType_Ease_In_Out Ease in out.
- RLPy.ETransitionType_Ease_In_Sine Ease in sine.
- RLPy.ETransitionType_Ease_Out_Sine Ease out sine.
- RLPy.ETransitionType_Ease_In_Out_Sine Ease in out sine.
- RLPy.ETransitionType_Ease_In_Quad Ease in quad.
- RLPy.ETransitionType_Ease_Out_Quad Ease out quad.
- RLPy.ETransitionType_Ease_In_Out_Quad Ease in out quad.
- RLPy.ETransitionType_Ease_In_Cubic Ease in cubic.
- RLPy.ETransitionType_Ease_Out_Cubic Ease in out cubic.
- RLPy.ETransitionType_Ease_In_Out_Cubic Ease in out cubic.
- RLPy.ETransitionType_Ease_In_Quart Ease in quart.
- RLPy.ETransitionType_Ease_Out_Quart Ease out quart.
- RLPy.ETransitionType_Ease_In_Out_Quart Ease in out quart.
- RLPy.ETransitionType_Ease_In_Quint Ease in quint.
- RLPy.ETransitionType_Ease_Out_Quint Ease out quint.
- RLPy.ETransitionType_Ease_In_Out_Quint Ease in out quint.
- RLPy.ETransitionType_Ease_In_Expo Ease in expo.
- RLPy.ETransitionType_Ease_Out_Expo Ease out expo.
- RLPy.ETransitionType_Ease_In_Out_Expo Ease in out expo.
- RLPy.ETransitionType_Ease_In_Circ Ease in circ.
- RLPy.ETransitionType_Ease_Out_Circ Ease out circ.
- RLPy.ETransitionType_Ease_In_Out_Circ Ease in out circ.
- RLPy.ETransitionType_Ease_In_Back Ease in back.
- RLPy.ETransitionType_Ease_Out_Back Ease out back.
- RLPy.ETransitionType_Ease_In_Out_Back Ease in out back.
- RLPy.ETransitionType_Ease_In_Elastic Ease in elastic.
- RLPy.ETransitionType_Ease_Out_Elastic Ease out elastic.
- RLPy.ETransitionType_Ease_In_Out_Elastic Ease in out elastic.
- RLPy.ETransitionType_Ease_In_Bounce Ease in bounce.
- RLPy.ETransitionType_Ease_Out_Bounce Ease out bounce.
- RLPy.ETransitionType_Ease_In_Out_Bounce Ease in out bounce.
- RLPy.ETransitionType_Last Last.
- RLPy.ETransitionType_Count
- fTransitionStrength[IN] Transition strength of the clip (0~100) - float
Returns
- RLPy.RStatus.Success - Succeed
- RLPy.RStatus.Failure - Fail
1 # No example
Description
left|frame|Animation keys reside in clips. An animation clip representes a sequence of connected motions. Different types of animations can be derived from composing clips and applying various clip operations. Animation clips are recorded for each character bone node or a scene object itself. One can access an animation clip's transform control via RIClip, to facilitate subsequent key operations.
Constructor & Destructor
__init__ (self, *args, **kwargs)
Initializes a new ri clip instance.
Parameters
- args
- kwargs
Member Functions
AddTimecodeData (self, fFps, fMilliseconds)
Adds timecode data to clip.
Parameters
- fFps
- fMilliseconds
ClipTimeToSceneTime (self, kClipTick)
Convert a point in time within this clip to scene time. If a given object does not have a clip or if the clip index exceeds the total number of clips, then return the clip time instead. See Also: SceneTimeToClipTime
Parameters
- kClipTick
GetClipLength (self)
Gets length of the clip.(Affected by whether there is loop and adjusting speed.).
GetControl (self, strKey, spNode)
Get the transform control for a character's bone node or scene object according to the clip index. At the present, only "Layer" is supported as the clip key. If the character's skeleton bone node or the scene object does not have a clip or if the clip index is larger than the total number of clips, return None.
Parameters
- strKey
- spNode
GetDataBlock (self, strKey, spBase)
Gets DataBlock of specify data.
Parameters
- strKey
- spBase
GetEffectorDataBlock (self, strKey, spBase, spDataBlock, spActiveDataBlock)
Gets DataBlock of effector.
Parameters
- strKey
- spBase
- spDataBlock
- spActiveDataBlock
GetLastKeyTime (self)
Get the final key time on a scene object clip.
GetLength (self)
Get the length of this clip. If this clip does not contain a key then return RTime(0).
GetLoopCount (self)
Gets the loop count of the clip.
GetRtsClipControlName (self)
Gets name of RTS clip control.
GetRtsLayerControlName (self)
Gets name of RTS layer control.
GetSpeed (self)
Gets the speed of the clip.
GetStartOffset (self)
Gets start offset of the clip.
GetTransitionData (self)
Gets transition data of the clip.
GetTransitionRange (self)
Gets fade-in transition time.
GetTransitionStrength (self, bFadeIn)
Gets transition strength of the clip.
Parameters
- bFadeIn
GetTransitionType (self, bFadeIn)
Gets transition type of the clip.
Parameters
- bFadeIn
GetType (self)
Gets type of the clip.
GetWeightLayerControlName (self)
Gets name of weight layer control.
SceneTimeToClipTime (self, kSceneTick)
Convert a point in time within the scene to clip time. If a given object does not have a clip or if the clip index exceeds the total number of clips, then return scene time instead. See Also: ClipTimeToSceneTime
Parameters
- kSceneTick
SetLength (self, kLength)
Set the length of this clip.
Parameters
- kLength
SetRtsClipControlName (self, strName)
Sets name of RTS clip control.
Parameters
- strName
SetRtsLayerControlName (self, strName)
Sets name of RTS layer control.
Parameters
- strName
SetSpeed (self, fSpeed)
Sets the speed of the clip.
Parameters
- fSpeed
SetTransitionData (self, kData)
Modify the transition time.
Parameters
- kData
SetTransitionRange (self, kLength)
Modify the fade-in transition time.
Parameters
- kLength
SetTransitionType (self, bFadeIn, eTransitionType, fTransitionStrength)
Sets transition type of the clip.
Parameters
- bFadeIn
- eTransitionType
- fTransitionStrength
SetWeightLayerControlName (self, strName)
Sets name of weight layer control.
Parameters
- strName
Properties
thisown
Indicates whether this SWIG proxy owns the underlying C++ object.
