UControlRigComponent

A component that hosts an animation ControlRig, manages control components and marshals data between the two

Choose your operating system:

Windows

macOS

Linux

Inheritance Hierarchy

References

Module

ControlRig

Header

/Engine/Plugins/Animation/ControlRig/Source/ControlRig/Public/ControlRigComponent.h

Include

#include "ControlRigComponent.h"

Syntax

UCLASS(Blueprintable, ClassGroup="Animation", Meta=(BlueprintSpawnableComponent))
class UControlRigComponent : public UPrimitiveComponent

Remarks

A component that hosts an animation ControlRig, manages control components and marshals data between the two

Variables

Name Description

Public variable UProperty Category, EditAnywhere

bool

 

bDrawBones

When checked the rig's bones are drawn using debug drawing similar to the animation editor viewport

Public variable UProperty Category, EditAnywhere

bool

 

bEnableLazyEvaluation

When checked the rig will only run if any of the mapped inputs has changed

Public variable UProperty Category, EditAnywhere

bool

 

bResetInitialsBeforeSetup

When checked the initial transforms on bones, nulls and controls are reset prior to a setup event

Public variable UProperty Category, EditAnywhere

bool

 

bResetTransformBeforeTick

When checked the transforms are reset before a tick / update of the rig

Public variable UProperty Category, EditAnywhere

bool

 

bShowDebugDrawing

When checked the rig's debug drawing instructions are drawn in the viewport

Public variable UProperty Category, EditAnywhere

bool

 

bUpdateInEditor

When checked the rig is run in the editor viewport without running / simulation the game

Public variable UProperty Category, EditAnywhere

bool

 

bUpdateRigOnTick

When checked this ensures to run the rig's update on the component's tick automatically

Public variable UProperty Category, EditAnywhere, Meta

TSubclassOf< UC...

 

ControlRigClass

The class of control rig to instantiate

Public variable UProperty Category, EditAnywhere, Meta

float

 

LazyEvaluationPositionThreshold

The delta threshold for a translation / position difference. 0.0 disables position differences.

Public variable UProperty Category, EditAnywhere, Meta

float

 

LazyEvaluationRotationThreshold

The delta threshold for a rotation difference (in degrees). 0.0 disables rotation differences.

Public variable UProperty Category, EditAnywhere, Meta

float

 

LazyEvaluationScaleThreshold

The delta threshold for a scale difference. 0.0 disables scale differences.

Public variable UProperty Category, EditAnywhere

TArray< FContro...

 

MappedElements

Public variable UProperty Category, Meta BlueprintAssignable

FControlRigComp...

 

OnPostForwardsSolveDelegate

Event fired after this component's ControlRig's forwards solve

Public variable UProperty Category, Meta BlueprintAssignable

FControlRigComp...

 

OnPostInitializeDelegate

Event fired after this component's ControlRig is initialized

Public variable UProperty Category, Meta BlueprintAssignable

FControlRigComp...

 

OnPostSetupDelegate

Event fired after this component's ControlRig is setup

Public variable UProperty Category, Meta BlueprintAssignable

FControlRigComp...

 

OnPreForwardsSolveDelegate

Event fired before this component's ControlRig's forwards solve

Public variable UProperty Category, Meta BlueprintAssignable

FControlRigComp...

 

OnPreInitializeDelegate

Event fired just before this component's ControlRig is initialized

Public variable UProperty Category, Meta BlueprintAssignable

FControlRigComp...

 

OnPreSetupDelegate

Event fired before this component's ControlRig is setup

Constructors

Name Description

Public function

UControlRigComponent

(
    const FObjectInitializer& ObjectIn...
)

Functions

Name Description

Public function UFunction BlueprintCallable, Category, Meta

void

 

AddMappedCompleteSkeletalMesh

(
    USkeletalMeshComponent* Skelet...
)

Adds all matching bones to the rig, should not be used before OnPreInitialize Event

Public function UFunction BlueprintCallable, Category, Meta

void

 

AddMappedComponents

Adds a series of mapped bones to the rig, should not be used before OnPreInitialize Event

Public function UFunction BlueprintCallable, Category, Meta

void

 

AddMappedElements

Adds the provided mapped elements to the component, should not be used before OnPreInitialize Event

Public function UFunction BlueprintCallable, Category, Meta

void

 

AddMappedSkeletalMesh

