UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
FMovieSceneChannelData Struct Reference

#include <MovieSceneChannelData.h>

+ Inheritance diagram for FMovieSceneChannelData:

Public Member Functions

TArrayView< const FFrameNumberGetTimes () const
 
TArrayView< FFrameNumberGetTimes ()
 
MOVIESCENE_API FKeyHandle GetHandle (int32 Index)
 
MOVIESCENE_API int32 GetIndex (FKeyHandle Handle)
 
MOVIESCENE_API int32 FindKey (FFrameNumber InTime, FFrameNumber InTolerance=0)
 
MOVIESCENE_API void FindKeys (FFrameNumber InTime, int32 MaxNum, int32 &OutMinIndex, int32 &OutMaxIndex, int32 InTolerance)
 
MOVIESCENE_API TRange< FFrameNumberGetTotalRange () const
 
MOVIESCENE_API void ChangeFrameResolution (FFrameRate SourceRate, FFrameRate DestinationRate)
 
MOVIESCENE_API void GetKeys (const TRange< FFrameNumber > &WithinRange, TArray< FFrameNumber > *OutKeyTimes, TArray< FKeyHandle > *OutKeyHandles)
 
MOVIESCENE_API void GetKeyTimes (TArrayView< const FKeyHandle > InHandles, TArrayView< FFrameNumber > OutKeyTimes)
 
MOVIESCENE_API void Offset (FFrameNumber DeltaTime)
 

Protected Member Functions

MOVIESCENE_API FMovieSceneChannelData (FMovieSceneChannel *InChannel, TArray< FFrameNumber > *InTimes, FKeyHandleLookupTable *InKeyHandles)
 
MOVIESCENE_API FMovieSceneChannelData (TArray< FFrameNumber > *InTimes, FKeyHandleLookupTable *InKeyHandles, FMovieSceneChannel *InChannel=nullptr)
 
MOVIESCENE_API int32 MoveKeyInternal (int32 KeyIndex, FFrameNumber InNewTime)
 
MOVIESCENE_API int32 AddKeyInternal (FFrameNumber InTime)
 
MOVIESCENE_API void ReplaceKeyHandlesInternal (TConstArrayView< int32 > KeyIndices, TConstArrayView< FKeyHandle > NewHandles)
 

Protected Attributes

TArray< FFrameNumber > * Times
 
FKeyHandleLookupTableKeyHandles
 
FMovieSceneChannelOwningChannel
 

Detailed Description

Base class channel data utility that provides a consistent interface to a sorted array of times and handles. Complete access should be through TMovieSceneChannelData that allows mutation of the data

Constructor & Destructor Documentation

◆ FMovieSceneChannelData() [1/2]

FMovieSceneChannelData::FMovieSceneChannelData ( FMovieSceneChannel InChannel,
TArray< FFrameNumber > *  InTimes,
FKeyHandleLookupTable InKeyHandles 
)
protected

Constructor that takes a non-owning pointer to an array of times and a key handle map

Parameters
InTimesA pointer to an array that should be operated on by this class. Externally owned.
InKeyHandlesA key handle map used for persistent, order independent identification of keys
InChannelA pointer to the owning channel.

◆ FMovieSceneChannelData() [2/2]

FMovieSceneChannelData::FMovieSceneChannelData ( TArray< FFrameNumber > *  InTimes,
FKeyHandleLookupTable InKeyHandles,
FMovieSceneChannel InChannel = nullptr 
)
protected

Member Function Documentation

◆ AddKeyInternal()

int32 FMovieSceneChannelData::AddKeyInternal ( FFrameNumber  InTime)
protected

Add a new key at the specified time

Returns
The index of the key in its new position

◆ ChangeFrameResolution()

void FMovieSceneChannelData::ChangeFrameResolution ( FFrameRate  SourceRate,
FFrameRate  DestinationRate 
)

Convert the frame resolution of a movie scene channel by moving the key times to the equivalent frame time

Parameters
SourceRateThe frame rate the channel is currently in
DestinationRateThe new frame rate to convert the channel to

◆ FindKey()

int32 FMovieSceneChannelData::FindKey ( FFrameNumber  InTime,
FFrameNumber  InTolerance = 0 
)

Attempt to find a key at a given time and tolerance

