UAnimMontage

Any property you're adding to AnimMontage and parent class has to be considered for Child Asset

Windows
MacOS
Linux

Inheritance Hierarchy

References

Module

Engine

Header

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

Include

#include "Animation/AnimMontage.h"

Syntax

class UAnimMontage : public UAnimCompositeBase

Remarks

Any property you're adding to AnimMontage and parent class has to be considered for Child Asset

Child Asset is considered to be only asset mapping feature using everything else in the class For example, you can just use all parent's setting for the montage, but only remap assets This isn't magic bullet unfortunately and it is consistent effort of keeping the data synced with parent If you add new property, please make sure those property has to be copied for children. If it does, please add the copy in the function RefreshParentAssetData

Variables

Name Description

Public variable

bool

 

bEnableAutoBlendOut

When it hits end, it automatically blends out.

Public variable

bool

 

bEnableRootMotionRotation

If this is on, it will allow extracting root motion rotation.

Public variable

bool

 

bEnableRootMotionTranslation

If this is on, it will allow extracting root motion translation.

Public variable

FAlphaBlend

 

BlendIn

Blend in option.

Public variable

FAlphaBlend

 

BlendOut

Blend out option.

Public variable

float

 

BlendOutTriggerTime

Time from Sequence End to trigger blend out.

Public variable

TArray< int32 >

 

BranchingPointStateNotifyIndices

Keep track of which AnimNotify_State are marked as BranchingPoints, so we can update their state when the Montage is ticked

Public variable

TArray< FCompos...

 

CompositeSections

Composite section.

Public variable

FMarkerSyncData

 

MarkerData

Public variable

UAnimSequence &...

 

PreviewBasePose

Preview Base pose for additive BlendSpace

Public variable

TEnumAsByte< ER...

 

RootMotionRootLock

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

Public variable

TArray< struct ...

 

SlotAnimTracks

Slot data, each slot contains anim track

Public variable

FName

 

SyncGroup

If you're using marker based sync for this montage, make sure to add sync group name.

Public variable

int32

 

SyncSlotIndex

Wip: until we have UI working

Public variable

FTimeStretchCur...

 

TimeStretchCurve

Public variable

FName

 

TimeStretchCurveName

Name of optional TimeStretchCurveName to look for in Montage.

Constructors

Name Description

Public function

UAnimMontage

(
    const FObjectInitializer& ObjectIn...
)

Functions

Name Description

Public function

int32

 

AddAnimCompositeSection

(
    FName InSectionName,
    float StartPos
)

Add Composite section with InSectionName returns index of added item returns INDEX_NONE if failed.

Public function

FSlotAnimati...

 

AddSlot

(
    FName SlotName
)

Add new slot track to this montage.

Public function Const

float

 

CalculatePos

(
    FCompositeSection& Section,
    float PosWithinCompositeSection
)

Utility function to calculate Animation Pos from Section, PosWithinCompositeSection

Public function

float

 

CalculateSequenceLength()

Gets the sequence length of the montage by calculating it from the lengths of the segments in the montage.

Public function Const

bool

 

CanUseMarkerSync()

Public function

void

 

CollectMarkers()

Update markers

Public function Static

UAnimMontage...

 

CreateSlotAnimationAsDynamicMontage

(
    UAnimSequenceBase* Asset,
    FName SlotNodeName,
    float BlendInTime,
    float BlendOutTime,
    float InPlayRate,
    int32 LoopCount,
    float BlendOutTriggerTime,
    float InTimeToStartMontageAt
)

Utility function to create dynamic montage from AnimSequence

Public function

bool

 

DeleteAnimCompositeSection

(
    int32 SectionIndex
)

Delete Composite section with InSectionName return true if success, false otherwise

Public function Const

FTransform

 

ExtractRootMotionFromTrackRange

(
    float StartTrackPosition,
    float EndTrackPosition
)

Extract RootMotion Transform from a contiguous Track position range.

Public function

void

 

FilterOutNotifyBranchingPoints

Filter out notifies from array that are marked as 'BranchingPoints'

Public function Const

const FBranc...

 

FindFirstBranchingPointMarker

(
    float StartTrackPos,
    float EndTrackPos
)

Find first branching point marker between track positions

