Navigation
API > API/Plugins > API/Plugins/IKRig
This is the base class for defining operations that live in the retargeter "op" stack. These operations are executed in order by calling the virtual Run() function on each one in order. The Run() function takes an input pose on the source skeletal mesh and affects the output pose on the target mesh. NOTE: any user defined settings associated with a retarget op must be aggregated into a custom UStruct derived from FIKRetargetOpSettingsBase This ensures that the settings are user editable in the details panel with full undo/redo support and serialization.
| Name | FIKRetargetOpBase |
| Type | struct |
| Header File | /Engine/Plugins/Animation/IKRig/Source/IKRig/Public/Retargeter/IKRetargetOps.h |
| Include Path | #include "Retargeter/IKRetargetOps.h" |
Syntax
USTRUCT (BlueprintType )
struct FIKRetargetOpBase
Derived Classes
FIKRetargetOpBase derived class hierarchy
- FIKRetargetAdditivePoseOp
- FIKRetargetAlignPoleVectorOp
- FIKRetargetBlendToSourceOp
- FIKRetargetBodyIntersectIKOp
- FIKRetargetCopyBasePoseOp
- FIKRetargetCurvesOpBase
- FIKRetargetFilterBoneOp
- FIKRetargetFKChainsOp
- FIKRetargetFloorConstraintOp
- FIKRetargetIKChainsOp
- FIKRetargetOffsetGoalsOp
- FIKRetargetPelvisMotionOp
- FIKRetargetPinBoneOp
- FIKRetargetPoseOp
- FIKRetargetRootMotionOp
- FIKRetargetRunIKRigOp
- FIKRetargetScaleGoalsOp
- FIKRetargetScaleSourceOp
- FIKRetargetSpeedPlantingOp
- FIKRetargetStretchChainOp
- FIKRetargetStrideWarpingOp
- FIKRetargetWeaponGoalOp
- FIKRetargetPelvicMotionOp
- FIKRetargetPreviewPropOp
- FIKRetargetRelativeIKOp
Destructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual ~FIKRetargetOpBase() |
Retargeter/IKRetargetOps.h |
Structs
| Name | Remarks |
|---|---|
| FCurveData |
Typedefs
| Name | Type | Remarks | Include Path |
|---|---|---|---|
| FFrameValues | TArray< TArray< TOptional< float > > > | Retargeter/IKRetargetOps.h |
Variables
Public
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| EditorInstance | FIKRetargetOpBase * | The instance of this op currently running in the editor viewport | Retargeter/IKRetargetOps.h | |
| Timer | FOpExecutionTimer | A timer for the op profiler | Retargeter/IKRetargetOps.h |
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| Name | FName | The text label given to the op, used to refer to it from script | Retargeter/IKRetargetOps.h | |
| ParentOpName | FName | (optional) some ops are considered as a group, this is the name of the group parent | Retargeter/IKRetargetOps.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void CopySettingsRaw
(
const FIKRetargetOpSettingsBase* InSettings, |
Wholesale copy all settings from the input settings into this op. | Retargeter/IKRetargetOps.h | |
const FRetargetChainMapping * GetChainMapping () |
Wraps the non-const GetChainMapping() to provide const access | Retargeter/IKRetargetOps.h | |
FName GetDefaultName() |
Get the nice name to display in the viewport (defaults to "DisplayName" UStruct metadata) | Retargeter/IKRetargetOps.h | |
bool GetDeprecatedEnabledState() |
Retargeter/IKRetargetOps.h | ||
FName GetName() |
Get the name of this op (may be customized by user) | Retargeter/IKRetargetOps.h | |
FName GetParentOpName() |
Get the name of the op this op is parented to (None for root level ops) | Retargeter/IKRetargetOps.h | |
Use GetSettings () |
Old API (deprecated): | Retargeter/IKRetargetOps.h | |
const FIKRetargetOpSettingsBase * GetSettingsConst() |
Const access to the settings | Retargeter/IKRetargetOps.h | |
bool IsEnabled() |
Get if this op is enabled | Retargeter/IKRetargetOps.h | |
bool IsInitialized() |
Return true if this op is initialized and ready to run | Retargeter/IKRetargetOps.h | |
void SetEnabled
(
const bool bEnabled |
Turn this operation on/off (will be skipped during execution if disabled) | Retargeter/IKRetargetOps.h | |
void SetName
(
const FName InName |
Set the name of this op NOTE: InName is assumed to be unique in the stack (this constraint is enforced when setting the name from the controller) | Retargeter/IKRetargetOps.h | |
void SetParentOpName
(
const FName InName |
Set the name of the op this op is "parented" to. | Retargeter/IKRetargetOps.h |
Public Virtual
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void AnimGraphEvaluateAnyThread
(
FPoseContext& Output |
(optional) override to get any data from the anim graph as it's evaluating. | Retargeter/IKRetargetOps.h | |
virtual void AnimGraphPreUpdateMainThread
(
USkeletalMeshComponent& SourceMeshComponent, |
(optional) override to get any data from the source or target skeletal mesh component NOTE: this is called during AnimGraph::PreUpdate() which runs on the main thread, use caution. | Retargeter/IKRetargetOps.h | |
virtual bool AreChainSettingsAtDefault
(
const FName& InChainName |
(optional) override to support "Reset to Default" UI for chains | Retargeter/IKRetargetOps.h | |
virtual bool CanHaveChildOps() |
(optional) ops can optionally behave as a 'parent' where child ops must be executed first. | Retargeter/IKRetargetOps.h | |
virtual void CollectRetargetedBones
(
TSet< int32 >& OutRetargetedBones |
(optional) override and add any bones that your op modifies to the output TSet of bone indices Add indices of any bone that this op modifies. | Retargeter/IKRetargetOps.h | |
virtual void DebugDraw
(
FPrimitiveDrawInterface* InPDI, |
(optional) override to draw debug info into the editor viewport when the Op is selected | Retargeter/IKRetargetOps.h | |
virtual FRetargetChainMapping * GetChainMapping () |
(optional) ops can optionally store their own chain mapping, this allows outside systems to query/edit it. | Retargeter/IKRetargetOps.h | |
virtual uint8 * GetChainSettingsMemory
(
const FName InChainName |
(required for any op that stores settings per-chain) return the memory for the settings struct associated with a particular chain NOTE: implementing this can automate some boilerplate UI setup, allows systems to display chain settings and get/set them. | Retargeter/IKRetargetOps.h | |
virtual const UIKRigDefinition * GetCustomTargetIKRig() |
(optional) override and supply the target IK Rig this op references NOTE: The retarget processor will resolve the bone chains in the rig so that they can be queried by the op. | Retargeter/IKRetargetOps.h | |
virtual void GetOverrideableProperties
(
TSharedPtr< FRetargetPropertyOverrideNode >& OutRootNode |
(optional) override this to customize which properties are available to be overridden in a profile. | Retargeter/IKRetargetOps.h | |
virtual const UScriptStruct * GetParentOpType() |
(optional) ops can optionally behave as a 'child' where they can be parented to ops of the type returned by this function. | Retargeter/IKRetargetOps.h | |
virtual FIKRetargetOpSettingsBase * GetSettings () |
(required) override and return a pointer to the settings struct used by this operation NOTE: it is not permitted to modify the settings from inside this getter. | Retargeter/IKRetargetOps.h | |
virtual const UScriptStruct * GetSettingsType() |
(required) override and return the type used to house the settings for this operation | Retargeter/IKRetargetOps.h | |
virtual const UScriptStruct * GetType() |
(required) override and return the type of this op (the derived subclass) | Retargeter/IKRetargetOps.h | |
virtual FText GetWarningMessage() |
(optional) override to display a warning message in the op stack | Retargeter/IKRetargetOps.h | |
virtual bool HasDebugDrawing() |
(required if using DebugDraw()) return true to display the debug draw toggle in the UI | Retargeter/IKRetargetOps.h | |
virtual bool Initialize
(
const FIKRetargetProcessor& InProcessor, |
(optional) override to cache internal data when initializing the processor NOTE: you must set bIsInitialized to true to inform the retargeter that this op is ok to execute. | Retargeter/IKRetargetOps.h | |
virtual void InitializeBeforeChildren
(
FIKRetargetProcessor& InProcessor, |
(optional) override to give this op a chance to initialize before it's children are initialized This is executed right after the previous op in the stack and right before the first child op Initialize() is called NOTE: unless this is a parent op, this will have no effect | Retargeter/IKRetargetOps.h | |
virtual bool IsAbstract() |
(optional) return true to disallow adding this op to the stack | Retargeter/IKRetargetOps.h | |
virtual bool IsSingleton() |
(optional) return true to disallow multiple copies of this op in the stack | Retargeter/IKRetargetOps.h | |
virtual void OnAddedToStack
(
const UIKRetargeter* InRetargetAsset, |
(optional) override to automate initial setup after being added to the stack | Retargeter/IKRetargetOps.h | |
virtual void OnAssignIKRig
(
const ERetargetSourceOrTarget SourceOrTarget, |
(optional) override to react after user assigns a new IK Rig to all ops | Retargeter/IKRetargetOps.h | |
virtual void OnParentReinitPropertyEdited
(
const FIKRetargetOpBase& InParentOp, |
(optional) override to allow ops to react when a property marked "ReinitializeOnEdit" on the parent op is modified NOTE: InPropertyChangedEvent will be null at load time giving op a chance to clean based on parent state. | Retargeter/IKRetargetOps.h | |
virtual void OnPlaybackReset() |
(optional) override to reset any internal state when animation playback is reset or stopped (ie, springs / dampers etc) | Retargeter/IKRetargetOps.h | |
virtual void OnReinitPropertyEdited
(
const FPropertyChangedEvent* InPropertyChangedEvent |
(optional) override to allow ops to react when a property marked "ReinitializeOnEdit" is modified NOTE: this is called before Initialize() is called again to give op a chance to auto-configure itself based on its new state NOTE: this is called in several places where InPropertyChangedEvent may be null | Retargeter/IKRetargetOps.h | |
virtual void OnTargetChainRenamed
(
const FName InOldChainName, |
(optional) implement this if the op stores chain settings by name to allow the settings to be maintained after a chain is renamed NOTE: this is only called when the target IK Rig this op references has a chain that is renamed. | Retargeter/IKRetargetOps.h | |
virtual void PostInitialize
(
const FIKRetargetProcessor& InProcessor, |
(optional) a second pass of initialization that ops can use after Op::Initialize() is called on all ops. | Retargeter/IKRetargetOps.h | |
virtual void PostLoad
(
const FIKRigObjectVersion::Type InVersion |
(optional) called during the PostLoad of the owning asset. | Retargeter/IKRetargetOps.h | |
virtual bool PostLoadSplitOp
(
TArray< FInstancedStruct >& OutNewOps |
Called during PostLoad to allow ops to be split into multiple ops during version upgrade. | Retargeter/IKRetargetOps.h | |
virtual void ResetChainSettingsToDefault
(
const FName& InChainName |
(optional) override to support resetting all settings for a given chain | Retargeter/IKRetargetOps.h | |
virtual void Run
(
FIKRetargetProcessor& InProcessor, |
(optional) override to evaluate this operation and modify the output pose | Retargeter/IKRetargetOps.h | |
virtual void RunAfterParent
(
FIKRetargetProcessor& InProcessor, |
(optional) override to give this op a chance to do work after it's parent is run This is executed right after the parent op in the stack and right before the next op after parent NOTE: unless this is a child op, this will have no effect | Retargeter/IKRetargetOps.h | |
virtual void RunBeforeChildren
(
FIKRetargetProcessor& InProcessor, |
(optional) override to give this op a chance to do work before it's children are run This is executed right after the previous op in the stack and right before the first child op Run() is called NOTE: unless this is a parent op, this will have no effect | Retargeter/IKRetargetOps.h | |
virtual void UpdateFromAnimSequence
(
UAnimSequence* Sequence, |
(optional) override to update op with anim sequence information when batch retargeting anim sequences NOTE: this should only be called for batch (offline) retargeting where there is no anim-instance running | Retargeter/IKRetargetOps.h |
Static
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
| A convenience function to copy all properties from one struct to another while ignoring some | Retargeter/IKRetargetOps.h |