Parameters
InTimeThe time at which to search
InToleranceA tolerance of frame numbers to allow either side of the specified time
Returns
The index of the key closest to InTime and within InTolerance, or INDEX_NONE

◆ FindKeys()

void FMovieSceneChannelData::FindKeys ( FFrameNumber  InTime,
int32  MaxNum,
int32 OutMinIndex,
int32 OutMaxIndex,
int32  InTolerance 
)

Find the range of keys that fall around InTime +/- InTolerance up to a maximum

Parameters
InTimeThe time around which to search
MaxNumA maximum number of times to find, starting with those closest to the predicate time
OutMinThe earliest index that met the conditions of the search
OutMaxThe latest index that met the conditions of the search
InToleranceThe tolerance range to search around PredicateTime with

◆ GetHandle()

FKeyHandle FMovieSceneChannelData::GetHandle ( int32  Index)

Retrieve a key handle for the specified key time index

Parameters
IndexThe index to retrieve
Returns
A key handle that identifies the key at the specified index, regardless of re-ordering

◆ GetIndex()

int32 FMovieSceneChannelData::GetIndex ( FKeyHandle  Handle)

Attempt to retrieve the index of key from its handle

Parameters
HandleThe handle to retrieve
Returns
The index of the key, or INDEX_NONE

◆ GetKeys()

void FMovieSceneChannelData::GetKeys ( const TRange< FFrameNumber > &  WithinRange,
TArray< FFrameNumber > *  OutKeyTimes,
TArray< FKeyHandle > *  OutKeyHandles 
)

Get all the keys in the given range. Resulting arrays must be the same size where indices correspond to both arrays.

Parameters
WithinRangeThe bounds to get keys for
OutKeyTimesArray to receive all key times within the given range
OutKeyHandlesArray to receive all key handles within the given range

◆ GetKeyTimes()

void FMovieSceneChannelData::GetKeyTimes ( TArrayView< const FKeyHandle InHandles,
TArrayView< FFrameNumber OutKeyTimes 
)

Get key times for a number of keys in the channel data

Parameters
InHandlesArray of key handles that should have their times set
OutKeyTimesArray of times that should be set for each key handle. Must be exactly the size of InHandles

◆ GetTimes() [1/2]

TArrayView< FFrameNumber > FMovieSceneChannelData::GetTimes ( )
inline

Mutable access to this channel's key times.

Note
: Warning: any usage must keep times sorted. Any reordering of times will not be reflected in the values array.

◆ GetTimes() [2/2]

TArrayView< const FFrameNumber > FMovieSceneChannelData::GetTimes ( ) const
inline

Read-only access to this channel's key times.

◆ GetTotalRange()

TRange< FFrameNumber > FMovieSceneChannelData::GetTotalRange ( ) const

Compute the total time range of the channel data.

Returns
The range of this channel data

◆ MoveKeyInternal()

int32 FMovieSceneChannelData::MoveKeyInternal ( int32  KeyIndex,
FFrameNumber  InNewTime 
)
protected

Move the key at index KeyIndex to a new time

Returns
The index of the key in its new position

◆ Offset()

void FMovieSceneChannelData::Offset ( FFrameNumber  DeltaTime)

Offset the channel data by a given delta time

Parameters
DeltaTimeThe time to offset by

◆ ReplaceKeyHandlesInternal()

void FMovieSceneChannelData::ReplaceKeyHandlesInternal ( TConstArrayView< int32 KeyIndices,
TConstArrayView< FKeyHandle NewHandles 
)
protected

Replaces the key handle at the given Index with NewHandle. Fails if the handle is already in use.

Parameters
KeyIndicesThe index of the key to replace
NewHandlesThe key handle instance that should be at the given index.

Member Data Documentation

◆ KeyHandles

FKeyHandleLookupTable* FMovieSceneChannelData::KeyHandles
protected

Pointer to an external key handle map

◆ OwningChannel

FMovieSceneChannel* FMovieSceneChannelData::OwningChannel
protected

Optional Pointer to the owning FMovieSceneChannel, should be set if the add,move, and delete callbacks are needed

◆ Times

TArray<FFrameNumber>* FMovieSceneChannelData::Times
protected

Pointer to an external array of sorted times. Must be kept in sync with a corresponding value array.


The documentation for this struct was generated from the following files: