unreal.IKRetargeterController
¶
- class unreal.IKRetargeterController(outer: Object | None = None, name: Name | str = 'None')¶
Bases:
Object
A stateless singleton (1-per-asset) class used to make modifications to a UIKRetargeter asset. Use UIKRetargeter.GetController() to get the controller for the asset you want to modify.
C++ Source:
Plugin: IKRig
Module: IKRigEditor
File: IKRetargeterController.h
- add_retarget_op(op_class) int32 ¶
Add a new retarget op of the given type to the bottom of the stack. Returns the stack index.
- auto_align_all_bones(source_or_target) None ¶
Automatically align all bones in mapped chains and store in the current retarget pose.
- Parameters:
source_or_target (RetargetSourceOrTarget) –
- auto_align_bones(bones_to_align, method, source_or_target) None ¶
Automatically align an array of bones and store in the current retarget pose. Bones not in a mapped chain will be ignored.
- Parameters:
method (RetargetAutoAlignMethod) –
source_or_target (RetargetSourceOrTarget) –
- auto_map_chains(auto_map_type, force_remap) None ¶
Use fuzzy string search to find “best” Source chain to map to each Target chain
- Parameters:
auto_map_type (AutoMapChainType) –
force_remap (bool) –
- create_retarget_pose(new_pose_name, source_or_target) Name ¶
Add new retarget pose. Returns the name of the new retarget pose.
- Parameters:
new_pose_name (Name) –
source_or_target (RetargetSourceOrTarget) –
- Return type:
- duplicate_retarget_pose(pose_to_duplicate, new_name, source_or_target) Name ¶
Duplicate a retarget pose. Returns the name of the new, duplicate pose (or NAME_None if PoseToDuplicate is not found).
- Parameters:
pose_to_duplicate (Name) –
new_name (Name) –
source_or_target (RetargetSourceOrTarget) –
- Return type:
- get_all_chain_settings() Array[RetargetChainSettings] ¶
Get read-only access to the list of settings for each target chain
- Return type:
- classmethod get_controller(retargeter_asset) IKRetargeterController ¶
Use this to get the controller for the given retargeter asset
- Parameters:
retargeter_asset (IKRetargeter) –
- Return type:
- get_current_retarget_pose(source_or_target) IKRetargetPose ¶
Get the current retarget pose
- Parameters:
source_or_target (RetargetSourceOrTarget) –
- Return type:
- get_current_retarget_pose_name(source_or_target) Name ¶
Get the current retarget pose
- Parameters:
source_or_target (RetargetSourceOrTarget) –
- Return type:
- get_global_settings() RetargetGlobalSettings ¶
Get a copy of the global settings for this asset.
- Return type:
- get_ik_rig(source_or_target) IKRigDefinition ¶
Get either source or target IK Rig
- Parameters:
source_or_target (RetargetSourceOrTarget) –
- Return type:
- get_index_of_retarget_op(retarget_op) int32 ¶
Get access to the given retarget operation.
- Parameters:
retarget_op (RetargetOpBase) –
- Return type:
int32
- get_num_retarget_ops() int32 ¶
Get the number of Ops in the stack.
- Return type:
int32
- get_preview_mesh(source_or_target) SkeletalMesh ¶
Get the preview skeletal mesh
- Parameters:
source_or_target (RetargetSourceOrTarget) –
- Return type:
- get_retarget_chain_settings(target_chain_name) TargetChainSettings ¶
Get a copy of the settings for the target chain by name.
- Parameters:
target_chain_name (Name) –
- Return type:
- get_retarget_op_at_index(index) RetargetOpBase ¶
Get access to the given retarget operation.
- Parameters:
index (int32) –
- Return type:
- get_retarget_op_enabled(retarget_op_index) bool ¶
Get enabled status of the given Op.
- Parameters:
retarget_op_index (int32) –
- Return type:
- get_retarget_poses(source_or_target) Map[Name, IKRetargetPose] ¶
Get access to array of retarget poses
- Parameters:
source_or_target (RetargetSourceOrTarget) –
- Return type:
- get_root_offset_in_retarget_pose(source_or_target) Vector ¶
Get the translation offset on the retarget root bone for the current retarget pose
- Parameters:
source_or_target (RetargetSourceOrTarget) –
- Return type:
- get_root_settings() TargetRootSettings ¶
Get a copy of the retarget root settings for this asset.
- Return type:
- get_rotation_offset_for_retarget_pose_bone(bone_name, source_or_target) Quat ¶
Get a delta rotation for a given bone for the current retarget pose
- Parameters:
bone_name (Name) –
source_or_target (RetargetSourceOrTarget) –
- Return type:
- get_source_chain(target_chain_name) Name ¶
Get the name of the source chain mapped to a given target chain (the chain animation is copied FROM).
- move_retarget_op_in_stack(op_to_move_index, target_index) bool ¶
Move the retarget op at the given index to the target index.
- Parameters:
op_to_move_index (int32) –
target_index (int32) –
- Return type:
- remove_retarget_op(op_index) bool ¶
Remove the retarget op at the given stack index.
- Parameters:
op_index (int32) –
- Return type:
- remove_retarget_pose(pose_to_remove, source_or_target) bool ¶
Remove a retarget pose. Returns true if the pose was found and removed.
- Parameters:
pose_to_remove (Name) –
source_or_target (RetargetSourceOrTarget) –
- Return type:
- rename_retarget_pose(old_pose_name, new_pose_name, source_or_target) bool ¶
Rename current retarget pose. Returns true if a pose was renamed.
- Parameters:
old_pose_name (Name) –
new_pose_name (Name) –
source_or_target (RetargetSourceOrTarget) –
- Return type:
- reset_retarget_pose(pose_to_reset, bones_to_reset, source_or_target) None ¶
Reset a retarget pose for the specified bones. If BonesToReset is Empty, will removes all stored deltas, returning pose to reference pose
- Parameters:
pose_to_reset (Name) –
source_or_target (RetargetSourceOrTarget) –
- set_current_retarget_pose(current_pose, source_or_target) bool ¶
Change which retarget pose is used by the retargeter at runtime
- Parameters:
current_pose (Name) –
source_or_target (RetargetSourceOrTarget) –
- Return type:
- set_global_settings(global_settings) None ¶
Get a copy of the global settings for this asset.
- Parameters:
global_settings (RetargetGlobalSettings) –
- set_ik_rig(source_or_target, ik_rig) None ¶
Set the IK Rig to use as the source or target (to copy animation FROM/TO)
- Parameters:
source_or_target (RetargetSourceOrTarget) –
ik_rig (IKRigDefinition) –
- set_preview_mesh(source_or_target, preview_mesh) None ¶
Set the preview skeletal mesh for either source or target
- Parameters:
source_or_target (RetargetSourceOrTarget) –
preview_mesh (SkeletalMesh) –
- set_retarget_chain_settings(target_chain_name, settings) bool ¶
Set the settings for the target chain by name. Returns true if the chain settings were applied, false otherwise.
- Parameters:
target_chain_name (Name) –
settings (TargetChainSettings) –
- Return type:
- set_retarget_op_enabled(retarget_op_index, is_enabled) bool ¶
Set enabled/disabled status of the given retarget operation.
- set_root_offset_in_retarget_pose(translation_offset, source_or_target) None ¶
Set the translation offset on the retarget root bone for the current retarget pose
- Parameters:
translation_offset (Vector) –
source_or_target (RetargetSourceOrTarget) –
- set_root_settings(root_settings) None ¶
Set the retarget root settings for this asset.
- Parameters:
root_settings (TargetRootSettings) –
- set_rotation_offset_for_retarget_pose_bone(bone_name, rotation_offset, skeleton_mode) None ¶
Set a delta rotation for a given bone for the current retarget pose
- Parameters:
bone_name (Name) –
rotation_offset (Quat) –
skeleton_mode (RetargetSourceOrTarget) –
- set_source_chain(source_chain_name, target_chain_name) bool ¶
Assign a source chain to the given target chain. Animation will be copied from the source to the target.
- snap_bone_to_ground(reference_bone, source_or_target) None ¶
Moves the entire skeleton vertically until the specified bone is the same height off the ground as in the reference pose.
- Parameters:
reference_bone (Name) –
source_or_target (RetargetSourceOrTarget) –