Navigation
API > API/Plugins > API/Plugins/IKRigEditor
A singleton (per-asset) class used to make modifications to a UIKRigDefinition asset
All modifications to an IKRigDefinition must go through this controller.
Editors can subscribe to the callbacks on this controller to be notified of changes that require reinitialization of a running IK Rig processor instance. The API here is split into public/scripting sections which are accessible from Blueprint/Python and sections that are only relevant to editors in C++.
| Name | UIKRigController |
| Type | class |
| Header File | /Engine/Plugins/Animation/IKRig/Source/IKRigEditor/Public/RigEditor/IKRigController.h |
| Include Path | #include "RigEditor/IKRigController.h" |
Syntax
UCLASS (MinimalAPI, BlueprintType, HideCategories=UObject)
class UIKRigController : public UObject
Inheritance Hierarchy
- UObjectBase → UObjectBaseUtility → UObject → UIKRigController
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
UIKRigController() |
RigEditor/IKRigController.h |
Typedefs
| Name | Type | Remarks | Include Path |
|---|---|---|---|
| FOnIKRigNeedsInitialized | TMulticastDelegate_OneParam< void, UIKRigDefinition * > | Called whenever the rig is modified in such a way that would require re-initialization by dependent systems. | RigEditor/IKRigController.h |
| FOnRetargetChainAdded | TMulticastDelegate_OneParam< void, UIKRigDefinition * > | Called whenever a retarget chain is added. | RigEditor/IKRigController.h |
| FOnRetargetChainRemoved | TMulticastDelegate_TwoParams< void, UIKRigDefinition *, const FName > | Called whenever a retarget chain is removed. | RigEditor/IKRigController.h |
| FOnRetargetChainRenamed | TMulticastDelegate_ThreeParams< void, UIKRigDefinition *, FName, FName > | Called whenever a retarget chain is renamed. | RigEditor/IKRigController.h |
Constants
| Name | Type | Remarks | Include Path |
|---|---|---|---|
| Controllers | TMap< UIKRigDefinition *, UIKRigController * > | Static global map of assets to their associated controller. | RigEditor/IKRigController.h |
Variables
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| Asset | TObjectPtr< UIKRigDefinition > | The actual IKRigDefinition asset that this Controller modifies. | RigEditor/IKRigController.h |
|
| AutoCharacterizer | TUniquePtr< FAutoCharacterizer > | Auto characterizer | RigEditor/IKRigController.h | |
| AutoFBIKCreator | TUniquePtr< FAutoFBIKCreator > | Auto fbik generator | RigEditor/IKRigController.h | |
| bGoalsChangedInScope | bool | RigEditor/IKRigController.h | ||
| IKRigNeedsInitialized | FOnIKRigNeedsInitialized | RigEditor/IKRigController.h | ||
| ReinitializeScopeCounter | int32 | Prevent reinitializing from inner operations | RigEditor/IKRigController.h | |
| RetargetChainAdded | FOnRetargetChainAdded | RigEditor/IKRigController.h | ||
| RetargetChainRemoved | FOnRetargetChainRemoved | RigEditor/IKRigController.h | ||
| RetargetChainRenamed | FOnRetargetChainRenamed | RigEditor/IKRigController.h | ||
| StructViewerPool | FIKRigStructWrapperPool | A pool of objects inheriting from UIKRigStructWrapperBase for editing various IK Rig struct types in a details view NOTE: pool contains a bucket per settings type | RigEditor/IKRigController.h |
|
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
bool AddBoneSetting
(
const FName BoneName, |
Add settings to the given Bone/Solver. Does nothing if Bone already has settings in this Solver. | RigEditor/IKRigController.h |
|
| Add a new Goal associated with the given Bone. GoalName must be unique. Bones can have multiple Goals (rare). | RigEditor/IKRigController.h |
|
|
| RETARGETING PUBLIC/SCRIPTING API Add a new chain with the given Chain and Bone names. | RigEditor/IKRigController.h |
|
|
FName AddRetargetChainInternal
(
const FBoneChain& BoneChain |
Add a Chain with the given BoneChain settings. Returns newly created chain name. | RigEditor/IKRigController.h | |
| SOLVERS PUBLIC/SCRIPTING API Add a new solver of the given type to the bottom of the stack. | RigEditor/IKRigController.h |
|
|
int32 AddSolver
(
UScriptStruct* InIKRigSolverType |
Add a solver to the IK Rig asset's solver stack. | RigEditor/IKRigController.h | |
bool ApplyAutoFBIK() |
Analyse the skeleton to see if it matches a known template and automatically generates a full body IK setup Returns true if a matching skeletal template was found and the FBIK setup for it was applied. | RigEditor/IKRigController.h |
|
bool ApplyAutoGeneratedRetargetDefinition() |
Analyse the skeleton to see if it matches a known template and automatically generates all retarget chains and sets the pelvis Returns true if a matching skeletal template was found and the retarget definition for it was applied. | RigEditor/IKRigController.h |
|
void AutoGenerateFBIK
(
FAutoFBIKResults& Results |
Auto generates an FBIK setup for the current skeletal mesh. | RigEditor/IKRigController.h | |
void AutoGenerateRetargetDefinition
(
FAutoCharacterizeResults& Results |
Auto generates a retarget definition and returns the results. | RigEditor/IKRigController.h | |
void BroadcastNeedsReinitialized() |
Force all currently connected processors to reinitialize using latest asset state | RigEditor/IKRigController.h | |
| Returns true if this Bone can have settings in the given Solver. | RigEditor/IKRigController.h | ||
bool CanRemoveBoneSetting
(
const FName BoneName, |
Returns true if settings for this Bone can be removed from the given Solver. | RigEditor/IKRigController.h | |
bool ConnectGoalToSolver
(
const FName GoalName, |
Connect the given Goal to the given Solver. This creates an "Effector" with settings specific to this Solver. | RigEditor/IKRigController.h |
|
bool DisconnectGoalFromSolver
(
const FName GoalToRemove, |
Disconnect the given Goal from the given Solver. This removes the Effector that associates the Goal with the Solver. | RigEditor/IKRigController.h |
|
bool DoesBoneHaveSettings
(
const FName BoneName |
Returns true if the given Bone has any settings in any Solver. | RigEditor/IKRigController.h | |
bool DoesSolverHaveCustomGoalSettings
(
const FName GoalName, |
Returns true if the goal has custom settings for the given solver | RigEditor/IKRigController.h |
|
const TArray< UIKRigEffectorGoal * > & GetAllGoals() |
Get access to the list of Goals. | RigEditor/IKRigController.h |
|
UIKRigDefinition * GetAsset () |
GENERAL C++ ONLY API Get the asset this controller controls. | RigEditor/IKRigController.h | |
TObjectPtr< UIKRigDefinition > & GetAssetPtr() |
RigEditor/IKRigController.h | ||
const FAutoCharacterizer & GetAutoCharacterizer() |
Get read-only access to characterizer. | RigEditor/IKRigController.h | |
bool GetBoneExcluded
(
const FName BoneName |
Returns true if the given Bone is excluded, false otherwise. | RigEditor/IKRigController.h |
|
| The the Bone associated with the given Goal. | RigEditor/IKRigController.h |
|
|
UObject * GetBoneSettings
(
const FName BoneName, |
Get the generic (Solver-specific) Bone settings UObject for this Bone in the given Solver. | RigEditor/IKRigController.h |
|
FName GetEndBone
(
int32 SolverIndex |
Get the name of the end bone on a given solver. (not all solvers require extra end bones, checks CanSetEndBone() first) | RigEditor/IKRigController.h |
|
UIKRigEffectorGoal * GetGoal
(
const FName GoalName |
Get read-write access to the Goal with the given name. | RigEditor/IKRigController.h |
|
FTransform GetGoalCurrentTransform
(
const FName GoalName |
Get the global-space transform of the given Goal. This may be set by the user in the editor, or at runtime. | RigEditor/IKRigController.h | |
| Get the index of the given Goal in the list of Goals. | RigEditor/IKRigController.h | ||
| Get the Goal associated with the given Bone (may be NAME_None) | RigEditor/IKRigController.h |
|
|
UObject * GetGoalSettingsForSolver
(
const FName GoalName, |
Get the UObject for the settings associated with the given Goal in the given Solver. | RigEditor/IKRigController.h |
|
const FIKRigSkeleton & GetIKRigSkeleton() |
Get read-access to the IKRig skeleton representation. | RigEditor/IKRigController.h | |
int32 GetIndexOfSolver
(
UIKRigSolverControllerBase* InController |
Get the index for a given solver in the stack The input here is a solver controller (as returned by GetSolverController()) | RigEditor/IKRigController.h |
|
int32 GetIndexOfSolver
(
FIKRigSolverBase* Solver |
Get access to the given solver. | RigEditor/IKRigController.h | |
int32 GetNumSolvers() |
Get the number of solvers in the stack. | RigEditor/IKRigController.h |
|
FTransform GetRefPoseTransformOfBone
(
const FName BoneName |
Get the global-space retarget pose transform of the given Bone. | RigEditor/IKRigController.h |
|
const FBoneChain * GetRetargetChainByName
(
const FName ChainName |
Get read-only access to a single retarget chain with the given name. | RigEditor/IKRigController.h | |
| Get the Start Bone name for the given Chain. | RigEditor/IKRigController.h |
|
|
| Get the name of the retarget chain that contains the given Bone. Returns NAME_None if Bone not in a Chain. | RigEditor/IKRigController.h | ||
| Get the name of the retarget chain that contains the given Goal. Returns NAME_None if Goal not in a Chain. | RigEditor/IKRigController.h | ||
| Get the Goal name for the given Chain. | RigEditor/IKRigController.h |
|
|
const TArray< FBoneChain > & GetRetargetChains() |
Get read-only access to the list of Chains. | RigEditor/IKRigController.h |
|
| Get the End Bone name for the given Chain. | RigEditor/IKRigController.h |
|
|
FName GetRetargetRoot() |
Get the name of the Root Bone of the retargeting (can only be one). | RigEditor/IKRigController.h |
|
FIKRigBoneSettingsBase * GetSettingsForBone
(
const FName BoneName, |
Get the generic (Solver-specific) Bone settings UStruct for this Bone in the given Solver. | RigEditor/IKRigController.h | |
USkeletalMesh * GetSkeletalMesh() |
Get the skeletal mesh this asset is initialized with. | RigEditor/IKRigController.h |
|
const TArray< FIKRigSolverBase * > GetSolverArray() |
Get read-only access to the array of solvers. | RigEditor/IKRigController.h | |
FIKRigSolverBase * GetSolverAtIndex
(
int32 Index |
Get access to the given solver. | RigEditor/IKRigController.h | |
UIKRigSolverControllerBase * GetSolverController
(
int32 SolverIndex |
Get a controller to customize the settings for a given solver in the stack. | RigEditor/IKRigController.h |
|
bool GetSolverEnabled
(
int32 SolverIndex |
Get enabled status of the given solver. | RigEditor/IKRigController.h |
|
FInstancedStruct * GetSolverStructAtIndex
(
int32 Index |
Get access to the instanced struct for a given solver. | RigEditor/IKRigController.h | |
FString GetSolverUniqueName
(
int32 SolverIndex |
Get unique label for a given solver. Returns dash separated index and name like so, "0 - SolverName". | RigEditor/IKRigController.h | |
FName GetStartBone
(
int32 SolverIndex |
Get the name of the root bone on a given solver. (not all solvers support start bones, checks CanSetStartBone() first) | RigEditor/IKRigController.h |
|
TArray< UIKRigStructWrapperBase * > GetStructWrappers
(
const int32 InNum, |
Returns an array of wrappers to display structs in the details panel NOTE: these are recycled by the editor using this controller (assumes one editor per asset) | RigEditor/IKRigController.h | |
| Add a suffix as needed to ensure the Goal name is unique. | RigEditor/IKRigController.h | ||
| Make unique name for a retargeting bone chain. Adds a numbered suffix to make it unique. | RigEditor/IKRigController.h | ||
bool IsGoalConnectedToAnySolver
(
const FName GoalName |
Returns true if the given Goal is connected to ANY solver. False otherwise. | RigEditor/IKRigController.h |
|
bool IsGoalConnectedToSolver
(
const FName GoalName, |
Returns true if the given Goal is connected to the given Solver. False otherwise. | RigEditor/IKRigController.h |
|
bool IsSkeletalMeshCompatible
(
USkeletalMesh* SkeletalMeshToCheck |
Returns true if the provided skeletal mesh could be used with this IK Rig. | RigEditor/IKRigController.h |
|
bool ModifyGoal
(
const FName GoalName |
Modify a Goal for a transaction. Returns true if Goal found. | RigEditor/IKRigController.h | |
bool MoveSolverInStack
(
int32 SolverToMoveIndex, |
Move the solver at the given index to the target index. | RigEditor/IKRigController.h |
|
FOnIKRigNeedsInitialized & OnIKRigNeedsInitialized() |
RigEditor/IKRigController.h | ||
FOnRetargetChainAdded & OnRetargetChainAdded() |
RigEditor/IKRigController.h | ||
FOnRetargetChainRemoved & OnRetargetChainRemoved() |
RigEditor/IKRigController.h | ||
FOnRetargetChainRenamed & OnRetargetChainRenamed() |
RigEditor/IKRigController.h | ||
bool RemoveBoneSetting
(
const FName BoneName, |
Remove settings for the given Bone/Solver. Does nothing if Bone doesn't have setting in this Solver. | RigEditor/IKRigController.h |
|
bool RemoveGoal
(
const FName GoalName |
Remove the Goal by name. | RigEditor/IKRigController.h |
|
bool RemoveRetargetChain
(
const FName ChainName |
Remove a Chain with the given name. Returns true if a Chain was removed. | RigEditor/IKRigController.h |
|
bool RemoveSolver
(
const int32 SolverIndex |
Remove the solver at the given stack index. | RigEditor/IKRigController.h |
|
| Rename a Goal. Returns new name, which may be different after being sanitized. Returns NAME_None if this fails. | RigEditor/IKRigController.h |
|
|
| Renamed the given Chain. Returns the new name (same as old if unsuccessful). | RigEditor/IKRigController.h |
|
|
void ResetGoalTransforms() |
Reset all Goals back to their initial transforms. | RigEditor/IKRigController.h | |
void ResetInitialGoalTransforms() |
Reset initial goal transform. | RigEditor/IKRigController.h | |
bool SetBoneExcluded
(
const FName BoneName, |
Include/exclude a bone from all the solvers. All bones are included by default. | RigEditor/IKRigController.h |
|
bool SetEndBone
(
const FName EndBoneName, |
Set the end bone on a given solver. (not all solvers require extra end bones, checks CanSetEndBone() first) | RigEditor/IKRigController.h |
|
| The the Bone that the given Goal should be parented to / associated with. | RigEditor/IKRigController.h |
|
|
void SetGoalCurrentTransform
(
const FName GoalName, |
Set the Goal to the given transform. | RigEditor/IKRigController.h | |
| Set the End Bone for the given Chain. Returns true if operation was successful. | RigEditor/IKRigController.h |
|
|
| Set the Goal for the given Chain. Returns true if operation was successful. | RigEditor/IKRigController.h |
|
|
| Set the Start Bone for the given Chain. Returns true if operation was successful. | RigEditor/IKRigController.h |
|
|
void SetRetargetDefinition
(
const FRetargetDefinition& RetargetDefinition |
Replace the entire retarget definition (includes all bone chains and the pelvis setting) | RigEditor/IKRigController.h | |
bool SetRetargetRoot
(
const FName RootBoneName |
Set the Root Bone of the retargeting (can only be one). | RigEditor/IKRigController.h |
|
bool SetSkeletalMesh
(
USkeletalMesh* SkeletalMesh |
Sets the preview mesh to use. | RigEditor/IKRigController.h |
|
bool SetSolverEnabled
(
int32 SolverIndex, |
Set enabled/disabled status of the given solver. | RigEditor/IKRigController.h |
|
bool SetStartBone
(
const FName RootBoneName, |
Set the root bone on a given solver. (not all solvers support root bones, checks CanSetStartBone() first) | RigEditor/IKRigController.h |
|
void SortRetargetChains() |
Sorts the Chains from Root to tip based on the Start Bone of each Chain. | RigEditor/IKRigController.h | |
bool ValidateChain
(
const FName ChainName, |
Returns true if this is a valid chain. | RigEditor/IKRigController.h |
Static
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
static UIKRigController * GetController
(
const UIKRigDefinition* InIKRigDefinition |
Use this to get the controller for the given IKRig. | RigEditor/IKRigController.h |
|
static void SanitizeGoalName
(
FString& InOutName |
Ensure that the given name adheres to required standards for Goal names (no special characters etc..) | RigEditor/IKRigController.h |