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
- FIKRetargetBodyIntersectIKOp
- FIKRetargetCopyBasePoseOp
- FIKRetargetCurveRemapOp
- FIKRetargetFilterBoneOp
- FIKRetargetFKChainsOp
- FIKRetargetFloorConstraintOp
- FIKRetargetIKChainsOp
- FIKRetargetPelvisMotionOp
- FIKRetargetPinBoneOp
- FIKRetargetRootMotionOp
- FIKRetargetRunIKRigOp
- FIKRetargetScaleSourceOp
- FIKRetargetSpeedPlantingOp
- FIKRetargetStretchChainOp
- FIKRetargetStrideWarpingOp
- FIKRetargetRelativeIKOp
- FIKRetargetRigMapperOp
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 |
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| AverageExecutionTime | double | Profiling data; time in seconds of last execution | Retargeter/IKRetargetOps.h | |
| bIsEnabled | bool | When false, execution of this op is skipped | Retargeter/IKRetargetOps.h | |
| bTakeInputCurvesFromSourceAnimInstance | bool | (optional) determines whether input curves are taken from the source anim instance or from the current pose context (for example when we have multiple nodes which process curves). | Retargeter/IKRetargetOps.h |
|
| 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 |
|---|---|---|---|
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 | |
void CopySettingsRaw
(
const FIKRetargetOpSettingsBase* InSettings, |
Wholesale copy all settings from the input settings into this op. | 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 | |
double GetAverageExecutionTime() |
Returns the current average execution time using a 30 frame exponential moving average | 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 | |
const FRetargetChainMapping * GetChainMapping () |
Wraps the non-const GetChainMapping() to provide const access | 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 | |
FName GetDefaultName() |
Get the nice name to display in the viewport (defaults to "DisplayName" UStruct metadata) | 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 | |
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 | |
const FIKRetargetOpSettingsBase * GetSettingsConst() |
Const access to the settings | Retargeter/IKRetargetOps.h | |
virtual const UScriptStruct * GetSettingsType() |
(required) override and return the type used to house the settings for this operation | Retargeter/IKRetargetOps.h | |
bool GetTakeInputCurvesFromSourceAnimInstance() |
A function which allows the user to manually indicate whether to take source curves from the source anim instance, or from the current pose context, since only the first enabled curve processing node must take inputs from the source anim instance | 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 HasCurveProcessing() |
(optional) a function which returns true if the operation performs curve processing, false otherwise (default is false) | 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 | |
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 | |
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 void ProcessAnimSequenceCurves
(
FIKRetargetOpBase::FCurveData InCurveMetaData, |
(optional) a function which can be used during batch processing to apply any operations to curve data for each frame of an anim sequence. | Retargeter/IKRetargetOps.h | |
virtual void ResetChainSettingsToDefault
(
const FName& InChainName |
(optional) override to support resetting all settings for a given chain | Retargeter/IKRetargetOps.h | |
void ResetExecutionTime() |
Reset the running average execution time | Retargeter/IKRetargetOps.h | |
virtual void Run
(
FIKRetargetProcessor& InProcessor, |
(optional) override to evaluate this operation and modify the output pose | 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 | |
void SetEnabled
(
const bool bEnabled |
Turn this operation on/off (will be skipped during execution if disabled) | Retargeter/IKRetargetOps.h | |
void SetLatestExecutionTime
(
const double InSeconds |
Set the latest execution time for profiling | 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 | |
virtual void SetSettings
(
const FIKRetargetOpSettingsBase* InSettings |
(optional) override to react when settings are applied at runtime NOTE: This is called while the Op is running AFTER Initialize() so it up to the Op author to copy only those settings which are safe to be updated while the op is running. | Retargeter/IKRetargetOps.h | |
void SetTakeInputCurvesFromSourceAnimInstance
(
bool bInTakeInputCurvesFromSourceAnimInstance |
A function which allows the user to manually indicate whether to take source curves from the source anim instance, or from the current pose context, since only the first enabled curve processing node must take inputs from the source anim instance | 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 |