IC8 Python API:RLPy RISkeletonComponent

From Reallusion Wiki!
Jump to: navigation, search

Contents

Main article: iC8 Modules.
Last modified: 10/21/2026

Description

Class Methods

RLPy.RISkeletonComponent.AddClip(self, kTime)

Add body motion clip.

Experimental API

Parameters

kTime[IN] The time at which to add the clip - RLPy.RLTime

Returns

Pointer to the clip - RLPy.RIClip

1 # No example

RLPy.RISkeletonComponent.BakeFkToIk(self, kTime, bAllClip)

Bake the FK result to IK.

Experimental API

Parameters

kTime[IN] time to bake - RLPy.RLTime
bAllClip[IN] if bAllClip is true, it will bake all keys in the range of the clip. otherwise it will only set the IK key on kTime - bool

Returns

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

RLPy.RISkeletonComponent.BreakClip(self, kTime)

Break the clip at that time according to the specified time.

Experimental API

Parameters

kTime[IN] specified time - RLPy.RLTime

Returns

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

RLPy.RISkeletonComponent.ConvertBoneAxisAndParent(self, kAxisMaps, kReParentMaps, bIncludeDummyNode = True)

This function can calculate new transform based on axis matrix maps and parent maps.

Experimental API

Parameters

kAxisMaps[IN] The axis conversion of the bone according to this axis map - RLPy.RMatrix4f
kReParentMaps[IN] Define the new parent of the skeleton, calculate the new local transform will get according to the new parent - string
bIncludeDummyNode[IN] Decide if this conversion wants to include dummy nodes - bool

Returns

Each Bone transform calculated from the Axis map and the paren map - list

1 # No example

RLPy.RISkeletonComponent.ConvertToMotionBoneWorldTransforms(self)

Convert to motion bone world transforms.

Returns

Motion bone world transforms - string

1 # No example

RLPy.RISkeletonComponent.ConvertToOriginalBoneAxis(self, bIncludeDummyNode = True)

This function can calculate all the skin bones based on the original bone's axis to calculate the current local transform.

Experimental API

Parameters

bIncludeDummyNode[IN] Decide if this conversion wants to include dummy nodes - bool

Returns

Local transform calculated from the original axis of the bone. If the return is empty, it means that the object has no original axial direction - list

1 # No example

RLPy.RISkeletonComponent.FlattenMotionClip(self, spClip)

The Flatten function merges all of the Layer Keys into the motion clip.

Experimental API

Parameters

spClip[IN] Flatten the specified clip - RLPy.RIClip

Returns

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

RLPy.RISkeletonComponent.GetBoneTPosePosition(self, spBone)

Get TPose of the specify bone.

Parameters

spBone[IN] bone object - RLPy.RINode

Returns

Specify the TPose position of the bone - RLPy.RVector3f

1 # No example

RLPy.RISkeletonComponent.GetClip(self, uIndex)

Get clip of the bone.

Parameters

uIndex[IN] Index of the clip - int

Returns

Pointer to the clip - RLPy.RIClip

1 skeleton_component = avatar.GetSkeletonComponent()
2 print(skeleton_component.GetClip(0))

RLPy.RISkeletonComponent.GetClipByTime(self, kHitTime)

Get motion clip.

Parameters

kHitTime[IN] time during clip range - RLPy.RLTime

Returns

Pointer to the clip - RLPy.RIClip

1 # No example

RLPy.RISkeletonComponent.GetClipCount(self)

Get number of clips.

Returns

Number of clips - int

1 skeleton_component = avatar.GetSkeletonComponent()
2 print(skeleton_component.GetClipCount())

RLPy.RISkeletonComponent.GetEffector(self, eEffector)

Get human IK effector component of the object.

Parameters

