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.

Parameters:

op_class (type(Class)) –

Return type:

int32

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:
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:
create_retarget_pose(new_pose_name, source_or_target) Name

Add new retarget pose. Returns the name of the new retarget pose.

Parameters:
Return type:

Name

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:
Return type:

Name

get_all_chain_settings() Array[RetargetChainSettings]

Get read-only access to the list of settings for each target chain

Return type:

Array[RetargetChainSettings]

classmethod get_controller(retargeter_asset) IKRetargeterController

Use this to get the controller for the given retargeter asset

Parameters:

retargeter_asset (IKRetargeter) –

Return type:

IKRetargeterController

get_current_retarget_pose(source_or_target) IKRetargetPose

Get the current retarget pose

Parameters:

source_or_target (RetargetSourceOrTarget) –

Return type:

IKRetargetPose

get_current_retarget_pose_name(source_or_target) Name

Get the current retarget pose

Parameters:

source_or_target (RetargetSourceOrTarget) –

Return type:

Name

get_global_settings() RetargetGlobalSettings

Get a copy of the global settings for this asset.

Return type:

RetargetGlobalSettings

get_ik_rig(source_or_target) IKRigDefinition

Get either source or target IK Rig

Parameters:

source_or_target (RetargetSourceOrTarget) –

Return type:

IKRigDefinition

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:

SkeletalMesh

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:

TargetChainSettings

get_retarget_op_at_index(index) RetargetOpBase

Get access to the given retarget operation.

Parameters:

index (int32) –

Return type:

RetargetOpBase

get_retarget_op_enabled(retarget_op_index) bool

Get enabled status of the given Op.

Parameters:

retarget_op_index (int32) –

Return type:

bool

get_retarget_poses(source_or_target) Map[Name, IKRetargetPose]

Get access to array of retarget poses

Parameters:

source_or_target (RetargetSourceOrTarget) –

Return type:

Map[Name, IKRetargetPose]

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:

Vector

get_root_settings() TargetRootSettings

Get a copy of the retarget root settings for this asset.

Return type:

TargetRootSettings

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:
Return type:

Quat

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).

Parameters:

target_chain_name (Name) –

Return type:

Name

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:

bool

remove_all_ops() bool

Remove all ops in the stack.

Return type:

bool

remove_retarget_op(op_index) bool

Remove the retarget op at the given stack index.

Parameters:

op_index (int32) –

Return type:

bool

remove_retarget_pose(pose_to_remove, source_or_target) bool

Remove a retarget pose. Returns true if the pose was found and removed.

Parameters:
Return type:

bool

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:
Return type:

bool

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:
set_current_retarget_pose(current_pose, source_or_target) bool

Change which retarget pose is used by the retargeter at runtime

Parameters:
Return type:

bool

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:
set_preview_mesh(source_or_target, preview_mesh) None

Set the preview skeletal mesh for either source or target

Parameters:
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:
Return type:

bool

set_retarget_op_enabled(retarget_op_index, is_enabled) bool

Set enabled/disabled status of the given retarget operation.

Parameters:
  • retarget_op_index (int32) –

  • is_enabled (bool) –

Return type:

bool

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:
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:
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.

Parameters:
  • source_chain_name (Name) –

  • target_chain_name (Name) –

Return type:

bool

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: