UIKRigController

A singleton (per-asset) class used to make modifications to a [UIKRigDefinition](API\Plugins\IKRig\UIKRigDefinition) asset.

Choose your operating system:

Windows

macOS

Linux

Inheritance Hierarchy

References

Module

IKRigEditor

Header

/Engine/Plugins/Animation/IKRig/Source/IKRigEditor/Public/RigEditor/IKRigController.h

Include

#include "RigEditor/IKRigController.h"

Syntax

UCLASS(Config=Engine, HideCategories=UObject)
class UIKRigController : public UObject

Remarks

A singleton (per-asset) class used to make modifications to a UIKRigDefinition asset. Call the static GetIKRigController() function to get the controller for the asset you want to modify.

Functions

Name Description

Public function Const

void

 

AddBoneSetting

(
    const FName& BoneName,
    int32 SolverIndex
)

END Goals Bone SettingsAdd settings to the given Bone/Solver.

Public function Const

UIKRigEffect...

 

AddNewGoal

(
    const FName& GoalName,
    const FName& BoneName
)

END SOLVERS GOALSAdd a new Goal associated with the given Bone.

Public function Const

void

 

AddRetargetChain

(
    const FName& ChainName,
    const FName& StartBone,
    const FName& EndBone
)

END Bone Settings Retargeting Options and Retarget Bone ChainsAdd a Chain with the given Name and Start/End bones.

Public function Const

int32

 

AddSolver

(
    TSubclassOf< UIKRigSolver > InSolve...
)

END SKELETON SOLVERSAdd a new solver of the given type to the bottom of the stack.

Public function Const

void

 

BroadcastNeedsReinitialized()

Force all currently connected processors to reinitialize using latest asset state

Public function Const

bool

 

CanAddBoneSetting

(
    const FName& BoneName,
    int32 SolverIndex
)

Returns true if this Bone can have settings in the given Solver.

Public function Const

bool

 

CanRemoveBoneSetting

(
    const FName& BoneName,
    int32 SolverIndex
)

Returns true if settings for this Bone can be removed from the given Solver.

Public function Const

bool

 

ConnectGoalToSolver

(
    const UIKRigEffectorGoal& Goal,
    int32 SolverIndex
)

Connect the given Goal to the given Solver.

Public function Const

bool

 

DisconnectGoalFromSolver

(
    const FName& GoalToRemove,
    int32 SolverIndex
)

Disconnect the given Goal from the given Solver.

Public function Const

bool

 

DoesBoneHaveSettings

(
    const FName& BoneName
)

Returns true if the given Bone has any settings in any Solver.

Public function Const

const TArray...

 

GetAllGoals()

Get read-only access to the list of Goals.

Public function Const

UIKRigDefini...

 

GetAsset()

Get the asset this controller controls.

Public function Const

bool

 

GetBoneExcluded

(
    const FName& BoneName
)

Returns true if the given Bone is excluded, false otherwise.

Public function Const

FName

 

GetBoneForGoal

(
    const FName& GoalName
)

The the Bone associated with the given Goal.

Public function Const

const UIKRig...

 

GetGoal

(
    int32 GoalIndex
)

Get read-only access to the Goal at the given index.

Public function Const

UIKRigEffect...

 

GetGoal

(
    const FName& GoalName
)

Get read-write access to the Goal with the given name.

Public function Const

FTransform

 

GetGoalCurrentTransform

(
    const FName& GoalName
)

Get the global-space transform of the given Goal.

Public function Const

int32

 

GetGoalIndex

(
    const FName& GoalName
)

Get the index of the given Goal in the list of Goals.

Public function Const

FName

 

GetGoalName

(
    const int32& GoalIndex
)

Get the name of Goal at the given index.

Public function Const

UObject *...

 

GetGoalSettingsForSolver

(
    const FName& GoalName,
    int32 SolverIndex
)

Get the UObject for the settings associated with the given Goal in the given Solver.

Public function Static

UIKRigContro...

 

GetIKRigController

(
    UIKRigDefinition* InIKRigDefin...
)

Use this to get the controller for the given IKRig

Public function Const

const FIKRig...

 

GetIKRigSkeleton()

Get read-access to the IKRig skeleton representation

Public function Const

int32

 

GetNumSolvers()

Get the number of solvers in the stack.

Public function Const

FTransform

 

GetRefPoseTransformOfBone

(
    const FName& BoneName
)

Get the global-space retarget pose transform of the given Bone.

Public function Const

FName

 

GetRetargetChainEndBone

(
    const FName& ChainName
)

Get the Start Bone name for the given Chain.

Public function Const

FName

 

GetRetargetChainGoal

(
    const FName& ChainName
)

Get the Goal name for the given Chain.

Public function Const

const TArray...

 

GetRetargetChains()

Get read-only access to the list of Chains.

Public function Const

FName

 

GetRetargetChainStartBone

(
    const FName& ChainName
)

Get the End Bone name for the given Chain.

Public function Const

FName

 

GetRetargetRoot()

Get the name of the Root Bone of the retargeting (can only be one).

Public function Const

UObject *...

 

GetSettingsForBone

(
    const FName& BoneName,
    int32 SolverIndex
)

Get the generic (Solver-specific) Bone settings UObject for this Bone in the given Solver.

