UAnimSequence

Windows
MacOS
Linux

Inheritance Hierarchy

Syntax

class UAnimSequence : public UAnimSequenceBase

Variables

Name Description

Public variable

TEnumAsByte< en...

 

AdditiveAnimType

Additive animation type.

Protected variable

TArray< FName >

 

AnimationTrackNames

This is name of RawAnimationData tracks for editoronly - if we lose skeleton, we'll need relink them

Public variable

FAnimLoadingDeb...

 

AnimLoadingDebugData

Cache debugging data in editor for UE-49335.

Public variable

UAssetImportDat...

 

AssetImportData

Importing data and options used for this mesh

Public variable

TArray< FAnimSy...

 

AuthoredSyncMarkers

Authored Sync markers

Public variable

bool

 

bAllowFrameStripping

Allow frame stripping to be performed on this animation if the platform requests it Can be disabled if animation has high frequency movements that are being lost.

Public variable

bool

 

bCompressionInProgress

Are we currently compressing this animation.

Public variable

uint32: 1

 

bDoNotOverrideCompression

Do not attempt to override compression scheme when running CompressAnimations commandlet.

Public variable

bool

 

bEnableRootMotion

If this is on, it will allow extracting of root motion

Public variable

bool

 

bForceRootLock

Force Root Bone Lock even if Root Motion is not enabled

Public variable

bool

 

bNeedsRebake

Public variable

bool

 

bRootMotionSettingsCopiedFromMontage

Have we copied root motion settings from an owning montage

Public variable

bool

 

bUseNormalizedRootMotionScale

If this is on, it will use a normalized scale value for the root motion extracted: FVector

Public variable

uint32: 1

 

bWasCompressedWithoutTranslations

Used to track whether, or not, this sequence was compressed with it's full translation tracks

Public variable

int32

 

CompressCommandletVersion

Saved version number with CompressAnimations commandlet. To help with doing it in multiple passes.

Public variable

TArray< uint8 >

 

CompressedByteStream

ByteStream for compressed animation data.

Public variable

TArray< uint8 >

 

CompressedCurveByteStream

Compressed curve data stream used by AnimCurveCompressionCodec

Protected variable

TArray< struct ...

 

CompressedCurveNames

Much like track indices above, we need to be able to remap curve names.

Protected variable

int32

 

CompressedNumFrames

The number of frames that the animation had when compressed data was created (may have been resampled for instance)

Public variable

int32

 

CompressedRawDataSize

The size of the raw data used to create the compressed data.

Public variable

FCompressedOffs...

 

CompressedScaleOffsets

An array of 2*NumTrack ints, arranged as follows: if identity, it is offset if not, it is num of keys [0] Scale0.Offset or NumKeys [1] Scale1.Offset or NumKeys

Public variable

TArray< FCompre...

 

CompressedSegments

Array of segment descriptors for this compressed anim sequence.

Public variable

TArray< int32 >

 

CompressedTrackOffsets

An array of 4*NumTrack ints, arranged as follows: - PerTrack is 2*NumTrack, so this isn't true any more [0] Trans0.Offset [1] Trans0.NumKeys [2] Rot0.Offset [3] Rot0.NumKeys [4] Trans1.Offset .

Protected variable

TArray< struct ...

 

CompressedTrackToSkeletonMapTable

Version of TrackToSkeletonMapTable for the compressed tracks.

Public variable

UAnimCompress &...

 

CompressionScheme

The compression scheme that was most recently used to compress this animation.

Public variable

UAnimCurveCompr...

 

CurveCompressionCodec

The codec used by the compressed data as determined by the compression settings.

Public variable

UAnimCurveCompr...

 

CurveCompressionSettings

The curve compression settings used to compress curves in this sequence.

Public variable

int32

 

EncodingPkgVersion

Versioning Support.

Public variable

float

 

ImportFileFramerate

The DCC framerate of the imported file. UI information only, unit are Hz

Public variable

int32

 

ImportResampleFramerate

The resample framerate that was computed during import. UI information only, unit are Hz

Public variable

EAnimInterpolat...

 

Interpolation

This defines how values between keys are calculated

Public variable

TEnumAsByte< en...

 

KeyEncodingFormat

Public variable

int32

 

MarkerDataUpdateCounter

Track whether we have updated markers so cached data can be updated.

Protected variable

int32

 

NumFrames

Number of raw frames in this sequence (not used by engine - just for informational purposes).

Protected variable

TArray< struct ...

 

RawAnimationData

Raw uncompressed keyframe data.

Protected variable

FGuid

 

RawDataGuid

Update this if the contents of RawAnimationData changes;.

Public variable

int32

 

RefFrameIndex

Additve reference frame if RefPoseType == AnimFrame

Public variable

UAnimSequence &...

 

RefPoseSeq

Additive reference animation if it's relevant - i.e. AnimScaled or AnimFrame

Public variable

TEnumAsByte< en...

 

RefPoseType

Additive refrerence pose type. Refer above enum type

Public variable

FName

 

RetargetSource

Base pose to use when retargeting

Public variable

TEnumAsByte< ER...

 

RootMotionRootLock

Root Bone will be locked to that position when extracting root motion.

Public variable

AnimEncoding &#...

 

RotationCodec

Public variable

TEnumAsByte< en...

 

RotationCompressionFormat

The compression format that was used to compress rotation tracks.

Public variable

AnimEncoding &#...

 

ScaleCodec

Public variable

TEnumAsByte< en...

 

ScaleCompressionFormat

The compression format that was used to compress rotation tracks.

Protected variable

TArray< struct ...

 

SourceRawAnimationData

Source RawAnimationData.

Protected variable

TArray< struct ...

 

TemporaryAdditiveBaseAnimationData

Temporary base pose buffer for additive animation that is used by compression.

Protected variable

TArray< struct ...

 

TrackToSkeletonMapTable

In the future, maybe keeping RawAnimSequenceTrack + TrackMap as one would be good idea to avoid inconsistent array size TrackToSkeletonMapTable(i) should contains track mapping data for RawAnimationData(i).

Public variable

AnimEncoding &#...

 

TranslationCodec

The runtime interface to decode and byte swap the compressed animation May be NULL.

Public variable

TEnumAsByte< en...

 

TranslationCompressionFormat

The compression format that was used to compress translation tracks.

Public variable

TArray< FName >

 

UniqueMarkerNames

List of Unique marker names in this animation sequence

Constructors

Name Description

Public function

UAnimSequence

(
    const FObjectInitializer& ObjectIn...
)

Functions

Name Description

Public function

void

 

AddAnimLoadingDebugEntry

(
    const TCHAR* Tag
)

Cache debugging data in editor for UE-49335.

Public function

void

 

AddKeyToSequence

(
    float Time,
    const FName& BoneName,
    const FTransform& AdditiveTransfor...
)

Add Key to Transform Curves

Public function

bool

 

AddLoopingInterpolation()

Insert extra frame of the first frame at the end of the frame so that it improves the interpolation when it loops This increases framecount + time, so that it requires recompression

Public function

int32

 

AddNewRawTrack

(
    FName TrackName,
    FRawAnimSequenceTrack* TrackDa...
)

Adds a new track (if no track of the supplied name is found) to the raw animation data, optionally setting it to TrackData.

Public function Static

void

 

AddReferencedObjects

(
    UObject* This,
    FReferenceCollector& Collector
)

Public function

void

 

BakeOutAdditiveIntoRawData()

Bakes out the additive version of this animation into the raw data.

Public function

void

 

BakeOutVirtualBoneTracks()

Bakes out track data for the skeletons virtual bones into the raw data.

Public function

void

 

BakeTrackCurvesToRawAnimation()

Bake Transform Curves.TransformCurves to RawAnimation after making a back up of current RawAnimation

Public function Const

bool

 

CanBakeAdditive()

Is this animation valid for baking into additive.

Public function

void

 

CleanAnimSequenceForImport()

Clears some data in the AnimSequence, so it can be reused when importing a new animation with same name over it.

