FAnimNode_StateMachine

Inheritance Hierarchy

FAnimNode_Base

FAnimNode_StateMachine

Syntax

struct FAnimNode_StateMachine : public FAnimNode_Base

Remarks

State machine node.

Variables

Name Description

Protected variable

TArray < FAnimat ...

 

ActiveTransitionArray

The set of active transitions, if there are any.

Public variable

bool

 

bReinitializeOnBecomingRelevant

Reinitialize the state machine if we have become relevant to the graph after not being ticked on the previous frame(s)

Public variable

bool

 

bSkipFirstUpdateTransition

When the state machine becomes relevant, it is initialized into the Entry state.

Protected variable

int32

 

CurrentState

The current state within the state machine.

Protected variable

float

 

ElapsedTime

Elapsed time since entering the current state.

Protected variable

int32

 

EvaluatingTransitionIndex

Current Transition Index being evaluated.

Public variable

int32

 

MaxTransitionsPerFrame

The maximum number of transitions that can be taken by this machine 'simultaneously' in a single frame.

Protected variable

TArray < FOnGrap ...

 

OnGraphStatesEntered

Delegates that native code can hook into to handle state entry.

Protected variable

TArray < FOnGrap ...

 

OnGraphStatesExited

Delegates that native code can hook into to handle state exits.

Protected variable

const FBakedAni ...

 

PRIVATE_MachineDescription

The state machine description this is an instance of.

Public variable

int32

 

StateMachineIndexInClass

Index into the BakedStateMachines array in the owning UAnimBlueprintGeneratedClass .

Protected variable

TArray < FPoseLi ...

 

StatePoseLinks

The set of states in this state machine.

Protected variable

TArray < int32 >

 

StatesUpdated

Used during transitions to make sure we don't double tick a state if it appears multiple times.

Constructors

Name Description

Public function

FAnimNode_StateMachine()

Functions

Name Description

Public function

void

 

CacheMachineDescription

(
    IAnimClassInterface * AnimBluep...
)

Cache the internal machine description

Public function

void

 

ConditionallyCacheBonesForState

(
    int32 StateIndex,
    FAnimationBaseContext Context
)

Protected function

const FPoseC ...

 

EvaluateState

(
    int32 StateIndex,
    const FPoseContext & Context
)

Protected function

void

 

EvaluateTransitionCustomBlend

(
    FPoseContext & Output,
    FAnimationActiveTransitionEntry & T...,
    bool bIntermediatePoseIsValid
)

Protected function

void

 

EvaluateTransitionStandardBlend

(
    FPoseContext & Output,
    FAnimationActiveTransitionEntry & T...,
    bool bIntermediatePoseIsValid
)

Transition type evaluation functions

Protected function

void

 

EvaluateTransitionStandardBlendInternal

(
    FPoseContext & Output,
    FAnimationActiveTransitionEntry & T...,
    const FPoseContext & PreviousStateR...,
    const FPoseContext & NextStateResul...
)

Transition type evaluation functions

Protected function

bool

 

FindValidTransition

(
    const FAnimationUpdateContext & Con...,
    const FBakedAnimationState & StateI...,
    FAnimationPotentialTransition & Out...,
    TArray < int32 , TInlineAllocator < 4 ...
)

Finds the highest priority valid transition, information pass via the OutPotentialTransition variable.

Public function Const

int32

 

GetCurrentState()

Public function Const

float

 

GetCurrentStateElapsedTime()

Public function Const

FName

 

GetCurrentStateName()

Protected function Const

const FBaked ...

 

GetMachineDescription()

Tries to get the instance information for the state machine.

Protected function

FAnimNode_As ...

 

GetRelevantAssetPlayerFromState

(
    const FAnimationUpdateContext & Con...,
    const FBakedAnimationState & StateI...
)

Protected function Const

const int32

 

GetStateIndex

(
    const FBakedAnimationState & StateI...
)

Protected function Const

const FBaked ...

 

GetStateInfo()

Public function Const

const FBaked ...

 

GetStateInfo

(
    int32 StateIndex
)

Public function Const

float

 

GetStateWeight

(
    int32 StateIndex
)

Returns the blend weight of the specified state, as calculated by the last call to Update()

Public function Const

const FAnima ...

 

GetTransitionInfo

(
    int32 TransIndex
)

Protected function Const

bool

 

IsAConduitState

(
    int32 StateIndex
)

Helper function to test if a state is a conduit

Public function Const

bool

 

IsTransitionActive

(
    int32 TransIndex
)

Public function Const

bool

 

IsValidTransitionIndex

(
    int32 TransitionIndex
)

Protected function

void

 

SetState

(
    const FAnimationBaseContext & Conte...,
    int32 NewStateIndex
)

Protected function

void

 

SetStateInternal

(
    int32 NewStateIndex
)

Protected function

void

 

UpdateState

(
    int32 StateIndex,
    const FAnimationUpdateContext & Con...
)

Helper functions for calling update and evaluate on state nodes

Protected function

void

 

UpdateTransitionStates

(
    const FAnimationUpdateContext & Con...,
    FAnimationActiveTransitionEntry & T...
)

Helper function that will update the states associated with a transition.

Overridden from FAnimNode_Base

Name Description

Public function Virtual

void

 

CacheBones_AnyThread

(
    const FAnimationCacheBonesContext &...
)

Called to cache any bones that this node needs to track (e.g. in a FBoneReference ).

Public function Virtual

void

 

Evaluate_AnyThread

(
    FPoseContext & Output
)

Called to evaluate local-space bones transforms according to the weights set up in Update() .

Public function Virtual

void

 

GatherDebugData

(
    FNodeDebugData & DebugData
)

Called to gather on-screen debug data. This is called on the game thread.

Public function Virtual

void

 

Initialize_AnyThread

(
    const FAnimationInitializeContext &...
)

Called when the node first runs.

Public function Virtual

void

 

Update_AnyThread

(
    const FAnimationUpdateContext & Con...
)

Called to update the state of the graph relative to this node.

References

Module

Engine

Header

Runtime/Engine/Classes/Animation/AnimNode_StateMachine.h