Public function Const

USkeletalMes...

 

GetSkeletalMesh()

Get the skeletal mesh asset this IK Rig was initialized with

Public function Const

USkeleton &#...

 

GetSkeleton()

Get the USkeleton asset this rig was initialized with

Public function Const

UIKRigSolver...

 

GetSolver

(
    int32 Index
)

Get access to the given solver.

Public function Const

const TArray...

 

GetSolverArray()

Get read-only access to the array of solvers.

Public function

FString

 

GetSolverUniqueName

(
    int32 SolverIndex
)

Get unique label for a given solver.

Public function Const

FName

 

GetUniqueRetargetChainName

(
    const FName& NameToMakeUnique
)

Make unique name for a retargeting bone chain. Adds a numbered suffix to make it unique.

Public function Const

bool

 

IsGoalConnectedToSolver

(
    const FName& GoalName,
    int32 SolverIndex
)

Returns true if the given Goal is connected to the given Solver. False otherwise.

Public function Const

bool

 

ModifyGoal

(
    const FName& GoalName
)

Modify a Goal for a transaction. Returns true if Goal found.

Public function Const

bool

 

MoveSolverInStack

(
    int32 SolverToMoveIndex,
    int32 TargetSolverIndex
)

Move the solver at the given index to the target index.

Public function

FOnIKRigNeed...

 

OnIKRigNeedsInitialized()

Public function

FOnRetargetC...

 

OnRetargetChainRemoved()

Public function

FOnRetargetC...

 

OnRetargetChainRenamed()

Public function Const

void

 

RemoveBoneSetting

(
    const FName& BoneName,
    int32 SolverIndex
)

Remove settings for the given Bone/Solver.

Public function Const

bool

 

RemoveGoal

(
    const FName& GoalName
)

Remove the Goal by name.

Public function Const

bool

 

RemoveRetargetChain

(
    const FName& ChainName
)

Remove a Chain with the given name. Returns true if a Chain was removed.

Public function Const

void

 

RemoveSolver

(
    const int32 SolverIndex
)

Remove the solver at the given stack index.

Public function Const

FName

 

RenameGoal

(
    const FName& OldName,
    const FName& PotentialNewName
)

Rename a Goal.

Public function Const

FName

 

RenameRetargetChain

(
    const FName& ChainName,
    const FName& NewChainName
)

Renamed the given Chain. Returns the new name (same as old if unsuccessful).

Public function Const

void

 

ResetGoalTransforms()

Reset all Goals back to their initial transforms.

Public function Static

void

 

SanitizeGoalName

(
    FString& InOutName
)

Ensure that the given name adheres to required standards for Goal names (no special characters etc..)

Public function Const

void

 

SetBoneExcluded

(
    const FName& BoneName,
    const bool bExclude
)

Include/exclude a bone from all the solvers. All bones are included by default.

Public function Const

void

 

SetEndBone

(
    const FName& EndBoneName,
    int32 SolverIndex
)

Set the end bone on a given solver.

Public function Const

bool

 

SetGoalBone

(
    const FName& GoalName,
    const FName& NewBoneName
)

The the Bone that the given Goal should be parented to / associated with.

Public function Const

void

 

SetGoalCurrentTransform

(
    const FName& GoalName,
    const FTransform& Transform
)

Set the Goal to the given transform.

Public function Const

bool

 

SetRetargetChainEndBone

(
    const FName& ChainName,
    const FName& EndBoneName
)

Set the End Bone for the given Chain. Returns true if operation was successful.

Public function Const

bool

 

SetRetargetChainGoal

(
    const FName& ChainName,
    const FName& GoalName
)

Set the Goal for the given Chain. Returns true if operation was successful.

Public function Const

bool

 

SetRetargetChainStartBone

(
    const FName& ChainName,
    const FName& StartBoneName
)

Set the Start Bone for the given Chain. Returns true if operation was successful.

Public function Const

void

 

SetRetargetRoot

(
    const FName& RootBoneName
)

Set the Root Bone of the retargeting (can only be one).

Public function Const

void

 

SetRootBone

(
    const FName& RootBoneName,
    int32 SolverIndex
)

Set the root bone on a given solver.

Public function Const

bool

 

SetSkeletalMesh

(
    USkeletalMesh* SkeletalMesh,
    bool bTransact
)

SKELETON Sets the preview mesh to use, can optionally reinitialize the skeleton with bReImportBone=true.

Public function Const

bool

 

SetSolverEnabled

(
    int32 SolverIndex,
    bool bIsEnabled
)

Enabled/disable the given solver.

Public function Const

void

 

SortRetargetChains()

Sorts the Chains from Root to tip based on the Start Bone of each Chain.

Public function Const

bool

 

ValidateChain

(
    const FName& ChainName,
    TSet< int32 >& OutChainIndices
)

Returns true if this is a valid chain.

Typedefs

Name

Description

FOnIKRigNeedsInitialized

Called whenever the rig is modified in such a way that would require re-initialization by dependent systems.

FOnRetargetChainRemoved

Called whenever a retarget chain is removed.

FOnRetargetChainRenamed

Called whenever a retarget chain is renamed.

Constants

Name

Description

AssetToControllerMap

Lazy-generated map of Controllers to IK Rig Assets. Avoids duplicate controllers.