unreal.RetargetFKChainSettings

class unreal.RetargetFKChainSettings(target_chain_name: Name = 'None', enable_fk: bool = False, rotation_mode: FKChainRotationMode = Ellipsis, rotation_alpha: float = 0.0, translation_mode: FKChainTranslationMode = Ellipsis, translation_alpha: float = 0.0)

Bases: StructBase

Retarget FKChain Settings

C++ Source:

  • Plugin: IKRig

  • Module: IKRig

  • File: FKChainsOp.h

Editor Properties: (see get_editor_property/set_editor_property)

  • enable_fk (bool): [Read-Write] Whether to copy the shape of the chain from the source skeleton using the Rotation and Translation modes. Default is true. NOTE: All FK operations run before the IK pass to copy the shape of the FK chain from the source skeleton.

  • rotation_alpha (double): [Read-Write] Range +/- infinity. Default 1. Scales the amount of rotation that is applied. If Rotation Mode is None this parameter has no effect. Otherwise, this parameter blends the rotation of each bone in the chain from the base retarget pose (0) to the retargeted pose (1).

  • rotation_mode (FKChainRotationMode): [Read-Write] Determines how rotation is copied from the source chain to the target chain. Default is Interpolated. None: The rotation of each target bone in the chain is left at the reference pose. Interpolated: Source and target chains are normalized by their length, then each target bone rotation is generated by finding the rotation at the same normalized distance on the source chain and interpolating between the neighboring bones. One to One: Each target bone rotation is copied from the equivalent bone in the source chain, based on the order in the chain, starting at the root of the chain. If the target chain has more bones than the source, the extra bones will remain at their reference pose. One to One Reversed: Same as One-to-One, but starting from the tip of the chain. Match Chain: Uses a Spline-IK type method to orient the target joint chain to exactly match the shape of the source chain. Match Scaled Chain: Same as Match Chain, but scales the source chain to the same length as the target chain before running the match procedure. Copy Local: The local space rotation of the closest source bone is copied to the target. No retargeting is applied. Retarget pose is ignored.

  • target_chain_name (Name): [Read-Write] The name of the TARGET chain to transfer animation onto.

  • translation_alpha (double): [Read-Write] Range +/- infinity. Default 1. Scales the amount of translation that is applied. Exact behavior depends on the Translation Mode. In None Mode, this parameter has no effect. In Globally Scaled and Absolute modes, the translation offset is scaled by this parameter.

  • translation_mode (FKChainTranslationMode): [Read-Write] Determines how translation is copied from the source chain to the target chain. Default is None. None: Translation of target bones are left unmodified from the retarget pose. Globally Scaled: Translation of target bone is set to the source bone offset multiplied by the global scale of the skeleton (determined by the relative height difference between pelvis bones). Absolute: Translation of target bone is set to the absolute position of the source bone. Stretch Bone Length Uniformly: squashes or stretches the local translation of each bone so that the length of the target chain matches the relative length of the source chain. Accounts for differences in initial chain lengths. Stretch Bone Length Non-Uniformly: same as “Stretch Bone Length Uniformly” but treats each bone independently to allow for chains that stretch non-uniformly along their length (ie the base may stretch more than the tip or vice versa).

property enable_fk: bool

[Read-Write] Whether to copy the shape of the chain from the source skeleton using the Rotation and Translation modes. Default is true. NOTE: All FK operations run before the IK pass to copy the shape of the FK chain from the source skeleton.

Type:

(bool)

property rotation_alpha: float

[Read-Write] Range +/- infinity. Default 1. Scales the amount of rotation that is applied. If Rotation Mode is None this parameter has no effect. Otherwise, this parameter blends the rotation of each bone in the chain from the base retarget pose (0) to the retargeted pose (1).

Type:

(double)

property rotation_mode: FKChainRotationMode

[Read-Write] Determines how rotation is copied from the source chain to the target chain. Default is Interpolated. None: The rotation of each target bone in the chain is left at the reference pose. Interpolated: Source and target chains are normalized by their length, then each target bone rotation is generated by finding the rotation at the same normalized distance on the source chain and interpolating between the neighboring bones. One to One: Each target bone rotation is copied from the equivalent bone in the source chain, based on the order in the chain, starting at the root of the chain. If the target chain has more bones than the source, the extra bones will remain at their reference pose. One to One Reversed: Same as One-to-One, but starting from the tip of the chain. Match Chain: Uses a Spline-IK type method to orient the target joint chain to exactly match the shape of the source chain. Match Scaled Chain: Same as Match Chain, but scales the source chain to the same length as the target chain before running the match procedure. Copy Local: The local space rotation of the closest source bone is copied to the target. No retargeting is applied. Retarget pose is ignored.

Type:

(FKChainRotationMode)

property target_chain_name: Name

[Read-Write] The name of the TARGET chain to transfer animation onto.

Type:

(Name)

property translation_alpha: float

[Read-Write] Range +/- infinity. Default 1. Scales the amount of translation that is applied. Exact behavior depends on the Translation Mode. In None Mode, this parameter has no effect. In Globally Scaled and Absolute modes, the translation offset is scaled by this parameter.

Type:

(double)

property translation_mode: FKChainTranslationMode

[Read-Write] Determines how translation is copied from the source chain to the target chain. Default is None. None: Translation of target bones are left unmodified from the retarget pose. Globally Scaled: Translation of target bone is set to the source bone offset multiplied by the global scale of the skeleton (determined by the relative height difference between pelvis bones). Absolute: Translation of target bone is set to the absolute position of the source bone. Stretch Bone Length Uniformly: squashes or stretches the local translation of each bone so that the length of the target chain matches the relative length of the source chain. Accounts for differences in initial chain lengths. Stretch Bone Length Non-Uniformly: same as “Stretch Bone Length Uniformly” but treats each bone independently to allow for chains that stretch non-uniformly along their length (ie the base may stretch more than the tip or vice versa).

Type:

(FKChainTranslationMode)