eEffector[IN] Specify the effector you want to access - RLPy.EHikEffector
  • RLPy.EHikEffector_Invalid
  • RLPy.EHikEffector_Hip
  • RLPy.EHikEffector_LeftFoot
  • RLPy.EHikEffector_RightFoot
  • RLPy.EHikEffector_LeftHand
  • RLPy.EHikEffector_RightHand
  • RLPy.EHikEffector_LeftKnee
  • RLPy.EHikEffector_RightKnee
  • RLPy.EHikEffector_LeftElbow
  • RLPy.EHikEffector_RightElbow
  • RLPy.EHikEffector_ChestOrigin
  • RLPy.EHikEffector_Neck
  • RLPy.EHikEffector_LeftToe
  • RLPy.EHikEffector_RightToe
  • RLPy.EHikEffector_LeftShoulder
  • RLPy.EHikEffector_RightShoulder
  • RLPy.EHikEffector_Head
  • RLPy.EHikEffector_LeftHip
  • RLPy.EHikEffector_RightHip
  • RLPy.EHikEffector_Quantity

Returns

Pointer of the RIEffector object - RLPy.RIEffector

1 # No example

RLPy.RISkeletonComponent.GetReach(self, eEffector)

Get human IK reach of the object.

Parameters

eEffector[IN] Specify the effector you want to access - RLPy.EHikEffector
  • RLPy.EHikEffector_Invalid
  • RLPy.EHikEffector_Hip
  • RLPy.EHikEffector_LeftFoot
  • RLPy.EHikEffector_RightFoot
  • RLPy.EHikEffector_LeftHand
  • RLPy.EHikEffector_RightHand
  • RLPy.EHikEffector_LeftKnee
  • RLPy.EHikEffector_RightKnee
  • RLPy.EHikEffector_LeftElbow
  • RLPy.EHikEffector_RightElbow
  • RLPy.EHikEffector_ChestOrigin
  • RLPy.EHikEffector_Neck
  • RLPy.EHikEffector_LeftToe
  • RLPy.EHikEffector_RightToe
  • RLPy.EHikEffector_LeftShoulder
  • RLPy.EHikEffector_RightShoulder
  • RLPy.EHikEffector_Head
  • RLPy.EHikEffector_LeftHip
  • RLPy.EHikEffector_RightHip
  • RLPy.EHikEffector_Quantity

Returns

Pointer of the RIReach object - RLPy.RIReach

1 # No example

RLPy.RISkeletonComponent.GetRootBone(self)

Get root bone.

Returns

Pointer to root bone - RLPy.RINode

1 skeleton_component = avatar.GetSkeletonComponent()
2 root_bone = skeleton_component.GetRootBone()
3 print(root_bone.GetName())

RLPy.RISkeletonComponent.GetSelectedBones(self)

Get selected bone.

Returns

Selected bones - list

1 skeleton_component = avatar.GetSkeletonComponent()
2 selected_bones = skeleton_component.GetSelectedBones()
3 print(len(selected_bones))

RLPy.RISkeletonComponent.GetSkinBones(self)

Get skin bones of avatar.

Returns

Skin bone nodes - list

1 skeleton_component = avatar.GetSkeletonComponent()
2 motion_bones = skeleton_component.GetSkinBones()
3 print(len(motion_bones))

RLPy.RISkeletonComponent.IsBoneAnimated(self, spBone)

Check the bone can animate.

Experimental API

Parameters

spBone[IN] bone node - RLPy.RINode

Returns

the bone can animate or not - bool

1 # No example

RLPy.RISkeletonComponent.MergeClips(self, spClip1, spClip2)

Merge two clips.

Experimental API

Parameters

spClip1[IN] specified clip one - RLPy.RIClip
spClip2[IN] specified clip two - RLPy.RIClip

Returns

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

RLPy.RISkeletonComponent.SampleMotionClip(self, spClip, bOptimize = True)

The Sample function is used to expose the contents of a motion or animation clip as Layer Keys.

Experimental API

Parameters

spClip[IN] Sample specified clip - RLPy.RIClip
bOptimize[IN] Provide an optimized way to sample motion clips, otherwise every frame will be sampled, which is enabled by default - bool

Returns

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

RLPy.RISkeletonComponent.SetBoneTPosePosition(self, spBone, kPos)

Set TPose of the specify bone.

Parameters

spBone[IN] bone object - RLPy.RINode
kPos[IN] specify the TPose position of the bone - RLPy.RVector3f

Returns

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

Description

