FAnimationUtils

A collection of useful functions for skeletal mesh animation.

Windows
MacOS
Linux

Syntax

class FAnimationUtils

Remarks

A collection of useful functions for skeletal mesh animation.

Functions

Name Description

Public function Static

void

 

BuildComponentSpaceTransform

(
    FTransform& OutTransform,
    int32 BoneIndex,
    const TArray< FTransform >& BoneSp...,
    const TArray< FBoneData >& BoneDat...
)

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

Public function Static

void

 

BuildSkeletonMetaData

(
    USkeleton* Skeleton,
    TArray< FBoneData >& OutBoneData
)

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

Public function Static

void

 

CalculateTrackHeights

(
    UAnimSequence* AnimSeq,
    const TArray< FBoneData >& BoneDat...,
    int NumTracks,
    TArray< int32 >& TrackHeights
)

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

Public function Static

bool

 

CompressAnimCurves

(
    UAnimSequence& AnimSeq
)

Compresses the animation curves within a sequence with the chosen settings.

Public function Static

void

 

CompressAnimSequence

(
    UAnimSequence* AnimSeq,
    FAnimCompressContext& CompressCont...
)

Utility function to compress an animation.

Public function Static

void

 

CompressAnimSequenceExplicit

(
    UAnimSequence* AnimSeq,
    FAnimCompressContext& CompressCont...,
    float MasterTolerance,
    bool bFirstRecompressUsingCurrentOr...,
    bool bForceBelowThreshold,
    bool bRaiseMaxErrorToExisting,
    bool bTryExhaustiveSearch,
    bool bEnableSegmenting,
    int32 IdealNumFramesPerSegment,
    int32 MaxNumFramesPerSegment,
    const TArray< FBoneData >& BoneDat...
)

Utility function to compress an animation.

Public function Static

void

 

ComputeCompressionError

(
    const UAnimSequence* AnimSeq,
    const TArray< FBoneData >& BoneDat...,
    AnimationErrorStats& ErrorStats
)

Utility function to measure the accuracy of a compressed animation.

Public function Static

float

 

GetAlternativeCompressionThreshold()

Determines the current setting for world-space error tolerance in the animation compressor.

Public function Static

FString

 

GetAnimationCompressionFormatString

(
    enum AnimationCompressionFormat InF...
)

Converts an animation compression type into a human readable string

Public function Static

FString

 

GetAnimationKeyFormatString

(
    enum AnimationKeyFormat InFormat
)

Converts an animation codec format into a human readable string

Public function Static

UAnimCompres...

 

GetDefaultAnimationCompressionAlgorithm()

Public function Static

UAnimCurveCo...

 

GetDefaultAnimationCurveCompressionSettings()

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

Public function Static

UObject *...

 

GetDefaultAnimSequenceOuter

(
    UAnimSet* InAnimSet,
    bool bCreateIfNotFound
)

Get default Outer for AnimSequences contained in this AnimSet.

Public function Static

bool

 

GetForcedRecompressionSetting()

Determines the current setting for recompressing all animations upon load.

Public function Static

bool

 

HasUniformKeySpacing

(
    UAnimSequence* AnimSeq,
    const TArray< float >& Times
)

Checks a set of key times to see if the spacing is uniform or non-uniform.

Public function Static

void

 

TallyErrorsFromPerturbation

(
    const UAnimSequence* AnimSeq,
    int32 NumTracks,
    const TArray< FBoneData >& BoneDat...,
    const FVector& PositionNudge,
    const FQuat& RotationNudge,
    const FVector& ScaleNudge,
    TArray< FAnimPerturbationError >& ...
)

Perturbs the bone(s) associated with each track in turn, measuring the maximum error introduced in end effectors as a result

Public function Static

void

 

TestForMissingMeshes

(
    UAnimSequence* AnimSeq
)

Tests for a missing or invalid mesh on the animation sequence, warning if one or more were found

References

Module

Engine

Header

Runtime/Engine/Public/AnimationUtils.h

Welcome to the new Unreal Engine 4 Documentation site!

We're working on lots of new features including a feedback system so you can tell us how we are doing. It's not quite ready for use in the wild yet, so head over to the Documentation Feedback forum to tell us about this page or call out any issues you are encountering in the meantime.

We'll be sure to let you know when the new system is up and running.

Post Feedback