Navigation
API > API/Runtime > API/Runtime/Engine
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
| Name | UAnimMontage |
| Type | class |
| Header File | /Engine/Source/Runtime/Engine/Classes/Animation/AnimMontage.h |
| Include Path | #include "Animation/AnimMontage.h" |
Syntax
UCLASS (Config=Engine, HideCategories=(UObject, Length), MinimalAPI, BlueprintType,
Meta=(LoadBehavior="LazyOnDemand"))
class UAnimMontage : public UAnimCompositeBase
Inheritance Hierarchy
- UObjectBase → UObjectBaseUtility → UObject → UAnimationAsset → UAnimSequenceBase → UAnimCompositeBase → UAnimMontage
Implements Interfaces
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
UAnimMontage
(
const FObjectInitializer& ObjectInitializer |
Animation/AnimMontage.h |
Typedefs
| Name | Type | Remarks | Include Path |
|---|---|---|---|
| FOnMontageChanged | FOnMontageChangedMulticaster::FDelegate | Animation/AnimMontage.h | |
| FOnMontageChangedMulticaster | TMulticastDelegate_NoParams< void > | Animation/AnimMontage.h |
Variables
Public
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| bEnableAutoBlendOut | bool | When it hits end, it automatically blends out. | Animation/AnimMontage.h |
|
| bEnableRootMotionRotation | bool | If this is on, it will allow extracting root motion rotation. | Animation/AnimMontage.h | |
| bEnableRootMotionTranslation | bool | If this is on, it will allow extracting root motion translation. | Animation/AnimMontage.h | |
| BlendIn | FAlphaBlend | Blend in option. | Animation/AnimMontage.h |
|
| BlendModeIn | EMontageBlendMode | Animation/AnimMontage.h |
|
|
| BlendModeOut | EMontageBlendMode | Animation/AnimMontage.h |
|
|
| BlendOut | FAlphaBlend | Blend out option. | Animation/AnimMontage.h |
|
| BlendOutTriggerTime | float | Time from Sequence End to trigger blend out. | Animation/AnimMontage.h |
|
| BlendProfileIn | TObjectPtr< UBlendProfile > | The blend profile to use. | Animation/AnimMontage.h |
|
| BlendProfileOut | TObjectPtr< UBlendProfile > | The blend profile to use. | Animation/AnimMontage.h |
|
| BranchingPointStateNotifyIndices | TArray< int32 > | Keep track of which AnimNotify_State are marked as BranchingPoints, so we can update their state when the Montage is ticked | Animation/AnimMontage.h | |
| CompositeSections | TArray< FCompositeSection > | Composite section. | Animation/AnimMontage.h | |
| MarkerData | FMarkerSyncData | Animation/AnimMontage.h | ||
| PreviewBasePose | TObjectPtr< UAnimSequence > | Preview Base pose for additive BlendSpace | Animation/AnimMontage.h |
|
| RootMotionRootLock | TEnumAsByte< ERootMotionRootLock::Type > | Root Bone will be locked to that position when extracting root motion. | Animation/AnimMontage.h | |
| SlotAnimTracks | TArray< struct FSlotAnimationTrack > | Slot data, each slot contains anim track | Animation/AnimMontage.h | |
| SyncGroup | FName | If you're using marker based sync for this montage, make sure to add sync group name. | Animation/AnimMontage.h |
|
| SyncSlotIndex | int32 | Index of the slot track used for collecting sync markers | Animation/AnimMontage.h |
|
| TimeStretchCurve | FTimeStretchCurve | Time stretch curve will only be used when the montage has a non-default play rate | Animation/AnimMontage.h |
|
| TimeStretchCurveName | FName | Name of optional TimeStretchCurveName to look for in Montage. | Animation/AnimMontage.h |
|
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| BranchingPointMarkers | TArray< FBranchingPointMarker > | Cached list of Branching Point markers | Animation/AnimMontage.h | |
| OnMontageChanged | FOnMontageChangedMulticaster | Animation/AnimMontage.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
int32 AddAnimCompositeSection
(
FName InSectionName, |
Add Composite section with InSectionName returns index of added item returns INDEX_NONE if failed. | Animation/AnimMontage.h | |
FSlotAnimationTrack & AddSlot
(
FName SlotName |
Add new slot track to this montage. | Animation/AnimMontage.h | |
float CalculatePos
(
FCompositeSection& Section, |
Utility function to calculate Animation Pos from Section, PosWithinCompositeSection | Animation/AnimMontage.h | |
float CalculateSequenceLength() |
Gets the sequence length of the montage by calculating it from the lengths of the segments in the montage. | Animation/AnimMontage.h | |
bool CanUseMarkerSync() |
Animation/AnimMontage.h | ||
void CollectMarkers() |
Update markers | Animation/AnimMontage.h | |
bool DeleteAnimCompositeSection
(
int32 SectionIndex |
Delete Composite section with InSectionName return true if success, false otherwise | Animation/AnimMontage.h | |
FTransform ExtractRootMotionFromTrackRange
(
float StartTrackPosition, |
Extract RootMotion Transform from a contiguous Track position range. | Animation/AnimMontage.h | |
FTransform ExtractRootMotionFromTrackRange
(
float StartTrackPosition, |
Animation/AnimMontage.h | ||
void FilterOutNotifyBranchingPoints
(
TArray< const FAnimNotifyEvent* >& InAnimNotifies |
Filter out notifies from array that are marked as 'BranchingPoints' | Animation/AnimMontage.h | |
void FilterOutNotifyBranchingPoints
(
TArray< FAnimNotifyEventReference >& InAnimNotifies |
Filter out notifies from array that are marked as 'BranchingPoints' | Animation/AnimMontage.h | |
const FBranchingPointMarker * FindFirstBranchingPointMarker
(
float StartTrackPos, |
Find first branching point marker between track positions | Animation/AnimMontage.h | |
const FAnimTrack * GetAnimationData
(
FName SlotName |
Prototype function to get animation data - this will need rework | Animation/AnimMontage.h | |
FCompositeSection & GetAnimCompositeSection
(
int32 SectionIndex |
Get FCompositeSection with InSectionName | Animation/AnimMontage.h | |
const FCompositeSection & GetAnimCompositeSection
(
int32 SectionIndex |
Animation/AnimMontage.h | ||
int32 GetAnimCompositeSectionIndexFromPos
(
float CurrentTime, |
Get Section Index from CurrentTime with PosWithinCompositeSection | Animation/AnimMontage.h | |
FAlphaBlendArgs GetBlendInArgs() |
Animation/AnimMontage.h |
|
|
FAlphaBlendArgs GetBlendOutArgs() |
Animation/AnimMontage.h |
|
|
float GetDefaultBlendInTime() |
Animation/AnimMontage.h |
|
|
float GetDefaultBlendOutTime() |
Animation/AnimMontage.h |
|
|
UAnimSequenceBase * GetFirstAnimReference() |
Animation/AnimMontage.h |
|
|
FName GetGroupName() |
Get the Montage's Group Name. This is the group from the first slot. Get Montage's Group Name | Animation/AnimMontage.h |
|
virtual FMarkerSyncAnimPosition GetMarkerSyncPositionfromMarkerIndicies
(
int32 PrevMarker, |
Animation/AnimMontage.h | ||
int32 GetNumSections() |
Returns the number of sections this montage has | Animation/AnimMontage.h |
|
int32 GetSectionIndex
(
FName InSectionName |
Get SectionIndex from SectionName. Returns INDEX_None if not found | Animation/AnimMontage.h |
|
int32 GetSectionIndexFromPosition
(
float Position |
Return Section Index from Position | Animation/AnimMontage.h | |
float GetSectionLength
(
int32 SectionIndex |
Animation/AnimMontage.h | ||
const TArray< class UAnimMetaData * > GetSectionMetaData
(
FName SectionName, |
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 | Animation/AnimMontage.h | |
FName GetSectionName
(
int32 SectionIndex |
Get SectionName from SectionIndex. Returns NAME_None if not found | Animation/AnimMontage.h |
|
void GetSectionStartAndEndTime
(
int32 SectionIndex, |
Animation/AnimMontage.h | ||
float GetSectionTimeLeftFromPos
(
float Position |
Return time left to end of section from given position. -1.f if not a valid position | Animation/AnimMontage.h | |
bool HasValidSlotSetup() |
True if valid, false otherwise. Will log warning if not valid. | Animation/AnimMontage.h | |
bool IsDynamicMontage() |
Animation/AnimMontage.h |
|
|
bool IsValidAdditiveSlot
(
const FName& SlotNodeName |
Check if this slot has a valid additive animation for the specified slot. | Animation/AnimMontage.h |
|
bool IsValidSectionIndex
(
int32 SectionIndex |
Animation/AnimMontage.h | ||
bool IsValidSectionName
(
FName InSectionName |
Animation/AnimMontage.h |
|
|
bool IsValidSlot
(
FName InSlotName |
Return true if valid slot | Animation/AnimMontage.h | |
void RegisterOnMontageChanged
(
const FOnMontageChanged& Delegate |
Registers a delegate to be called after notification has changed | Animation/AnimMontage.h | |
void UnregisterOnMontageChanged
(
FDelegateUserObject Unregister |
Animation/AnimMontage.h | ||
void UpdateLinkableElements () |
Update all linkable elements contained in the montage | Animation/AnimMontage.h | |
void UpdateLinkableElements
(
int32 SlotIdx, |
Update linkable elements that rely on a specific segment. | Animation/AnimMontage.h |
Overridden from UAnimCompositeBase
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual bool ContainRecursive
(
TArray< UAnimCompositeBase* >& CurrentAccumulatedList |
This is recursive function that look thorough internal assets and clear the reference if recursive is found. | Animation/AnimMontage.h | |
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 | Animation/AnimMontage.h | |
virtual void SetCompositeLength
(
float InLength |
Animation/AnimMontage.h |
Overridden from UAnimSequenceBase
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual EAnimEventTriggerOffsets::Type CalculateOffsetForNotify
(
float NotifyDisplayTime |
Calculates what (if any) offset should be applied to the trigger time of a notify given its display time | Animation/AnimMontage.h | |
virtual bool CanBeUsedInComposition() |
Animation/AnimMontage.h | ||
virtual void GetAnimationPose
(
FAnimationPoseData& OutPoseData, |
Get Bone Transform of the Time given, relative to Parent for all RequiredBones This returns different transform based on additive or not. | Animation/AnimMontage.h | |
virtual void GetMarkerIndicesForTime
(
float CurrentTime, |
Animation/AnimMontage.h | ||
virtual FMarkerSyncAnimPosition GetMarkerSyncPositionFromMarkerIndicies
(
int32 PrevMarker, |
Animation/AnimMontage.h | ||
virtual FFrameRate GetSamplingFrameRate() |
Return rate at which the animation is sampled | Animation/AnimMontage.h | |
virtual bool HasRootMotion() |
Returns whether the anim sequences this montage have root motion enabled | Animation/AnimMontage.h | |
virtual void PopulateWithExistingModel
(
TScriptInterface< IAnimationDataModel > ExistingDataModel |
Animation/AnimMontage.h | ||
virtual void RefreshCacheData() |
Update cache data (notify tracks, sync markers) | Animation/AnimMontage.h |
Overridden from UAnimationAsset
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual bool GetAllAnimationSequencesReferred
(
TArray< UAnimationAsset* >& AnimationSequences, |
Retrieve all animations that are used by this asset | Animation/AnimMontage.h | |
| Return a list of unique marker names for blending compatibility | Animation/AnimMontage.h | ||
virtual bool IsValidAdditive() |
Return true if this is valid additive animation false otherwise | Animation/AnimMontage.h | |
virtual void ReplaceReferredAnimations
(
const TMap< UAnimationAsset*, UAnimationAsset* >& ReplacementMap |
Replace this assets references to other animations based on ReplacementMap | Animation/AnimMontage.h | |
virtual void TickAssetPlayer
(
FAnimTickRecord& Instance, |
Advances the asset player instance | Animation/AnimMontage.h |
Overridden from UObject
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void GetResourceSizeEx
(
FResourceSizeEx& CumulativeResourceSize |
Animation/AnimMontage.h | ||
virtual void PostEditChangeProperty
(
FPropertyChangedEvent& PropertyChangedEvent |
Animation/AnimMontage.h | ||
virtual void PostLoad() |
Animation/AnimMontage.h | ||
virtual void PreSave
(
FObjectPreSaveContext ObjectSaveContext |
Animation/AnimMontage.h | ||
virtual void Serialize
(
FArchive& Ar |
Animation/AnimMontage.h |
Static
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
static UAnimMontage * CreateSlotAnimationAsDynamicMontage
(
UAnimSequenceBase* Asset, |
Utility function to create dynamic montage from AnimSequence | Animation/AnimMontage.h | |
static UAnimMontage * CreateSlotAnimationAsDynamicMontage_WithBlendSettings
(
UAnimSequenceBase* Asset, |
Utility function to create dynamic montage from AnimSequence with blend in settings | Animation/AnimMontage.h |
|
static UAnimMontage * CreateSlotAnimationAsDynamicMontage_WithFractionalLoops
(
UAnimSequenceBase* Asset, |
Utility function to create dynamic montage from AnimSequence | Animation/AnimMontage.h |
Deprecated Variables
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| BlendInTime_DEPRECATED | float | Animation/AnimMontage.h | ||
| BlendOutTime_DEPRECATED | float | Animation/AnimMontage.h | ||
| BranchingPoints_DEPRECATED | TArray< struct FBranchingPoint > | Remove this when VER_UE4_MONTAGE_BRANCHING_POINT_REMOVAL is removed. | Animation/AnimMontage.h |