Navigation
API > API/Plugins > API/Plugins/IKRig
The runtime processor that converts an input pose from a source skeleton into an output pose on a target skeleton. To use:
Initialize a processor with a Source/Target skeletal mesh and a UIKRetargeter asset.
Call ScaleSourcePose() and pass in the global space source pose (see func comments why this is necessary)
Call RunRetargeter and pass in a source pose as an array of global-space transforms
RunRetargeter() returns an array of global space transforms for the target skeleton.
| Name | FIKRetargetProcessor |
| Type | struct |
| Header File | /Engine/Plugins/Animation/IKRig/Source/IKRig/Public/Retargeter/IKRetargetProcessor.h |
| Include Path | #include "Retargeter/IKRetargetProcessor.h" |
Syntax
struct FIKRetargetProcessor
Typedefs
| Name | Type | Remarks | Include Path |
|---|---|---|---|
| FOnRetargeterInitialized | TMulticastDelegate_NoParams< void > | Retargeter/IKRetargetProcessor.h |
Variables
Public
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| Log | FIKRigLogger | The logging system | Retargeter/IKRetargetProcessor.h |
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| AllBoneChains | FRetargeterBoneChains | Storage for all bone chain data used by Ops and editor tools | Retargeter/IKRetargetProcessor.h | |
| AssetVersionInitializedWith | int32 | Retargeter/IKRetargetProcessor.h | ||
| bIKForcedOff | bool | If true, all IK operations are skipped NOTE: this is used both for debugging and LOD'ing IK off | Retargeter/IKRetargetProcessor.h | |
| bIsInitialized | bool | Only true once Initialize() has successfully completed. | Retargeter/IKRetargetProcessor.h | |
| CurrentSourceScale | FRetargetPoseScaleWithPivot | Cached source scaling | Retargeter/IKRetargetProcessor.h | |
| GoalContainer | FIKRigGoalContainer | The named transforms that solvers use as end effectors | Retargeter/IKRetargetProcessor.h | |
| OpStack | TArray< FInstancedStruct > | The collection of operations to run to transfer animation from source to target. | Retargeter/IKRetargetProcessor.h | |
| RetargeterAsset | const UIKRetargeter * | The source asset this processor was initialized with. | Retargeter/IKRetargetProcessor.h | |
| RetargeterInitialized | FOnRetargeterInitialized | Retargeter/IKRetargetProcessor.h | ||
| SourceSkeleton | FRetargetSkeleton | The internal data structures used to represent the SOURCE skeleton / pose during retargeter. | Retargeter/IKRetargetProcessor.h | |
| TargetSkeleton | FTargetSkeleton | The internal data structures used to represent the TARGET skeleton / pose during retargeter. | Retargeter/IKRetargetProcessor.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void ApplySourceScaleToPose
(
TArray< FTransform >& InOutSourceGlobalPose |
This scales the input source pose according to the source scale factor This must be called outside of the retargeter itself because otherwise the pose may be scaled multiple times. | Retargeter/IKRetargetProcessor.h | |
void DebugDrawAllOps
(
FPrimitiveDrawInterface* InPDI, |
Run debug drawing on all ops in the stack | Retargeter/IKRetargetProcessor.h | |
const FRetargeterBoneChains & GetBoneChains () |
Get access to all the fully resolved bone chain data | Retargeter/IKRetargetProcessor.h | |
const FRetargeterBoneChains & GetBoneChains () |
Get read-only access to all the fully resolved bone chains for both source and target skeletons | Retargeter/IKRetargetProcessor.h | |
int32 GetBoneIndexFromName
(
const FName BoneName, |
Returns index of the bone with the given name in either Source or Target skeleton. | Retargeter/IKRetargetProcessor.h | |
FName GetChainNameForBone
(
const FName BoneName, |
Returns name of the chain associated with this bone. Returns NAME_None if bone is not in a chain. | Retargeter/IKRetargetProcessor.h | |
FName GetClosestBoneToParam
(
const FName InChainName, |
Get the bone in the chain at the given param. | Retargeter/IKRetargetProcessor.h | |
FName GetFirstChainMappedToChain
(
const FName InChainName, |
Get the chain mapped to this one. | Retargeter/IKRetargetProcessor.h | |
const T * GetFirstRetargetOpOfType
(
ERetargetOpsToSearch SourceOfOps |
Get the first op in the stack of the given type | Retargeter/IKRetargetProcessor.h | |
FTransform GetGlobalRetargetPoseAtParam
(
const FName InChainName, |
Get a transform at a given param in a chain | Retargeter/IKRetargetProcessor.h | |
| Get read-write access so that ops can modify the IK Rig goals NOTE: pointers to goals in the container are not stable between updates, do not store them. | Retargeter/IKRetargetProcessor.h | ||
const FIKRigGoalContainer & GetIKRigGoalContainer () |
Retargeter/IKRetargetProcessor.h | ||
float GetParamOfBoneInChain
(
const FName InBoneName, |
Get the param of the bone in it's retarget chain. Ranges from 0 to NumBonesInChain. | Retargeter/IKRetargetProcessor.h | |
FName GetPelvisBone
(
ERetargetSourceOrTarget SourceOrTarget, |
Get name of the pelvis bone for either the source or target skeleton. | Retargeter/IKRetargetProcessor.h | |
const FRetargetPoseScaleWithPivot & GetPoseScale
(
const ERetargetSourceOrTarget SourceOrTarget |
Get the scale factor and pivot for the retarget pose (comes from presence of SourceScaleOp) | Retargeter/IKRetargetProcessor.h | |
const UIKRetargeter * GetRetargetAsset() |
Get read only access to the retarget asset | Retargeter/IKRetargetProcessor.h | |
FIKRetargetOpBase * GetRetargetOpByName
(
const FName InOpName |
Get an op with the given name | Retargeter/IKRetargetProcessor.h | |
const TArray< FInstancedStruct > & GetRetargetOps() |
Get read only access to the retarget ops currently running in processor | Retargeter/IKRetargetProcessor.h | |
TArray< const FIKRetargetOpBase * > GetRetargetOpsByType
(
const UScriptStruct* OpType |
Get list of ops of a given type | Retargeter/IKRetargetProcessor.h | |
FTransform GetRetargetPoseBoneTransform
(
const FName InBoneName, |
Get a transform of a bone in the retarget pose | Retargeter/IKRetargetProcessor.h | |
const FRetargetSkeleton & GetSkeleton
(
ERetargetSourceOrTarget SourceOrTarget |
Get read-only access to either source or target skeleton. | Retargeter/IKRetargetProcessor.h | |
double GetSourceScaleFactor() |
Get the scale factor for the source pose (comes from presence of SourceScaleOp) | Retargeter/IKRetargetProcessor.h | |
const FTargetSkeleton & GetTargetSkeleton () |
Retargeter/IKRetargetProcessor.h | ||
| Get read/write access to the target skeleton. | Retargeter/IKRetargetProcessor.h | ||
void Initialize
(
const USkeletalMesh* SourceSkeleton, |
Initialize the retargeter to enable running it. | Retargeter/IKRetargetProcessor.h | |
bool IsBoneInAMappedChain
(
const FName BoneName, |
Returns true if the bone is part of a retarget chain or root bone, false otherwise. | Retargeter/IKRetargetProcessor.h | |
bool IsIKForcedOff() |
Returns true if the IK has not been forced off | Retargeter/IKRetargetProcessor.h | |
bool IsInitialized() |
Get whether this processor is ready to call RunRetargeter() and generate new poses. | Retargeter/IKRetargetProcessor.h | |
void OnAnimGraphEvaluateAnyThread
(
FPoseContext& Output |
Calls AnimGraphEvaluateAnyThread() for all ops in the stack | Retargeter/IKRetargetProcessor.h | |
void OnAnimGraphPreUpdateMainThread
(
USkeletalMeshComponent& SourceMeshComponent, |
Calls AnimGraphPreUpdateMainThread() for all ops in the stack | Retargeter/IKRetargetProcessor.h | |
void OnPlaybackReset() |
Calls OnPlaybackReset() for all ops in the stack | Retargeter/IKRetargetProcessor.h | |
FOnRetargeterInitialized & OnRetargeterInitialized() |
Attach a delegate to be notified whenever this processor is initialized. | Retargeter/IKRetargetProcessor.h | |
TArray< FTransform > & RunRetargeter
(
TArray< FTransform >& InSourceGlobalPose, |
Run the retarget to generate a new pose. | Retargeter/IKRetargetProcessor.h | |
void SetNeedsInitialized() |
Set that this processor needs to be reinitialized. | Retargeter/IKRetargetProcessor.h | |
void UpdateRetargetPoseAtRuntime
(
const FName RetargetPoseToUseName, |
Does a partial reinitialization (at runtime) whenever the retarget pose is swapped to a different or if the pose has been modified. | Retargeter/IKRetargetProcessor.h | |
bool WasInitializedWithTheseAssets
(
const USkeletalMesh* InSourceMesh, |
Get whether this processor was initialized with these skeletal meshes and retarget asset | Retargeter/IKRetargetProcessor.h |