Public function

void

 

ClearBakedTransformData()

Sometimes baked data gets invalidated.

Public function

bool

 

CompressRawAnimData

(
    float MaxPosDiff,
    float MaxAngleDiff
)

Removes trivial frames frames of tracks when position or orientation is constant over the entire animation from the raw animation data.

Public function

bool

 

CompressRawAnimData()

Removes trivial frames frames of tracks when position or orientation is constant over the entire animation from the raw animation data.

Public function

bool

 

CompressRawAnimSequenceTrack

(
    FRawAnimSequenceTrack& RawTrack,
    float MaxPosDiff,
    float MaxAngleDiff
)

Utility function for lossless compression of a FRawAnimSequenceTrack

Public function Static

bool

 

CopyAnimSequenceProperties

(
    UAnimSequence* SourceAnimSeq,
    UAnimSequence* DestAnimSeq,
    bool bSkipCopyingNotifies
)

Utility function to copy all UAnimSequence properties from Source to Destination.

Public function Static

bool

 

CopyNotifies

(
    UAnimSequence* SourceAnimSeq,
    UAnimSequence* DestAnimSeq,
    bool bShowDialogs
)

Copy AnimNotifies from one UAnimSequence to another.

Public function

bool

 

CreateAnimation

(
    UAnimSequence* Sequence
)

Create Animation Sequence from the given animation

Public function

bool

 

CreateAnimation

(
    USkeletalMeshComponent* MeshCo...
)

Create Animation Sequence from the Mesh Component's current bone transform

Public function

bool

 

CreateAnimation

(
    USkeletalMesh* Mesh
)

Create Animation Sequence from Reference Pose of the Mesh

Public function

bool

 

CropRawAnimData

(
    float CurrentTime,
    bool bFromStart
)

Crops the raw anim data either from Start to CurrentTime or CurrentTime to End depending on value of bFromStart.

Public function Const

bool

 

DoesContainTransformCurves()

Return true if it contains transform curves

Public function Const

bool

 

DoesNeedRebake()

Return true if it needs to re-bake

Public function Const

bool

 

DoesNeedRecompress()

Return true if compressed data is out of date / missing and so animation needs to use raw data

Public function

bool

 

DoesSequenceContainZeroScale()

Test whether at any point we will scale a bone to 0 (needed for validating additive anims)

Public function Const

void

 

ExtractBoneTransform

(
    const FRawAnimSequenceTrack& RawTr...,
    FTransform& OutAtom,
    int32 KeyIndex
)

Public function Const

void

 

ExtractBoneTransform

(
    const FRawAnimSequenceTrack& InRaw...,
    FTransform& OutAtom,
    float Time
)

Extract Bone Transform of the Time given, from InRawAnimationData

Public function Const

void

 

ExtractBoneTransform

(
    const TArray< struct FRawAnimSequen...,
    FTransform& OutAtom,
    int32 TrackIndex,
    float Time
)

Extract Bone Transform of the Time given, from InRawAnimationData

Public function Const

FTransform

 

ExtractRootMotion

(
    float StartTime,
    float DeltaTime,
    bool bAllowLooping
)

Extract Root Motion transform from the animation.

Public function Const

FTransform

 

ExtractRootMotionFromRange

(
    float StartTrackPosition,
    float EndTrackPosition
)

Extract Root Motion transform from a contiguous position range (no looping)

Public function Const

FTransform

 

ExtractRootTrackTransform

(
    float Pos,
    const FBoneContainer* Required...
)

Extract the transform from the root track for the given animation position.

Public function

uint8 *

 

FindSyncMarkerPropertyData

(
    int32 SyncMarkerIndex,
    UArrayProperty*& ArrayProperty
)

Get a pointer to the data for a given Anim Notify.

Public function Const

void

 

FlagDependentAnimationsAsRawDataOnly()

Helper function to allow us to notify animations that depend on us that they need to update.

Public function

void

 

FlipRotationWForNonRoot

(
    USkeletalMesh* SkelMesh
)