Public function Const

const FAnimT...

 

GetAnimationData

(
    FName SlotName
)

Prototype function to get animation data - this will need rework

Public function Const

const FCompo...

 

GetAnimCompositeSection

(
    int32 SectionIndex
)

Get FCompositeSection with InSectionName

Public function

FCompositeSe...

 

GetAnimCompositeSection

(
    int32 SectionIndex
)

Get FCompositeSection with InSectionName

Public function Const

int32

 

GetAnimCompositeSectionIndexFromPos

(
    float CurrentTime,
    float& PosWithinCompositeSection
)

Get Section Index from CurrentTime with PosWithinCompositeSection

Public function Const

float

 

GetDefaultBlendOutTime()

Public function Const

FName

 

GetGroupName()

Get the Montage's Group Name. This is the group from the first slot.

Get Montage's Group Name

Public function Const

int32

 

GetSectionIndex

(
    FName InSectionName
)

Get SectionIndex from SectionName

Public function Const

int32

 

GetSectionIndexFromPosition

(
    float Position
)

Return Section Index from Position

Public function Const

float

 

GetSectionLength

(
    int32 SectionIndex
)

Public function

const TArray...

 

GetSectionMetaData

(
    FName SectionName,
    bool bIncludeSequence,
    FName SlotName
)

Get Section Metadata for the montage including metadata belong to the anim reference This will remove redundant entry if found - i.e. multiple same anim reference is used

Public function Const

FName

 

GetSectionName

(
    int32 SectionIndex
)

Get SectionName from SectionIndex in TArray

Public function Const

void

 

GetSectionStartAndEndTime

(
    int32 SectionIndex,
    float& OutStartTime,
    float& OutEndTime
)

Public function

float

 

GetSectionTimeLeftFromPos

(
    float Position
)

Return time left to end of section from given position. -1.f if not a valid position

Public function Const

bool

 

HasValidSlotSetup()

True if valid, false otherwise. Will log warning if not valid.

Public function Const

bool

 

IsValidAdditiveSlot

(
    const FName& SlotNodeName
)

Check if this slot has valid animation data

Public function Const

bool

 

IsValidSectionIndex

(
    int32 SectionIndex
)

Public function Const

bool

 

IsValidSectionName

(
    FName InSectionName
)

Public function Const

bool

 

IsValidSlot

(
    FName InSlotName
)

Return true if valid slot

Public function

void

 

RegisterOnMontageChanged

(
    const FOnMontageChanged& Delegate
)

Registers a delegate to be called after notification has changed

Public function

void

 

UnregisterOnMontageChanged

(
    void* Unregister
)

Public function

void

 

UpdateLinkableElements()

Update all linkable elements contained in the montage

Public function

void

 

UpdateLinkableElements

(
    int32 SlotIdx,
    int32 SegmentIdx
)

Update linkable elements that rely on a specific segment.

Overridden from UAnimCompositeBase

Name Description

Public function Virtual

bool

 

ContainRecursive

(
    TArray< UAnimCompositeBase* > ...
)

This is recursive function that look thorough internal assets and clear the reference if recursive is found.

Public function Virtual

void

 

InvalidateRecursiveAsset()

This is to prevent anybody adding recursive asset to anim composite as a result of anim composite being a part of anim sequence base

Overridden from UAnimSequenceBase

Name Description

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 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

bool

 

HasRootMotion()

Returns whether the anim sequences this montage have root motion enabled

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

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

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

void

 

PostEditChangeProperty

(
    FPropertyChangedEvent& PropertyCha...
)

Called when a property on this object has been modified externally

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.

Typedefs

Deprecated Variables

Name Description

Public variable

float

 

BlendInTime_DEPRECATED

Public variable

float

 

BlendOutTime_DEPRECATED

Public variable

TArray< struct ...

 

BranchingPoints_DEPRECATED

Remove this when VER_UE4_MONTAGE_BRANCHING_POINT_REMOVAL is removed.

Deprecated Functions

Name Description

Public function

void

 

FilterOutNotifyBranchingPoints

(
    TArray< const FAnimNotifyEvent*...
)

Use the GetAnimNotifiesFromTrackPositions that takes FAnimNotifyEventReferences instead

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss