Navigation
API > API/Runtime > API/Runtime/Engine
State machine node.
| Name | FAnimNode_StateMachine |
| Type | struct |
| Header File | /Engine/Source/Runtime/Engine/Classes/Animation/AnimNode_StateMachine.h |
| Include Path | #include "Animation/AnimNode_StateMachine.h" |
Syntax
USTRUCT ()
struct FAnimNode_StateMachine : public FAnimNode_Base
Inheritance Hierarchy
- FAnimNode_Base → FAnimNode_StateMachine
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
FAnimNode_StateMachine() |
Animation/AnimNode_StateMachine.h |
Variables
Public
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| bAllowConduitEntryStates | bool | 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! | Animation/AnimNode_StateMachine.h |
|
| bCreateNotifyMetaData | bool | Tag Notifies with meta data such as the active state and mirroring state. | Animation/AnimNode_StateMachine.h |
|
| bReinitializeOnBecomingRelevant | bool | Reinitialize the state machine if we have become relevant to the graph after not being ticked on the previous frame(s) | Animation/AnimNode_StateMachine.h |
|
| bSkipFirstUpdateTransition | bool | When the state machine becomes relevant, it is initialized into the Entry state. | Animation/AnimNode_StateMachine.h |
|
| MaxTransitionsPerFrame | int32 | The maximum number of transitions that can be taken by this machine 'simultaneously' in a single frame. | Animation/AnimNode_StateMachine.h |
|
| MaxTransitionsRequests | int32 | The maximum number of transition requests that can be buffered at any time. | Animation/AnimNode_StateMachine.h |
|
| StateMachineIndexInClass | int32 | Index into the BakedStateMachines array in the owning UAnimBlueprintGeneratedClass. | Animation/AnimNode_StateMachine.h |
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| bFirstUpdate | bool | True if it is the first update. | Animation/AnimNode_StateMachine.h | |
| StateCacheBoneCounters | TArray< FGraphTraversalCounter > | Animation/AnimNode_StateMachine.h | ||
| StateCachedPoses | TArray< FPoseContext * > | Animation/AnimNode_StateMachine.h | ||
| UpdateCounter | FGraphTraversalCounter | Animation/AnimNode_StateMachine.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void CacheMachineDescription
(
IAnimClassInterface* AnimBlueprintClass |
Cache the internal machine description | Animation/AnimNode_StateMachine.h | |
void ConditionallyCacheBonesForState
(
int32 StateIndex, |
Animation/AnimNode_StateMachine.h | ||
int32 GetCurrentState() |
Animation/AnimNode_StateMachine.h | ||
float GetCurrentStateElapsedTime() |
Animation/AnimNode_StateMachine.h | ||
FName GetCurrentStateName() |
Animation/AnimNode_StateMachine.h | ||
const int32 GetStateIndex
(
FName StateName |
Animation/AnimNode_StateMachine.h | ||
const FBakedAnimationState & GetStateInfo
(
int32 StateIndex |
Animation/AnimNode_StateMachine.h | ||
float GetStateWeight
(
int32 StateIndex |
Returns the blend weight of the specified state, as calculated by the last call to Update() | Animation/AnimNode_StateMachine.h | |
const FAnimationTransitionBetweenStates & GetTransitionInfo
(
int32 TransIndex |
Animation/AnimNode_StateMachine.h | ||
bool IsTransitionActive
(
int32 TransIndex |
Animation/AnimNode_StateMachine.h | ||
bool IsValidTransitionIndex
(
int32 TransitionIndex |
Animation/AnimNode_StateMachine.h | ||
void SetState
(
const FAnimationBaseContext& Context, |
Animation/AnimNode_StateMachine.h | ||
void TransitionToState
(
const FAnimationUpdateContext& Context, |
Animation/AnimNode_StateMachine.h |
Overridden from FAnimNode_Base
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void CacheBones_AnyThread
(
const FAnimationCacheBonesContext& Context |
Called to cache any bones that this node needs to track (e.g. in a FBoneReference). | Animation/AnimNode_StateMachine.h | |
virtual void Evaluate_AnyThread
(
FPoseContext& Output |
Called to evaluate local-space bones transforms according to the weights set up in Update(). | Animation/AnimNode_StateMachine.h | |
virtual void GatherDebugData
(
FNodeDebugData& DebugData |
Called to gather on-screen debug data. This is called on the game thread. | Animation/AnimNode_StateMachine.h | |
virtual void Initialize_AnyThread
(
const FAnimationInitializeContext& Context |
Called when the node first runs. | Animation/AnimNode_StateMachine.h | |
virtual void Update_AnyThread
(
const FAnimationUpdateContext& Context |
Called to update the state of the graph relative to this node. | Animation/AnimNode_StateMachine.h |
Protected
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void ClearAllTransitionEvents() |
Removes all queued transition requests | Animation/AnimNode_StateMachine.h | |
void ClearTransitionEvents
(
const FName& EventName |
Removes all queued transition requests with the given event name | Animation/AnimNode_StateMachine.h | |
void ConsumeMarkedTransitionEvents() |
Removes all marked events that are queued | Animation/AnimNode_StateMachine.h | |
const FPoseContext & EvaluateState
(
int32 StateIndex, |
Animation/AnimNode_StateMachine.h | ||
void EvaluateTransitionCustomBlend
(
FPoseContext& Output, |
Animation/AnimNode_StateMachine.h | ||
void EvaluateTransitionStandardBlend
(
FPoseContext& Output, |
Transition type evaluation functions | Animation/AnimNode_StateMachine.h | |
void EvaluateTransitionStandardBlendInternal
(
FPoseContext& Output, |
Animation/AnimNode_StateMachine.h | ||
bool FindValidTransition
(
const FAnimationUpdateContext& Context, |
Finds the highest priority valid transition, information pass via the OutPotentialTransition variable. | Animation/AnimNode_StateMachine.h | |
const FBakedAnimationStateMachine * GetMachineDescription() |
Tries to get the instance information for the state machine. | Animation/AnimNode_StateMachine.h | |
float GetRelevantAnimTimeRemaining
(
const FAnimationUpdateContext& Context, |
Animation/AnimNode_StateMachine.h | ||
float GetRelevantAnimTimeRemaining
(
const FAnimInstanceProxy* InAnimInstanceProxy, |
Get the time remaining in seconds for the most relevant animation in the source state. | Animation/AnimNode_StateMachine.h | |
float GetRelevantAnimTimeRemainingFraction
(
const FAnimationUpdateContext& Context, |
Animation/AnimNode_StateMachine.h | ||
float GetRelevantAnimTimeRemainingFraction
(
const FAnimInstanceProxy* InAnimInstanceProxy, |
Get the time remaining as a fraction of the duration for the most relevant animation in the source state. | Animation/AnimNode_StateMachine.h | |
const FAnimNode_AssetPlayerBase * GetRelevantAssetPlayerFromState
(
const FAnimationUpdateContext& Context, |
Animation/AnimNode_StateMachine.h | ||
const FAnimNode_AssetPlayerBase * GetRelevantAssetPlayerFromState
(
const FAnimInstanceProxy* InAnimInstanceProxy, |
Animation/AnimNode_StateMachine.h | ||
const FAnimNode_AssetPlayerRelevancyBase * GetRelevantAssetPlayerInterfaceFromState
(
const FAnimationUpdateContext& Context, |
Animation/AnimNode_StateMachine.h | ||
const FAnimNode_AssetPlayerRelevancyBase * GetRelevantAssetPlayerInterfaceFromState
(
const FAnimInstanceProxy* InAnimInstanceProxy, |
Animation/AnimNode_StateMachine.h | ||
const int32 GetStateIndex
(
const FBakedAnimationState& StateInfo |
Animation/AnimNode_StateMachine.h | ||
const FBakedAnimationState & GetStateInfo () |
Animation/AnimNode_StateMachine.h | ||
bool IsAConduitState
(
int32 StateIndex |
Helper function to test if a state is a conduit | Animation/AnimNode_StateMachine.h | |
virtual void LogInertializationRequestError
(
const FAnimationUpdateContext& Context, |
Animation/AnimNode_StateMachine.h | ||
bool QueryAndMarkTransitionEvent
(
const int32 TransitionIndex, |
Behaves like QueryTransitionEvent but additionally marks the event for consumption | Animation/AnimNode_StateMachine.h | |
bool QueryTransitionEvent
(
const int32 TransitionIndex, |
Returns whether or not the given event transition request has been queued | Animation/AnimNode_StateMachine.h | |
bool RequestTransitionEvent
(
const FTransitionEvent& InTransitionEvent |
Queues a new transition request, returns true if the transition request was successfully queued | Animation/AnimNode_StateMachine.h | |
void SetStateInternal
(
int32 NewStateIndex |
Animation/AnimNode_StateMachine.h | ||
void UpdateState
(
int32 StateIndex, |
Helper functions for calling update and evaluate on state nodes | Animation/AnimNode_StateMachine.h | |
void UpdateTransitionStates
(
const FAnimationUpdateContext& Context, |
Helper function that will update the states associated with a transition. | Animation/AnimNode_StateMachine.h |