UAnimSequenceBase

Choose your operating system:

Windows

macOS

Linux

Inheritance Hierarchy

References

Module

Engine

Header

/Engine/Source/Runtime/Engine/Classes/Animation/AnimSequenceBase.h

Include

#include "Animation/AnimSequenceBase.h"

Syntax

class UAnimSequenceBase : public UAnimationAsset

Variables

Name Description

Public variable

TArray< FAnimNo...

 

AnimNotifyTracks

If you change Notifies array, this will need to be rebuilt

Protected variable

bool

 

bPopulatingDataModel

Flag set whenever the data-model is initially populated (during upgrade path)

Protected variable

TScriptInterfac...

 

Controller

UAnimDataController instance set to operate on DataModel

Protected variable

TObjectPtr< UAn...

 

DataModel

UAnimDataModel instance containing source animation data

Public variable

TArray< struct ...

 

Notifies

Animation notifies, sorted by time (earliest notification first).

Protected variable

UE::Anim::FAnim...

 

NotifyCollector

Helper object that keeps track of any controller brackets, and all unique notify types that are broadcasted during it

Public variable

float

 

RateScale

Number for tweaking playback rate of this animation globally.

Constructors

Name Description

Public function

UAnimSequenceBase

(
    const FObjectInitializer& ObjectIn...
)

Functions

Name Description

Public function Virtual Const

void

 

AdvanceMarkerPhaseAsFollower

(
    const FMarkerTickContext& Context,
    float DeltaRemaining,
    bool bLooping,
    float& CurrentTime,
    FMarkerPair& PreviousMarker,
    FMarkerPair& NextMarker,
    const UMirrorDataTable* Mirror...
)

Public function Virtual Const

void

 

AdvanceMarkerPhaseAsLeader

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

Protected function

void

 

BindToModelModificationEvent()

Binds to DataModel its modification delegate

Public function Virtual Const

EAnimEventTr...

 

CalculateOffsetForNotify

(
    float NotifyDisplayTime
)

Calculates what (if any) offset should be applied to the trigger time of a notify given its display time

Public function Virtual Const

bool

 

CanBeUsedInComposition()

Public function

void

 

ClampNotifiesAtEndOfSequence()

Fix up any notifies that are positioned beyond the end of the sequence

Protected function

void

 

CopyDataModel

(
    const UAnimDataModel* ModelToD...
)

Replaces the current DataModel, if any, with the provided one

Public function Virtual

void

 

EnableRootMotionSettingFromMontage

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

To support anim sequence base to montage

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

uint8 *

 

FindArrayProperty

(
    const TCHAR* PropName,
    FArrayProperty*& ArrayProperty,
    int32 ArrayIndex
)

Get a pointer to the data for a given array property item.

Public function

uint8 *

 

FindNotifyPropertyData

(
    int32 NotifyIndex,
    FArrayProperty*& ArrayProperty
)

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

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

(
    FAnimationPoseData& OutPoseData,
    const FAnimExtractContext& Extract...
)

Public function Const

void

 

GetAnimNotifies

(
    const float& StartTime,
    const float& DeltaTime,
    FAnimNotifyContext& NotifyContext
)

Retrieves AnimNotifies given a StartTime and a DeltaTime.

Public function Virtual Const

void

 

GetAnimNotifiesFromDeltaPositions

(
    const float& PreviousPosition,
    const float& CurrentPosition,
    FAnimNotifyContext& NotifyContext
)

Retrieves AnimNotifies between two time positions.

Public function

IAnimationDa...

 

GetController()

Returns the transient UAnimDataController set to operate on DataModel

Public function Virtual Const

const FRawCu...

 

GetCurveData()

Public function Const

UAnimDataMod...

 

GetDataModel()

Returns the UAnimDataModel object embedded in this UAnimSequenceBase

Public function Virtual Const

float

 

GetFirstMatchingPosFromMarkerSyncPos

