IC Python API:RLPy RIClip

From Reallusion Wiki!
Jump to: navigation, search
Main article: Modules.

Inheritance

This class inherits public member functions from:

Detailed Description

This class is used to access the clip data of the animation.

avatar_list = RLPy.RScene.GetAvatars()
avatar = avatar_list[0]
bone = avatar.GetSkeletonComponent()
clip = bone.GetClip(0)

# clip length
clip.SetLength(RLPy.RTime(5000))
print(clip.GetLength().GetValue())

# get layer control of rootbone
control = clip.GetControl("Layer", bone.GetRootBone())

# convert scene time to clip time
system_time = RLPy.RTime(13000)
clip_time = clip.SceneTimeToClipTime(system_time)

Member Functions

ClipTimeToSceneTime

RLPy.RIClip.ClipTimeToSceneTime ( self, kClipTime )

Convert clip time to Scene time.

Parameters

kClipTime [IN] clip time - RLPy.RTime

Returns

Scene time - RLPy.RTime

GetControl

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

GetLastKeyTime

RLPy.RIClip.GetLastKeyTime ( self )

Get time of the last key in the clip.

Returns

Time of the last key in the clip - RLPy.RTime

GetLength

RLPy.RIClip.GetLength ( self )

Get length of the clip.

Returns

Clip length - RLPy.RTime

SceneTimeToClipTime

RLPy.RIClip.SceneTimeToClipTime ( self, kSceneTime )

Convert Scene time to clip time.

Parameters

kSceneTime [IN] Scene time - RLPy.RTime

Returns

Clip time - RLPy.RTime

SetLength

RLPy.RIClip.SetLength ( self, kLength )

Set length of the clip.

Parameters

kLength [IN] clip length - RLPy.RTime

Return Values

RLPy.RStatus.Success Success

RLPy.RStatus.Failure Fail