IC8 Python API:RLPy RISkeletonComponent
Contents
- 1 Description
- 2 Class Methods
- 2.1 RLPy.RISkeletonComponent.AddClip(self, kTime)
- 2.2 RLPy.RISkeletonComponent.BakeFkToIk(self, kTime, bAllClip)
- 2.3 RLPy.RISkeletonComponent.BreakClip(self, kTime)
- 2.4 RLPy.RISkeletonComponent.ConvertBoneAxisAndParent(self, kAxisMaps, kReParentMaps, bIncludeDummyNode = True)
- 2.5 RLPy.RISkeletonComponent.ConvertToMotionBoneWorldTransforms(self)
- 2.6 RLPy.RISkeletonComponent.ConvertToOriginalBoneAxis(self, bIncludeDummyNode = True)
- 2.7 RLPy.RISkeletonComponent.FlattenMotionClip(self, spClip)
- 2.8 RLPy.RISkeletonComponent.GetBoneTPosePosition(self, spBone)
- 2.9 RLPy.RISkeletonComponent.GetClip(self, uIndex)
- 2.10 RLPy.RISkeletonComponent.GetClipByTime(self, kHitTime)
- 2.11 RLPy.RISkeletonComponent.GetClipCount(self)
- 2.12 RLPy.RISkeletonComponent.GetEffector(self, eEffector)
- 2.13 RLPy.RISkeletonComponent.GetReach(self, eEffector)
- 2.14 RLPy.RISkeletonComponent.GetRootBone(self)
- 2.15 RLPy.RISkeletonComponent.GetSelectedBones(self)
- 2.16 RLPy.RISkeletonComponent.GetSkinBones(self)
- 2.17 RLPy.RISkeletonComponent.IsBoneAnimated(self, spBone)
- 2.18 RLPy.RISkeletonComponent.MergeClips(self, spClip1, spClip2)
- 2.19 RLPy.RISkeletonComponent.SampleMotionClip(self, spClip, bOptimize = True)
- 2.20 RLPy.RISkeletonComponent.SetBoneTPosePosition(self, spBone, kPos)
- Main article: iC8 Modules.
- Last modified: 12/28/2022
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