Adds a series of mapped bones to the rig, should not be used before OnPreInitialize Event

Public function UFunction BlueprintPure, Category

bool

 

CanExecute()

Returns true if the Component can execute its Control Rig

Public function UFunction BlueprintCallable, Category

void

 

ClearMappedElements()

Removes all mapped elements from the component

Public function UFunction BlueprintPure, Category

bool

 

DoesElementExist

(
    FName Name,
    ERigElementType ElementType
)

Returns true if an element given a type and name exists in the rig

Public function Const UFunction BlueprintPure, Category

float

 

GetAbsoluteTime()

Get the ControlRig's local time in seconds since its last initialize

Public function UFunction BlueprintPure, Category

FTransform

 

GetBoneTransform

(
    FName BoneName,
    EControlRigComponentSpace Space
)

Returns the transform of the bone in the requested space

Public function UFunction BlueprintPure, Category

bool

 

GetControlBool

(
    FName ControlName
)

Returns the value of a bool control

Public function UFunction BlueprintPure, Category

float

 

GetControlFloat

(
    FName ControlName
)

Returns the value of a float control

Public function UFunction BlueprintPure, Category

int32

 

GetControlInt

(
    FName ControlName
)

Returns the value of an integer control

Public function UFunction BlueprintCallable, Category

FTransform

 

GetControlOffset

(
    FName ControlName,
    EControlRigComponentSpace Space
)

Returns the offset transform of a control

Public function UFunction BlueprintPure, Category

FVector

 

GetControlPosition

(
    FName ControlName,
    EControlRigComponentSpace Space
)

Returns the value of a position control

Public function UFunction BlueprintPure, Category

UControlRig ...

 

GetControlRig()

Get the ControlRig hosted by this component

Public function UFunction BlueprintPure, Category

FRotator

 

GetControlRotator

(
    FName ControlName,
    EControlRigComponentSpace Space
)

Returns the value of a rotator control

Public function UFunction BlueprintPure, Category

FVector

 

GetControlScale

(
    FName ControlName,
    EControlRigComponentSpace Space
)

Returns the value of a scale control

Public function UFunction BlueprintPure, Category

FTransform

 

GetControlTransform

(
    FName ControlName,
    EControlRigComponentSpace Space
)

Returns the value of a transform control

Public function UFunction BlueprintPure, Category

FVector2D

 

GetControlVector2D

(
    FName ControlName
)

Returns the value of a Vector3D control

Public function UFunction BlueprintPure, Category

TArray< FNam...

 

GetElementNames

(
    ERigElementType ElementType
)

Returns all of the names for a given element type (Bone, Control, etc)

Public function UFunction BlueprintPure, Category

FTransform

 

GetInitialBoneTransform

(
    FName BoneName,
    EControlRigComponentSpace Space
)

Returns the initial transform of the bone in the requested space

Public function UFunction BlueprintPure, Category

FTransform

 

GetInitialSpaceTransform

(
    FName SpaceName,
    EControlRigComponentSpace Space
)

Returns the initial transform of the space in the requested space

Public function UFunction BlueprintPure, Category

FTransform

 

GetSpaceTransform

(
    FName SpaceName,
    EControlRigComponentSpace Space
)

Returns the transform of the space in the requested space

Public function UFunction BlueprintCallable, Category

void

 

Initialize()

Initializes the rig's memory and calls the setup event

Public function

FControlRigC...

 

OnControlRigCreated()

Public function UFunction Category, Meta blueprintnativeevent, callineditor

void

 

OnPostForwardsSolve

(
    UControlRigComponent* Componen...
)

Public function UFunction Category blueprintnativeevent, callineditor

void

 

OnPostInitialize

(
    UControlRigComponent* Componen...
)

Public function UFunction Category blueprintnativeevent, callineditor

void

 

OnPostSetup

(
    UControlRigComponent* Componen...
)

Public function UFunction Category, Meta blueprintnativeevent, callineditor

void

 

OnPreForwardsSolve

(
    UControlRigComponent* Componen...
)

Public function UFunction Category blueprintnativeevent, callineditor

void

 

OnPreInitialize

(
    UControlRigComponent* Componen...
)

Public function UFunction Category blueprintnativeevent, callineditor

void

 

OnPreSetup

(
    UControlRigComponent* Componen...
)

Public function UFunction BlueprintCallable, Category, Meta

void

 