(
    const FMarkerSyncAnimPosition& InM...
)

Public function Virtual Const

int32

 

GetFrameAtTime

(
    const float Time
)

Get the frame number for the provided time

Public function Virtual Const

void

 

GetMarkerIndicesForPosition

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

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,
    const UMirrorDataTable* Mirror...
)

Public function Virtual Const

float

 

GetNextMatchingPosFromMarkerSyncPos

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

Public function Virtual Const

int32

 

GetNumberOfSampledKeys()

Return the total number of keys sampled for this animation, including the T0 key

Public function Virtual Const

float

 

GetPrevMatchingPosFromMarkerSyncPos

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

Public function Virtual Const

const FFrame...

 

GetSamplingFrameRate()

Return rate at which the animation is sampled

Public function Virtual Const

float

 

GetTimeAtFrame

(
    const int32 Frame
)

Get the time at the given frame

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

void

 

InitializeNotifyTrack()

Public function Const

bool

 

IsDataModelValid()

Public function Virtual Const

bool

 

IsNotifyAvailable()

Return true if anim notify is available

Public function Virtual Const

bool

 

IsValidToPlay()

Protected function Virtual

void

 

OnModelModified

(
    const EAnimDataModelNotifyType& No...,
    UAnimDataModel* Model,
    const FAnimDataModelNotifPayload& ...
)

Callback registered to UAnimDatModel::GetModifiedEvent for the embedded object

Protected function Virtual

void

 

PopulateModel()

Populates the UAnimDataModel object according to any pre-existing data.

Public function Virtual

void

 

RefreshCacheData()

Update cache data (notify tracks, sync markers)

Public function

void

 

RegisterOnNotifyChanged

(
    const FOnNotifyChanged& Delegate
)

Registers a delegate to be called after notification has changed

Public function

bool

 

RemoveNotifies

(
    const TArray< FName >& NotifiesToR...
)

Remove the notifies specified

Public function Const

bool

 

ShouldDataModelBeValid()

Public function

void

 

SortNotifies()

Sort the Notifies array by time, earliest first.

Public function Const

void

 

TickByMarkerAsFollower

(
    FMarkerTickRecord& Instance,
    FMarkerTickContext& MarkerContext,
    float& CurrentTime,
    float& OutPreviousTime,
    const float MoveDelta,
    const bool bLooping,
    const UMirrorDataTable* Mirror...
)

Public function Const

void

 

TickByMarkerAsLeader

(
    FMarkerTickRecord& Instance,
    FMarkerTickContext& MarkerContext,
    float& CurrentTime,
    float& OutPreviousTime,
    const float MoveDelta,
    const bool bLooping,
    const UMirrorDataTable* Mirror...
)

Public function

void

 

UnregisterOnNotifyChanged

(
    void* Unregister
)

Protected function Const

void

 

ValidateModel()

Validates that DataModel contains a valid UAnimDataModel object

Protected function

void

 

VerifyCurveNames

(
    USkeleton& Skeleton,
    const FName& NameContainer,
    TArray< DataType >& CurveList
)

Overridden from UAnimationAsset

Name Description

Public function Virtual Const

float

 

GetPlayLength()

Returns the total play length of the montage, if played back with a speed of 1.0.

Protected function Virtual

void

 

RefreshParentAssetData()

Public function Virtual

void

 

RemapTracksToNewSkeleton

(
    USkeleton* NewSkeleton,
    bool bConvertSpaces
)

Public function Virtual Const

void

 

TickAssetPlayer

(
    FAnimTickRecord& Instance,
    FAnimNotifyQueue& NotifyQueue,
    FAnimAssetTickContext& Context
)

Advances the asset player instance

Overridden from UObject

Name Description

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

(
    EDuplicateMode::Type DuplicateMode
)

Public function Virtual

void

 

PostLoad()

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

Public function Virtual

void

 

Serialize

(
    FArchive& Ar
)

