FAnimLinkableElement

Used to describe an element that can be linked to a segment in a montage or sequence.

Windows
MacOS
Linux

Inheritance Hierarchy

References

Module

Engine

Header

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

Include

#include "Animation/AnimLinkableElement.h"

Syntax

struct FAnimLinkableElement

Remarks

Used to describe an element that can be linked to a segment in a montage or sequence. Usage: Inherit from FAnimLinkableElement and make sure to call LinkMontage or LinkSequence both on creation and on loading the element. From there SetTime and GetTime should be used to control where this element is in the montage or sequence.

For more advanced usage, see this implementation used in FAnimNotifyEvent where we have a secondary link to handle a duration

Variables

Name Description

Protected variable

TEnumAsByte< EA...

 

CachedLinkMethod

Cached link method used to transform the time when LinkMethod changes, always relates to the currently stored time

Protected variable

UAnimMontage &#...

 

LinkedMontage

The montage that this element is currently linked to

Protected variable

UAnimSequenceBa...

 

LinkedSequence

The Animation Sequence that this montage element will link to, when the sequence changes in either length or rate; the element will correctly place itself in relation to the sequence

Protected variable

TEnumAsByte< EA...

 

LinkMethod

The method we are using to calculate our times

Protected variable

float

 

LinkValue

The time of this montage.

Protected variable

float

 

SegmentBeginTime

The absolute time in the montage that our currently linked segment begins

Protected variable

int32

 

SegmentIndex

The index of the segment we are linked to within the slot we are using

Protected variable

float

 

SegmentLength

The absolute length of our currently linked segment

Protected variable

int32

 

SlotIndex

The slot index we are currently using within LinkedMontage

Constructors

Name Description

Public function

FAnimLinkableElement()

Destructors

Name Description

Public function Virtual

~FAnimLinkableElement()

Functions

Name Description

Public function

void

 

ChangeLinkMethod

(
    EAnimLinkMethod::Type NewLinkMethod
)

Changes the way this element is linked to its segment

Public function

void

 

ChangeSlotIndex

(
    int32 NewSlotIndex
)

Change the montage slot that this element is linked to

Public function

void

 

Clear()

Clear the linking information from this element, leaves montage link intact

Public function

bool

 

ConditionalRelink()

Relinks this element if internal state requires relinking

Public function Const

const UAnimM...

 

GetLinkedMontage()

Gets the Montage this element is linked to, if any

Public function

const UAnimS...

 

GetLinkedSequence()

Gets the sequence this element is linked to

Public function Const

EAnimLinkMet...

 

GetLinkMethod()

Get the method used to link this element to its segment

Protected function

FAnimSegment...

 

GetSegmentAtCurrentTime()

Gets the segment in the current montage in the current slot that is at the time of this element

Public function Const

int32

 

GetSegmentIndex()

Get the index of the segment this element is currently linked to

Public function Const

int32

 

GetSlotIndex()

Get the slot index this element is currently linked to

Public function Const

float

 

GetTime

(
    EAnimLinkMethod::Type ReferenceFram...
)

Gets the current time for this element

Public function

void

 

Link

(
    UAnimSequenceBase* AnimObject,
    float AbsTime,
    int32 InSlotIndex
)

Link this element to an animation object (Sequence or Montage)

Public function

void

 

LinkMontage

(
    UAnimMontage* Montage,
    float AbsMontageTime,
    int32 InSlotIndex
)

Link this element to a montage

Public function

void

 

LinkSequence

(
    UAnimSequenceBase* Sequence,
    float AbsSequenceTime
)

Link this element to a Sequence, Just setting basic data as sequences don't need full linking

Public function

void

 

OnChanged

(
    float NewMontageTime
)

Called when the properties of this element are changed

Public function

void

 

RefreshSegmentOnLoad()

Refreshes the current segment data (Begin time, length etc.) and validate the link time Intended to update the internal state when segment lengths/times could have changed

Public function

void

 

SetSegmentIndex

(
    int32 NewSegmentIndex
)

Directly sets segment index

Public function Virtual

void

 

SetTime

(
    float NewTime,
    EAnimLinkMethod::Type ReferenceFram...
)

Sets the time of this element

Public function

void

 

Update()

Update the timing information for this element.

See Also

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