class

AnimationController

State machine for managing animation transitions and blending Designed to work with AnimatorComponent and AnimationBlender

Module
Animation
Header
#include "Animation/AnimationController.h"
Namespace
Mowo

Constructors

SignatureNameDescription
AnimationController() = defaultAnimationController

Public functions

ReturnsNameDescription
voidAddState
AnimationState*GetState
const AnimationState*GetState
voidSetDefaultState
const std::string&GetDefaultState
voidSetBool
voidSetFloat
voidSetInt
voidSetTrigger
voidSetTriggerValueDeclare a trigger without firing it (editor/serializer: a trigger the asset lists must survive a round-trip even while unfired).
boolGetBool
floatGetFloat
intGetInt
voidForceTransitionForce transition to a specific state (ignoring conditions)
voidAddAnyStateTransitionAny-State transitions (UE/Unity's Any State node): evaluated every frame BEFORE the current state's own transitions, from whatever state is active — hit reacts and deaths authored once instead of on every source state.
const std::vector<AnimationTransition>&GetAnyStateTransitions
std::vector<AnimationTransition>&GetAnyStateTransitions
UpdateResultUpdateexternalSync (optional): a shared group→phase map published by LEADER states of other controllers (one per world, owned by the AnimationSystem, one frame of latency).
voidSetParameterOwnerA nested machine reads its OWNER's parameters instead of its own — one animator, one set of parameters, and a trigger the parent clears cannot be consumed twice.
boolHasSyncGroupMarker
AnimMarkerSegmentGetSyncGroupMarker
voidResolveClipsBind every state's / blend sample's clipName to an index into clips.
const std::string&GetCurrentStateName
boolIsBlending
floatGetSyncGroupPhase
boolHasSyncGroupPhase
voidCopyStateFromCopy all state/parameters from another controller (since RefCounted is non-copyable)
voidReset
const std::vector<AnimationState>&GetStates
std::vector<AnimationState>&GetStates
const std::unordered_map<std::string, bool>&GetBoolParamsParameter access for editor/serialization
const std::unordered_map<std::string, float>&GetFloatParams
const std::unordered_map<std::string, int>&GetIntParams
const std::unordered_map<std::string, bool>&GetTriggers
voidRemoveBool
voidRemoveFloat
voidRemoveInt
voidRemoveTrigger
boolEvaluateConditionEvaluate a single condition against current parameters
FAnimGraph&GetGraphThe pose-composition graph layered over this state machine (empty = the historical state-machine-only path).
const FAnimGraph&GetGraph
std::unordered_map<std::string, FMirrorTable>&GetMirrorTablesMirror tables addressable by the graph's Mirror nodes.
const std::unordered_map<std::string, FMirrorTable>&GetMirrorTables
std::unordered_map<std::string, FBlendProfile>&GetBlendProfilesBlend profiles addressable by name from a transition (per-bone blend windows) and from the graph's LayeredBlend / BlendByFloat / BlendByBool nodes (per-bone weight scaling).
const std::unordered_map<std::string, FBlendProfile>&GetBlendProfiles

Function details

AnimationController

C++
AnimationController() = default

AddState

C++
void AddState(const AnimationState& state)

GetState

C++
AnimationState* GetState(const std::string& name)

GetState

C++
const AnimationState* GetState(const std::string& name) const

SetDefaultState

C++
void SetDefaultState(const std::string& name)

GetDefaultState

C++
const std::string& GetDefaultState() const

SetBool

C++
void SetBool(const std::string& name, bool value)

SetFloat

C++
void SetFloat(const std::string& name, float value)

SetInt

C++
void SetInt(const std::string& name, int value)

SetTrigger

C++
void SetTrigger(const std::string& name)

SetTriggerValue

C++
void SetTriggerValue(const std::string& name, bool value)

Declare a trigger without firing it (editor/serializer: a trigger the asset lists must survive a round-trip even while unfired).

GetBool

C++
bool GetBool(const std::string& name) const

GetFloat

C++
float GetFloat(const std::string& name) const

GetInt

C++
int GetInt(const std::string& name) const

ForceTransition

C++
void ForceTransition(const std::string& stateName, float blendDuration = 0.25f)

Force transition to a specific state (ignoring conditions)

AddAnyStateTransition

C++
void AddAnyStateTransition(const AnimationTransition& transition)

Any-State transitions (UE/Unity's Any State node): evaluated every frame BEFORE the current state's own transitions, from whatever state is active — hit reacts and deaths authored once instead of on every source state. Exit time is ignored (there is no meaningful source clip); conditions and the interruption-priority gate apply unchanged. A transition targeting the already-current state is skipped so it cannot re-fire forever.

GetAnyStateTransitions

C++
const std::vector<AnimationTransition>& GetAnyStateTransitions() const

GetAnyStateTransitions

C++
std::vector<AnimationTransition>& GetAnyStateTransitions()

Update

C++
UpdateResult Update(float deltaTime, const std::vector<Ref<AnimationClip>>& clips, const std::unordered_map<std::string, float>* externalSync = nullptr, const std::unordered_map<std::string, AnimMarkerSegment>* externalMarkers = nullptr)

externalSync (optional): a shared group→phase map published by LEADER states of other controllers (one per world, owned by the AnimationSystem, one frame of latency). A Follower state pins its playback phase to it every frame — crowd members stay foot-synced to the leader instead of drifting after the entry sync. Leader states report their phase back through UpdateResult for the system to publish. Null keeps the historical per-controller entry-sync. externalMarkers (optional): the same shared publication for MARKER sync. When both the leader and the follower carry the named pair the follower pins to the marker; otherwise it falls back to the phase map, which is what every clip without markers keeps doing.

SetParameterOwner

C++
void SetParameterOwner(const AnimationController* owner)

A nested machine reads its OWNER's parameters instead of its own — one animator, one set of parameters, and a trigger the parent clears cannot be consumed twice. Set by the parent when it delegates.

HasSyncGroupMarker

C++
bool HasSyncGroupMarker(const std::string& group) const

GetSyncGroupMarker

C++
AnimMarkerSegment GetSyncGroupMarker(const std::string& group) const

ResolveClips

C++
void ResolveClips(const std::vector<Ref<AnimationClip>>& clips)

Bind every state's / blend sample's clipName to an index into clips. Names that don't resolve keep their existing (serialized) clipIndex, so legacy index-only assets are unaffected. Also back-fills clipName from a resolved index when the name was empty, so a controller loaded from an old asset carries proper names forward once bound. Update() calls this the first time it sees a non-empty clip list.

GetCurrentStateName

C++
const std::string& GetCurrentStateName() const

IsBlending

C++
bool IsBlending() const

GetSyncGroupPhase

C++
float GetSyncGroupPhase(const std::string& group) const

HasSyncGroupPhase

C++
bool HasSyncGroupPhase(const std::string& group) const

CopyStateFrom

C++
void CopyStateFrom(const AnimationController& other)

Copy all state/parameters from another controller (since RefCounted is non-copyable)

Reset

C++
void Reset()

GetStates

C++
const std::vector<AnimationState>& GetStates() const

GetStates

C++
std::vector<AnimationState>& GetStates()

GetBoolParams

C++
const std::unordered_map<std::string, bool>& GetBoolParams() const

Parameter access for editor/serialization

GetFloatParams

C++
const std::unordered_map<std::string, float>& GetFloatParams() const

GetIntParams

C++
const std::unordered_map<std::string, int>& GetIntParams() const

GetTriggers

C++
const std::unordered_map<std::string, bool>& GetTriggers() const

RemoveBool

C++
void RemoveBool(const std::string& name)

RemoveFloat

C++
void RemoveFloat(const std::string& name)

RemoveInt

C++
void RemoveInt(const std::string& name)

RemoveTrigger

C++
void RemoveTrigger(const std::string& name)

EvaluateCondition

C++
bool EvaluateCondition(const TransitionCondition& cond) const

Evaluate a single condition against current parameters

GetGraph

C++
FAnimGraph& GetGraph()

The pose-composition graph layered over this state machine (empty = the historical state-machine-only path). Lives here so it serializes inside the same .animgraph asset and shares the parameter namespace.

GetGraph

C++
const FAnimGraph& GetGraph() const

GetMirrorTables

C++
std::unordered_map<std::string, FMirrorTable>& GetMirrorTables()

Mirror tables addressable by the graph's Mirror nodes. They live on the controller (and serialize into the same .animgraph) for the same reason the blend spaces do: one asset carries everything the graph needs to evaluate, so nothing else has to be resolved before a pose can be built. FMirrorTable::LoadFromFile fills one from a standalone .mirror.

GetMirrorTables

C++
const std::unordered_map<std::string, FMirrorTable>& GetMirrorTables() const

GetBlendProfiles

C++
std::unordered_map<std::string, FBlendProfile>& GetBlendProfiles()

Blend profiles addressable by name from a transition (per-bone blend windows) and from the graph's LayeredBlend / BlendByFloat / BlendByBool nodes (per-bone weight scaling). Same reasoning as the mirror tables: one asset carries everything the controller needs to produce a pose.

GetBlendProfiles

C++
const std::unordered_map<std::string, FBlendProfile>& GetBlendProfiles() const
Generated from Animation/AnimationController.h via animation.json · Oct 26, 2026Version 1.0.0