frame|left|Motion bones are responsible for retargeting motion between different characters of different sizes and proportions. This class is mainly used to get all the bones, skeleton states, and animation clips inside an object. If the control object of this component is RIAvatar, then the motion bones will be retrieved. For other objects, the skin bones will be returned. For avatars, the motion bones will be present mainly for retargeting purchases, which are also responsible for driving the skin bones.

Constructor & Destructor

__init__ (self, *args, **kwargs)

Initializes a new ri skeleton component instance.

Parameters

  • args
  • kwargs

Member Functions

AddClip (self, kTime)

Adds body motion clip.

Parameters

  • kTime

AutoPosition (self, spBone)

Automatically position a bone while adjusting the avatar T-Pose.

Parameters

  • spBone

BakeFkToIk (self, kTime, bAllClip)

Bakes the FK result to IK.

Parameters

  • kTime
  • bAllClip

BreakClip (self, kTime)

Break the clip at that time according to the specified time.

Parameters

  • kTime

ConvertBoneAxisAndParent (self, kAxisMaps, kReParentMaps, kInsertBoneInfo, bIncludeDummyNode=True)

This function can calculate new transform based on axis matrix maps and parent maps.

Parameters

  • kAxisMaps
  • kReParentMaps
  • kInsertBoneInfo
  • bIncludeDummyNode (default: True)

ConvertFramesToMotionBoneWorldTransforms (self, _from, to)

Converts frames to motion bone world transforms.

Parameters

  • _from
  • to

ConvertToMotionBoneWorldTransforms (self)

Converts to motion bone world transforms.

ConvertToOriginalBoneAxis (self, bIncludeDummyNode=True, bIncludeMeshNode=True)

This function can calculate all the skin bones based on the original bone's axis to calculate the current local transform.

Parameters

  • bIncludeDummyNode (default: True)
  • bIncludeMeshNode (default: True)

DeleteClip (self, spClip)

Deletes motion clip.

Parameters

  • spClip

FlattenMotionClip (self, spClip)

The Flatten function merges all of the Layer Keys into the motion clip.

Parameters

  • spClip

GetAllAnimationBone (self)

Gets only the animation bone.

GetBoneQniqueNames (self)

Gets skeleton bone name processed by avoiding name.

GetBoneTPosePosition (self, spBone)

Gets TPose of the specify bone.

Parameters

  • spBone

GetClip (self, uIndex)

Get the clip on the current object at the specified index. Currently, only works for body motion clips on the timeline for avatars and animation tracks for other object types. If the current object does not have a clip or if the index exceeds the number of existing clips then return None. See also: RIClip

Parameters

  • uIndex

GetClipByTime (self, kHitTime)

Gets motion clip.

Parameters

  • kHitTime

GetClipCount (self)

Get the total clip count for the current object. Currently, only works for body motion clips on the timeline for avatars and animation tracks for other object types. If a clip does not exist then return 0. See also: RIClip

GetEffector (self, eEffector)

Gets human IK effector component of the object.

Parameters

  • eEffector

GetFacialBone (self, eFacialBone)

Gets specified facial bone node of the avatar.

Parameters

  • eFacialBone

GetLookAtComponent (self)

Gets Look At component of the object.

GetReach (self, eEffector)

Gets human IK reach of the object.

Parameters

  • eEffector

GetRootBone (self)

Get the root bone of this skeleton component. See also: RINode

GetSelectedBones (self)

Get all of the selected bones on the current object. If no bones are selected for the current character, then an empty list is returned.

GetSkinBones (self)

Get the skin bones for the current object. Skin bones are the counterparts to the mesh skin, if this object is an avatar then the motion bones will drive the skin bones. See also: RINode

IsBoneAnimated (self, spBone)

Checks the bone can animate.

Parameters

  • spBone

MergeClips (self, spClip1, spClip2)

Merge two clips. And only adjacent clips can be merged.

Parameters

  • spClip1
  • spClip2

MirrorClip (self, spClip)

Mirror clip.

Parameters

  • spClip

SampleMotionClip (self, spClip, bOptimize=True)

The Sample function is used to expose the contents of a motion or animation clip as Layer Keys.

Parameters

  • spClip
  • bOptimize (default: True)

SetBoneTPosePosition (self, spBone, kPos)

Sets TPose of the specify bone.

Parameters

  • spBone
  • kPos

Properties

thisown

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