SetBoneInitialTransformsFromSkeletalMesh

(
    USkeletalMesh* InSkeletalMesh
)

Setup the initial transforms / ref pose of the bones based on a skeletal mesh

Public function UFunction BlueprintCallable, Category

void

 

SetBoneTransform

(
    FName BoneName,
    FTransform Transform,
    EControlRigComponentSpace Space,
    float Weight,
    bool bPropagateToChildren
)

Sets the transform of the bone in the requested space

Public function UFunction BlueprintCallable, Category

void

 

SetControlBool

(
    FName ControlName,
    bool Value
)

Sets the value of a bool control

Public function UFunction BlueprintCallable, Category

void

 

SetControlFloat

(
    FName ControlName,
    float Value
)

Sets the value of a float control

Public function UFunction BlueprintCallable, Category

void

 

SetControlInt

(
    FName ControlName,
    int32 Value
)

Sets the value of an integer control

Public function UFunction BlueprintCallable, Category

void

 

SetControlOffset

(
    FName ControlName,
    FTransform OffsetTransform,
    EControlRigComponentSpace Space
)

Sets the offset transform of a control

Public function UFunction BlueprintCallable, Category

void

 

SetControlPosition

(
    FName ControlName,
    FVector Value,
    EControlRigComponentSpace Space
)

Sets the value of a position control

Public function

void

 

SetControlRig

(
    UControlRig* ControlRig
)

Public function UFunction BlueprintCallable, Category

void

 

SetControlRotator

(
    FName ControlName,
    FRotator Value,
    EControlRigComponentSpace Space
)

Sets the value of a rotator control

Public function UFunction BlueprintCallable, Category

void

 

SetControlScale

(
    FName ControlName,
    FVector Value,
    EControlRigComponentSpace Space
)

Sets the value of a scale control

Public function UFunction BlueprintCallable, Category

void

 

SetControlTransform

(
    FName ControlName,
    FTransform Value,
    EControlRigComponentSpace Space
)

Sets the value of a transform control

Public function UFunction BlueprintCallable, Category

void

 

SetControlVector2D

(
    FName ControlName,
    FVector2D Value
)

Sets the value of a vector2D control

Public function UFunction BlueprintCallable, Category

void

 

SetInitialBoneTransform

(
    FName BoneName,
    FTransform InitialTransform,
    EControlRigComponentSpace Space,
    bool bPropagateToChildren
)

Sets the initial transform of the bone in the requested space

Public function UFunction BlueprintCallable, Category

void

 

SetInitialSpaceTransform

(
    FName SpaceName,
    FTransform InitialTransform,
    EControlRigComponentSpace Space
)

Sets the transform of the space in the requested space

Public function UFunction BlueprintCallable, Category, Meta

void

 

SetMappedElements

Replaces the mapped elements on the component with the provided array, should not be used before OnPreInitialize Event

Public function UFunction BlueprintCallable, Category

void

 

Update

(
    float DeltaTime
)

Updates and ticks the rig.

Overridden from UPrimitiveComponent

Name Description

Public function Virtual

FPrimitiveSc...

 

CreateSceneProxy()

Creates a proxy to represent the primitive to the scene manager in the rendering thread.

Overridden from USceneComponent

Name Description

Public function Virtual Const

FBoxSphereBo...

 

CalcBounds

(
    const FTransform& LocalToWorld
)

Calculate the bounds of the component. Default behavior is a bounding box/sphere of zero size.

Overridden from UActorComponent

Name Description

Public function Virtual

void

 

InitializeComponent()

Initializes the component.

Public function Virtual

void

 

OnRegister()

Called when a component is registered, after Scene is set, but before CreateRenderState_Concurrent or OnCreatePhysicsState are called.

Public function Virtual

void

 

OnUnregister()

Called when a component is unregistered.

Public function Virtual

void

 

TickComponent

(
    float DeltaTime,
    enum ELevelTick TickType,
    FActorComponentTickFunction* T...
)

Function called every frame on this ActorComponent.

Overridden from UObject

Name Description

Public function Virtual

void

 

BeginDestroy()

Called before destroying the object.

Public function Virtual

void

 

PostEditChangeProperty

(
    FPropertyChangedEvent& PropertyCha...
)

Called when a property on this object has been modified externally

Classes

Name

Description

Public class

FControlRigComponentEvent

Constants

Name

Description

EditorNotifications