Flip Rotation's W For NonRoot items, and compress it again if SkelMesh exists

Public function Const

FGuid

 

GenerateGuidFromRawData()

Generate a GUID from a hash of our own raw data.

Public function Const

const TArray...

 

GetAdditiveBaseAnimationData()

Public function Const

void

 

GetAdditiveBasePose

(
    FCompactPose& OutPose,
    FBlendedCurve& OutCurve,
    const FAnimExtractContext& Extract...
)

Get Bone Transform of the base (reference) pose of the additive animation for the Time given, relative to Parent for all RequiredBones

Public function Const

const TArray...

 

GetAnimationTrackNames()

Public function Const

int32

 

GetApproxCompressedSize()

Public function Const

int32

 

GetApproxRawSize()

Public function Const

void

 

GetBonePose

(
    FCompactPose& OutPose,
    FBlendedCurve& OutCurve,
    const FAnimExtractContext& Extract...,
    bool bForceUseRawData
)

Get Bone Transform of the animation for the Time given, relative to Parent for all RequiredBones

Public function Const

void

 

GetBonePose_Additive

(
    FCompactPose& OutPose,
    FBlendedCurve& OutCurve,
    const FAnimExtractContext& Extract...
)

Get Bone Transform of the additive animation for the Time given, relative to Parent for all RequiredBones

Public function Const

void

 

GetBoneTransform

(
    FTransform& OutAtom,
    int32 TrackIndex,
    FAnimSequenceDecompressionContext&...,
    bool bUseRawData
)

Get Bone Transform of the Time given, relative to Parent for the Track Given

Public function Const

void

 

GetBoneTransform

(
    FTransform& OutAtom,
    int32 TrackIndex,
    float Time,
    bool bUseRawData
)

Get Bone Transform of the Time given, relative to Parent for the Track Given

Public function Const

const TArray...

 

GetCompressedCurveNames()

Public function Const

int32

 

GetCompressedNumberOfFrames()

Public function Const

const TArray...

 

GetCompressedTrackToSkeletonMapTable()

Public function Const

float

 

GetCurrentTimeFromMarkers

(
    FMarkerPair& PrevMarker,
    FMarkerPair& NextMarker,
    float PositionBetweenMarkers
)

Advancing based on markers.

Public function Const

float

 

GetFrameRate()

Returns the framerate of the animation.

Public function Const

const TArray...

 

GetRawAnimationData()

Public function Const

const FRawAn...

 

GetRawAnimationTrack

(
    int32 TrackIndex
)

Public function

FRawAnimSequ...

 

GetRawAnimationTrack

(
    int32 TrackIndex
)

Public function Const

FGuid

 

GetRawDataGuid()

Return this animations guid for the raw data.

Public function Const

int32

 

GetRawNumberOfFrames()

Accessors for animation frame count.

Public function Const

const TArray...

 

GetRawTrackToSkeletonMapTable()

Public function Const

int32

 

GetSkeletonIndexFromCompressedDataTrackIndex

(
    const int32 TrackIndex
)

Get Skeleton Bone Index from Track Index for compressed data

Public function Const

int32

 

GetSkeletonIndexFromRawDataTrackIndex

(
    const int32 TrackIndex
)

Begin Utility functions.

Public function Const

int32

 

GetUncompressedRawSize()

Public function Const

bool

 

HasSourceRawData()

Public function

void

 

InitCurveCompressionScheme()

Initialize curve compression settings, does nothing if scheme already valid.

Public function

bool

 

InsertFramesToRawAnimData

(
    int32 StartFrame,
    int32 EndFrame,
    int32 CopyFrame
)

Crops the raw anim data either from Start to CurrentTime or CurrentTime to End depending on value of bFromStart.

Public function Const

bool

 

IsCompressedDataValid()

Public function Const

bool

 

IsCurveCompressedDataValid()

Public function Const

bool

 

OnlyUseRawData()

Should we be always using our raw data (i.e is our compressed data stale)

Public function

void

 

OnRawDataChanged()

