UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
FAnimationUtils Class Reference

#include <AnimationUtils.h>

Static Public Member Functions

static void BuildComponentSpaceTransform (FTransform &OutTransform, int32 BoneIndex, const TArray< FTransform > &BoneSpaceTransforms, const TArray< FBoneData > &BoneData)
 
static ENGINE_API void BuildSkeletonMetaData (USkeleton *Skeleton, TArray< FBoneData > &OutBoneData)
 
static int32 GetAnimTrackIndexForSkeletonBone (const int32 InSkeletonBoneIndex, const TArray< FTrackToSkeletonMap > &TrackToSkelMap)
 
static bool GetForcedRecompressionSetting ()
 
static UObjectGetDefaultAnimSequenceOuter (UAnimSet *InAnimSet, bool bCreateIfNotFound)
 
static FString GetAnimationKeyFormatString (enum AnimationKeyFormat InFormat)
 
static ENGINE_API FString GetAnimationCompressionFormatString (enum AnimationCompressionFormat InFormat)
 
static bool HasUniformKeySpacing (int32 NumFrames, const TArray< float > &Times)
 
static ENGINE_API UAnimBoneCompressionSettingsGetDefaultAnimationBoneCompressionSettings ()
 
static ENGINE_API UAnimBoneCompressionSettingsGetDefaultAnimationRecorderBoneCompressionSettings ()
 
static ENGINE_API UAnimCurveCompressionSettingsGetDefaultAnimationCurveCompressionSettings ()
 
static ENGINE_API UVariableFrameStrippingSettingsGetDefaultVariableFrameStrippingSettings ()
 
static ENGINE_API void EnsureAnimSequenceLoaded (UAnimSequence &AnimSeq)
 
static ENGINE_API void ExtractTransformForFrameFromTrackSafe (const FRawAnimSequenceTrack &RawTrack, int32 Frame, FTransform &OutAtom)
 
static ENGINE_API void ExtractTransformForFrameFromTrack (const FRawAnimSequenceTrack &RawTrack, int32 Frame, FTransform &OutAtom)
 
static ENGINE_API void ExtractTransformFromTrack (float Time, int32 NumFrames, float SequenceLength, const struct FRawAnimSequenceTrack &RawTrack, EAnimInterpolationType Interpolation, FTransform &OutAtom)
 
static ENGINE_API void ExtractTransformFromTrack (const struct FRawAnimSequenceTrack &RawTrack, double Time, int32 NumFrames, double SequenceLength, EAnimInterpolationType Interpolation, FTransform &OutAtom)
 

Detailed Description

A collection of useful functions for skeletal mesh animation.

Member Function Documentation

◆ BuildComponentSpaceTransform()

void FAnimationUtils::BuildComponentSpaceTransform ( FTransform OutTransform,
int32  BoneIndex,
const TArray< FTransform > &  BoneSpaceTransforms,
const TArray< FBoneData > &  BoneData 
)
static

Builds the local-to-component matrix for the specified bone.

◆ BuildSkeletonMetaData()

void FAnimationUtils::BuildSkeletonMetaData ( USkeleton Skeleton,
TArray< FBoneData > &  OutBoneData 
)
static

Array to keep track of SkeletalMeshes we have built metadata for, and log out the results just once.

◆ EnsureAnimSequenceLoaded()

void FAnimationUtils::EnsureAnimSequenceLoaded ( UAnimSequence AnimSeq)
static

Makes sure that the animation sequence and all its dependencies required for compression are loaded.

◆ ExtractTransformForFrameFromTrack()

void FAnimationUtils::ExtractTransformForFrameFromTrack ( const FRawAnimSequenceTrack RawTrack,
int32  Frame,
FTransform OutAtom 
)
static

◆ ExtractTransformForFrameFromTrackSafe()

void FAnimationUtils::ExtractTransformForFrameFromTrackSafe ( const FRawAnimSequenceTrack RawTrack,
int32  Frame,
FTransform OutAtom 
)
static

◆ ExtractTransformFromTrack() [1/2]

static ENGINE_API void FAnimationUtils::ExtractTransformFromTrack ( const struct FRawAnimSequenceTrack RawTrack,
double  Time,
int32  NumFrames,
double  SequenceLength,
EAnimInterpolationType  Interpolation,
FTransform OutAtom 
)
static

◆ ExtractTransformFromTrack() [2/2]