Handles reading, writing, and reference collecting using FArchive.

Typedefs

Deprecated Variables

Name Description

Public variable

FRawCurveTracks

 

RawCurveData

Public access to RawCurveData is deprecated, see UAnimDataModel for source data or use GetCurveData for runtime instead

Public variable

float

 

SequenceLength

Public access to SequenceLength is deprecated, use GetPlayLength or UAnimDataController::SetPlayLength instead

Deprecated Functions

Name Description

Public function Virtual Const

void

 

AdvanceMarkerPhaseAsFollower

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

Use other AdvanceMarkerPhaseAsFollower signature

Public function Virtual Const

void

 

AdvanceMarkerPhaseAsLeader

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

Use other AdvanceMarkerPhaseAsLeader signature

Public function Virtual Const

void

 

GetAnimationPose

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

Use other GetAnimationPose signature

Public function Const

void

 

GetAnimNotifies

(
    const float& StartTime,
    const float& DeltaTime,
    const bool bAllowLooping,
    TArray< FAnimNotifyEventReference >...
)

Use the other GetAnimNotifies that takes FAnimNotifyContext instead

Public function Const

void

 

GetAnimNotifies

(
    const float& StartTime,
    const float& DeltaTime,
    const bool bAllowLooping,
    TArray< const FAnimNotifyEvent*...
)

Use the GetAnimNotifies that takes FAnimNotifyEventReferences instead

Public function Virtual Const

void

 

GetAnimNotifiesFromDeltaPositions

(
    const float& PreviousPosition,
    const float& CurrentPosition,
    TArray< FAnimNotifyEventReference >...
)

Use the other GetAnimNotifiesFromDeltaPositions that takes FAnimNotifyContext instead

Public function Const

void

 

GetAnimNotifiesFromDeltaPositions

(
    const float& PreviousPosition,
    const float& CurrentPosition,
    TArray< const FAnimNotifyEvent*...
)

Use the GetAnimNotifiesFromDeltaPositions that takes FAnimNotifyEventReferences instead

Public function Virtual Const

void

 

GetMarkerIndicesForPosition

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

Use other GetMarkerIndicesForPosition signature

Public function Virtual Const

FMarkerSyncA...

 

GetMarkerSyncPositionfromMarkerIndicies

(
    int32 PrevMarker,
    int32 NextMarker,
    float CurrentTime
)

Use other GetMarkerSyncPositionfromMarkerIndicies signature

Public function Virtual Const

int32

 

GetNumberOfFrames()

Use GetNumberOfSampledKeys instead

Public function Virtual

void

 

MarkRawDataAsModified

(
    bool bForceNewRawDatGuid
)

MarkRawDataAsModified has been deprecated, any (Raw Data) modification should be applied using the UAnimDataController API instead. This will handle updating the GUID instead.

Public function

void

 

RefreshCurveData()

Updating of any relevent Curve data is now handled through the UAnimDataModel notifies

Public function

void

 

RegisterOnAnimCurvesChanged

(
    const FOnAnimCurvesChanged& Delega...
)

Functionality has been deprecated, register to UAnimDataModel::GetModifiedEvent instead

Public function

void

 

RegisterOnAnimTrackCurvesChanged

(
    const FOnAnimTrackCurvesChanged& D...
)

Functionality has been deprecated, register to UAnimDataModel::GetModifiedEvent instead

Public function Virtual

void

 

SetSequenceLength

(
    float NewLength
)

SetSequenceLength is deprecated use UAnimDataController::SetPlayLength instead

Public function

void

 

UnregisterOnAnimCurvesChanged

(
    void* Unregister
)

Functionality has been deprecated, register to UAnimDataModel::GetModifiedEvent instead

Public function

void

 

UnregisterOnAnimTrackCurvesChanged

(
    void* Unregister
)

Functionality has been deprecated, register to UAnimDataModel::GetModifiedEvent instead