Kick off compression request when our raw data has changed.

Public function

void

 

PostProcessSequence

(
    bool bForceNewRawDatGuid
)

End Utility functions.

Public function

void

 

RecycleAnimSequence()

Clears any data in the AnimSequence

Public function

void

 

RemoveAllTracks()

Clear all raw animation data that contains bone tracks

Public function

void

 

RequestAnimCompression

(
    FRequestAnimCompressionParams Param...
)

Get compressed data for this UAnimSequence. May be built directly or pulled from DDC.

Public function

void

 

RequestSyncAnimRecompression

(
    bool bOutput
)

Public function

void

 

SerializeCompressedData

(
    FArchive& Ar,
    bool bDDCData
)

Write the compressed data to the supplied FArchive.

Public function

void

 

SetRawNumberOfFrame

(
    int32 InNumFrames
)

Public function

void

 

SetUseRawDataOnly

(
    bool bInUseRawDataOnly
)

Public function

void

 

SortSyncMarkers()

Sort the sync markers array by time, earliest first.

Public function Const

void

 

TestEvalauteAnimation()

Performs multiple evaluations of the animation as a test of compressed data validatity.

Public function

void

 

UpdateCompressedCurveName

(
    SmartName::UID_Type CurveUID,
    const FSmartName& NewCurveName
)

Public function

void

 

UpdateCompressedCurveNames()

Public function

void

 

UpdateCompressedNumFramesFromRaw()

Public function

void

 

UpdateCompressedTrackMapFromRaw()

Overridden from UAnimSequenceBase

Name Description

Public function Virtual Const

void

 

AdvanceMarkerPhaseAsFollower

(
    const FMarkerTickContext& Context,
    float DeltaRemaining,
    bool bLooping,
    float& CurrentTime,
    FMarkerPair& PreviousMarker,
    FMarkerPair& NextMarker
)

Public function Virtual Const

void

 

AdvanceMarkerPhaseAsLeader

(
    bool bLooping,
    float MoveDelta,
    const TArray< FName >& ValidMarker...,
    float& CurrentTime,
    FMarkerPair& PrevMarker,
    FMarkerPair& NextMarker,
    TArray< FPassedMarker >& MarkersPa...
)

Public function Virtual

void

 

EnableRootMotionSettingFromMontage

(
    bool bInEnableRootMotion,
    const ERootMotionRootLock::Type InR...
)

To support anim sequence base to all montages

Public function Virtual Const

void

 

EvaluateCurveData

(
    FBlendedCurve& OutCurve,
    float CurrentTime,
    bool bForceUseRawData
)

Evaluate curve data to Instance at the time of CurrentTime

Public function Virtual Const

float

 

EvaluateCurveData

(
    SmartName::UID_Type CurveUID,
    float CurrentTime,
    bool bForceUseRawData
)

Evaluate curve data to Instance at the time of CurrentTime

Public function Virtual Const

EAdditiveAni...

 

GetAdditiveAnimType()

Default implementation, no additive

Public function Virtual Const

UAnimSequenc...

 

GetAdditiveBasePose()

Ideally this would be animsequcnebase, but we might have some issue with that. For now, just allow AnimSequence

Public function Virtual Const

void

 

GetAnimationPose

(
    FCompactPose& OutPose,
    FBlendedCurve& OutCurve,
    const FAnimExtractContext& Extract...
)

Get Bone Transform of the Time given, relative to Parent for all RequiredBones This returns different transform based on additive or not.

Public function Virtual Const

float

 

GetFirstMatchingPosFromMarkerSyncPos

(
    const FMarkerSyncAnimPosition& InM...
)

Public function Virtual Const

void

 

GetMarkerIndicesForPosition

(
    const FMarkerSyncAnimPosition& Syn...,
    bool bLooping,
    FMarkerPair& OutPrevMarker,
    FMarkerPair& OutNextMarker,
    float& CurrentTime
)

Public function Virtual Const

void

 

GetMarkerIndicesForTime

(
    float CurrentTime,
    bool bLooping,
    const TArray< FName >& ValidMarker...,
    FMarkerPair& OutPrevMarker,
    FMarkerPair& OutNextMarker
)

Public function Virtual Const

FMarkerSyncA...

 

GetMarkerSyncPositionfromMarkerIndicies

(
    int32 PrevMarker,
    int32 NextMarker,
    float CurrentTime
)

Public function Virtual Const

float

 

GetNextMatchingPosFromMarkerSyncPos

(
    const FMarkerSyncAnimPosition& InM...,
    const float& StartingPosition
)

Public function Virtual Const

int32

 

GetNumberOfFrames()

Return Number of Frames

Public function Virtual Const

float

 

GetPrevMatchingPosFromMarkerSyncPos

(
    const FMarkerSyncAnimPosition& InM...,
    const float& StartingPosition
)

Public function Virtual Const

void

 

HandleAssetPlayerTickedInternal

(
    FAnimAssetTickContext& Context,
    const float PreviousTime,
    const float MoveDelta,
    const FAnimTickRecord& Instance,
    FAnimNotifyQueue& NotifyQueue
)

Public function Virtual Const

bool

 

HasCurveData

(
    SmartName::UID_Type CurveUID,
    bool bForceUseRawData
)

Public function Virtual Const

bool

 

HasRootMotion()

Public function Virtual Const

bool

 

IsValidToPlay()

Add validation check to see if it's being ready to play or not

Public function Virtual

void

 

MarkRawDataAsModified

(
    bool bForceNewRawDatGuid
)

Store that our raw data has changed so that we can get correct compressed data later on.

Public function Virtual

void

 

RefreshCacheData()

Update cache data (notify tracks, sync markers)

Overridden from UAnimationAsset

Name Description

Public function Virtual

bool

 

GetAllAnimationSequencesReferred

(
    TArray< UAnimationAsset* >& A...,
    bool bRecursive
)

Retrieve all animations that are used by this asset

Public function Virtual Const

int32

 

GetMarkerUpdateCounter()

Public function Virtual

TArray< FNam...

 

GetUniqueMarkerNames()

Return a list of unique marker names for blending compatibility

Public function Virtual Const

bool

 

IsValidAdditive()

Return true if this is valid additive animation false otherwise

Public function Virtual

void

 

ReplaceReferredAnimations

(
    const TMap< UAnimationAsset*, ...
)

Replace this assets references to other animations based on ReplacementMap

Overridden from UObject

Name Description

Public function Virtual

void

 

BeginDestroy()

Called before destroying the object.

Public function Virtual Const

void

 

GetAssetRegistryTags

(
    TArray< FAssetRegistryTag >& OutTa...
)

Gathers a list of asset registry searchable tags which are name/value pairs with some type information This only needs to be implemented for asset objects

Public function Virtual Const

bool

 

IsPostLoadThreadSafe()

Called during async load to determine if PostLoad can be called on the loading thread.

Public function Virtual

void

 

PostDuplicate

(
    bool bDuplicateForPIE
)

Called after duplication & serialization and before PostLoad.

Public function Virtual

void

 

PostEditChangeProperty

(
    FPropertyChangedEvent& PropertyCha...
)

Called when a property on this object has been modified externally

Public function Virtual

void

 

PostInitProperties()

Called after the C++ constructor and after the properties have been initialized, including those loaded from config.

Public function Virtual

void

 

PostLoad()

Do any object-specific cleanup required immediately after loading an object.

Public function Virtual

void

 

PreSave

(
    const ITargetPlatform* TargetP...
)

Presave function.

Public function Virtual

void

 

Serialize

(
    FArchive& Ar
)

Handles reading, writing, and reference collecting using FArchive.

Deprecated Variables

Name Description

Public variable

FString

 

SourceFilePath_DEPRECATED

Path to the resource used to construct this skeletal mesh

Public variable

FString

 

SourceFileTimestamp_DEPRECATED

Date/Time-stamp of the file from the last import

References

Module

Engine

Header

Runtime/Engine/Classes/Animation/AnimSequence.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