static ENGINE_API void FAnimationUtils::ExtractTransformFromTrack ( float  Time,
int32  NumFrames,
float  SequenceLength,
const struct FRawAnimSequenceTrack RawTrack,
EAnimInterpolationType  Interpolation,
FTransform OutAtom 
)
static

◆ GetAnimationCompressionFormatString()

FString FAnimationUtils::GetAnimationCompressionFormatString ( enum AnimationCompressionFormat  InFormat)
static

Converts an animation compression type into a human readable string

Parameters
InFormatThe compression format to convert into a string
Returns
The format as a string

◆ GetAnimationKeyFormatString()

FString FAnimationUtils::GetAnimationKeyFormatString ( enum AnimationKeyFormat  InFormat)
static

Converts an animation codec format into a human readable string

Parameters
InFormatThe format to convert into a string
Returns
The format as a string

◆ GetAnimTrackIndexForSkeletonBone()

int32 FAnimationUtils::GetAnimTrackIndexForSkeletonBone ( const int32  InSkeletonBoneIndex,
const TArray< FTrackToSkeletonMap > &  TrackToSkelMap 
)
static

◆ GetDefaultAnimationBoneCompressionSettings()

UAnimBoneCompressionSettings * FAnimationUtils::GetDefaultAnimationBoneCompressionSettings ( )
static

Perturbs the bone(s) associated with each track in turn, measuring the maximum error introduced in end effectors as a result Returns the default animation bone compression settings, can never by null.

◆ GetDefaultAnimationCurveCompressionSettings()

UAnimCurveCompressionSettings * FAnimationUtils::GetDefaultAnimationCurveCompressionSettings ( )
static

Returns the default animation curve compression settings, can never by null.

◆ GetDefaultAnimationRecorderBoneCompressionSettings()

UAnimBoneCompressionSettings * FAnimationUtils::GetDefaultAnimationRecorderBoneCompressionSettings ( )
static

Returns the default animation bone compression settings for the FAnimRecorder, can never by null.

◆ GetDefaultAnimSequenceOuter()

UObject * FAnimationUtils::GetDefaultAnimSequenceOuter ( UAnimSet InAnimSet,
bool  bCreateIfNotFound 
)
static

Get default Outer for AnimSequences contained in this AnimSet. The intent is to use that when Constructing new AnimSequences to put into that set. The Outer will be Package.<AnimSetName>_Group.

Parameters
bCreateIfNotFoundif true, Group will be created. This is only in the editor.

◆ GetDefaultVariableFrameStrippingSettings()

UVariableFrameStrippingSettings * FAnimationUtils::GetDefaultVariableFrameStrippingSettings ( )
static

Returns the default animation variable frame stripping settings, can never by null.

◆ GetForcedRecompressionSetting()

bool FAnimationUtils::GetForcedRecompressionSetting ( )
static

Determines the current setting for recompressing all animations upon load. The default value is False, but may be overridden by an optional field in the base engine INI file.

Returns
true if the engine settings request that all animations be recompiled

◆ HasUniformKeySpacing()

bool FAnimationUtils::HasUniformKeySpacing ( int32  NumFrames,
const TArray< float > &  Times 
)
static

Computes the 'height' of each track, relative to a given animation linkup.

The track height is defined as the minimal number of bones away from an end effector (end effectors are 0, their parents are 1, etc...)

Parameters
AnimLinkupThe animation linkup
NumTracksThe number of tracks
TrackHeights[OUT] The computed track heights Checks a set of key times to see if the spacing is uniform or non-uniform. Note: If there are as many times as frames, they are automatically assumed to be uniformly spaced. Note: If there are two or fewer times, they are automatically assumed to be uniformly spaced.
NumFramesThe number of frames in the source animation data
TimesThe array of key times
Returns
true if the keys are uniformly spaced (or one of the trivial conditions is detected). false if any key spacing is greater than 1e-4 off.

Computes the 'height' of each track, relative to a given animation linkup.

The track height is defined as the minimal number of bones away from an end effector (end effectors are 0, their parents are 1, etc...)

Parameters
BoneDataThe bone data to check
NumTracksThe number of tracks
TrackHeights[OUT] The computed track heights Checks a set of key times to see if the spacing is uniform or non-uniform. Note: If there are as many times as frames, they are automatically assumed to be uniformly spaced. Note: If there are two or fewer times, they are automatically assumed to be uniformly spaced.
AnimSeqThe animation sequence the Times array is associated with
TimesThe array of key times
Returns
true if the keys are uniformly spaced (or one of the trivial conditions is detected). false if any key spacing is greater than 1e-4 off.

The documentation for this class was generated from the following files: