Navigation
API > API/Runtime > API/Runtime/Engine > API/Runtime/Engine/Animation
Inheritance Hierarchy
- FAnimNode_Base
- FAnimNode_StateMachine
References
| Module | Engine |
| Header | /Engine/Source/Runtime/Engine/Classes/Animation/AnimNode_StateMachine.h |
| Include | #include "Animation/AnimNode_StateMachine.h" |
Syntax
struct FAnimNode_StateMachine : public FAnimNode_Base
Remarks
State machine node.
Variables
| Type | Name | Description | |
|---|---|---|---|
| TArray< FAnimationActiveTransitionEntry > | ActiveTransitionArray | The set of active transitions, if there are any. | |
| bool | bAllowConduitEntryStates | Allows a conduit to be used as this state machine's entry state If a valid entry state cannot be found at runtime then this will generate a reference pose! | |
| bool | bCreateNotifyMetaData | Tag Notifies with meta data such as the active state and mirroring state. | |
| bool | bReinitializeOnBecomingRelevant | Reinitialize the state machine if we have become relevant to the graph after not being ticked on the previous frame(s) | |
| bool | bSkipFirstUpdateTransition | When the state machine becomes relevant, it is initialized into the Entry state. | |
| int32 | CurrentState | The current state within the state machine. | |
| float | ElapsedTime | Elapsed time since entering the current state. | |
| int32 | EvaluatingTransitionIndex | Current Transition Index being evaluated. | |
| TArray< FTransitionEvent > | HandledTransitionEvents | The set of transition requests handled this update. | |
| int32 | MaxTransitionsPerFrame | The maximum number of transitions that can be taken by this machine 'simultaneously' in a single frame. | |
| int32 | MaxTransitionsRequests | The maximum number of transition requests that can be buffered at any time. | |
| TArray< FOnGraphStateChanged > | OnGraphStatesEntered | Delegates that native code can hook into to handle state entry. | |
| TArray< FOnGraphStateChanged > | OnGraphStatesExited | Delegates that native code can hook into to handle state exits. | |
| const FBakedAnimationStateMachine * | PRIVATE_MachineDescription | The state machine description this is an instance of. | |
| TArray< FTransitionEvent > | QueuedTransitionEvents | All alive transition requests that have been queued. | |
| int32 | StateMachineIndexInClass | Index into the BakedStateMachines array in the owning UAnimBlueprintGeneratedClass. | |
| TArray< FPoseLink > | StatePoseLinks | The set of states in this state machine. | |
| TArray< int32 > | StatesUpdated | Used during transitions to make sure we don't double tick a state if it appears multiple times. |
Constructors
| Type | Name | Description | |
|---|---|---|---|
Functions
| Type | Name | Description | |
|---|---|---|---|
| void | CacheMachineDescription
(
IAnimClassInterface* AnimBlueprintClass |
Cache the internal machine description | |
| void | Removes all queued transition requests | ||
| void | ClearTransitionEvents
(
const FName& EventName |
Removes all queued transition requests with the given event name | |
| void | ConditionallyCacheBonesForState
(
int32 StateIndex, |
||
| void | Removes all marked events that are queued | ||
| const FPoseContext & | EvaluateState
(
int32 StateIndex, |
||
| void | EvaluateTransitionCustomBlend
(
FPoseContext& Output, |
||
| void | EvaluateTransitionStandardBlend
(
FPoseContext& Output, |
Transition type evaluation functions | |
| void | EvaluateTransitionStandardBlendInternal
(
FPoseContext& Output, |
Transition type evaluation functions | |
| bool | FindValidTransition
(
const FAnimationUpdateContext& Context, |
Finds the highest priority valid transition, information pass via the OutPotentialTransition variable. | |
| int32 | |||
| float | |||
| FName | |||
| const FBakedAnimationStateMachine * | Tries to get the instance information for the state machine. | ||
| float | GetRelevantAnimTimeRemaining
(
const FAnimationUpdateContext& Context, |
Get the time remaining in seconds for the most relevant animation in the source state. | |
| float | GetRelevantAnimTimeRemaining
(
const FAnimInstanceProxy* InAnimInstanceProxy, |
Get the time remaining in seconds for the most relevant animation in the source state. | |
| float | GetRelevantAnimTimeRemainingFraction
(
const FAnimationUpdateContext& Context, |
Get the time remaining as a fraction of the duration for the most relevant animation in the source state. | |
| float | GetRelevantAnimTimeRemainingFraction
(
const FAnimInstanceProxy* InAnimInstanceProxy, |
Get the time remaining as a fraction of the duration for the most relevant animation in the source state. | |
| const FAnimNode_AssetPlayerRelevancyBase * | GetRelevantAssetPlayerInterfaceFromState
(
const FAnimationUpdateContext& Context, |
||
| const FAnimNode_AssetPlayerRelevancyBase * | GetRelevantAssetPlayerInterfaceFromState
(
const FAnimInstanceProxy* InAnimInstanceProxy, |
||
| const int32 | GetStateIndex
(
const FBakedAnimationState& StateInfo |
||
| const int32 | GetStateIndex
(
FName StateName |
||
| const FBakedAnimationState & | GetStateInfo
(
int32 StateIndex |
||
| const FBakedAnimationState & | GetStateInfo () |
||
| float | GetStateWeight
(
int32 StateIndex |
Returns the blend weight of the specified state, as calculated by the last call to Update() | |
| const FAnimationTransitionBetweenStates & | GetTransitionInfo
(
int32 TransIndex |
||
| bool | IsAConduitState
(
int32 StateIndex |
Helper function to test if a state is a conduit | |
| bool | IsTransitionActive
(
int32 TransIndex |
||
| bool | IsValidTransitionIndex
(
int32 TransitionIndex |
||
| void | LogInertializationRequestError
(
const FAnimationUpdateContext& Context, |
||
| bool | QueryAndMarkTransitionEvent
(
const int32 TransitionIndex, |
Behaves like QueryTransitionEvent but additionally marks the event for consumption | |
| bool | QueryTransitionEvent
(
const int32 TransitionIndex, |
Returns whether or not the given event transition request has been queued | |
| bool | RequestTransitionEvent
(
const FTransitionEvent& InTransitionEvent |
Queues a new transition request, returns true if the transition request was successfully queued | |
| void | SetState
(
const FAnimationBaseContext& Context, |
||
| void | SetStateInternal
(
int32 NewStateIndex |
||
| void | TransitionToState
(
const FAnimationUpdateContext& Context, |
||
| void | UpdateState
(
int32 StateIndex, |
Helper functions for calling update and evaluate on state nodes | |
| void | UpdateTransitionStates
(
const FAnimationUpdateContext& Context, |
Helper function that will update the states associated with a transition. |
Overridden from FAnimNode_Base
| Type | Name | Description | |
|---|---|---|---|
| void | CacheBones_AnyThread
(
const FAnimationCacheBonesContext& Context |
Called to cache any bones that this node needs to track (e.g. in a FBoneReference). | |
| void | Evaluate_AnyThread
(
FPoseContext& Output |
Called to evaluate local-space bones transforms according to the weights set up in Update(). | |
| void | GatherDebugData
(
FNodeDebugData& DebugData |
Called to gather on-screen debug data. This is called on the game thread. | |
| void | Initialize_AnyThread
(
const FAnimationInitializeContext& Context |
Called when the node first runs. | |
| void | Update_AnyThread
(
const FAnimationUpdateContext& Context |
Called to update the state of the graph relative to this node. |
Deprecated Functions
| Type | Name | Description | |
|---|---|---|---|
| const FAnimNode_AssetPlayerBase * | GetRelevantAssetPlayerFromState
(
const FAnimationUpdateContext& Context, |
Please use GetRelevantAssetPlayerInterfaceFromState | |
| const FAnimNode_AssetPlayerBase * | GetRelevantAssetPlayerFromState
(
const FAnimInstanceProxy* InAnimInstanceProxy, |
Please use GetRelevantAssetPlayerInterfaceFromState |