UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
TMovieSceneChannelData< ValueType > Struct Template Reference

#include <MovieSceneChannelData.h>

+ Inheritance diagram for TMovieSceneChannelData< ValueType >:

Public Types

typedef TCallTraits< ValueType >::ParamType ParamType
 

Public Member Functions

 TMovieSceneChannelData (TArray< FFrameNumber > *InTimes, TArray< ValueType > *InValues, FKeyHandleLookupTable *InKeyHandles, FMovieSceneChannel *InChannel=nullptr)
 
 TMovieSceneChannelData (TArray< FFrameNumber > *InTimes, TArray< ValueType > *InValues, FMovieSceneChannel *InChannel, FKeyHandleLookupTable *InKeyHandles)
 
 operator TMovieSceneChannelData< const ValueType > ()
 
TArrayView< const ValueType > GetValues () const
 
TArrayView< ValueType > GetValues ()
 
int32 AddKey (FFrameNumber InTime, ParamType InValue)
 
int32 MoveKey (int32 KeyIndex, FFrameNumber NewTime, bool bRemoveDuplicateKeys=false)
 
template<typename TCanRemove >
requires std::is_invocable_r_v<bool, TCanRemove, const FKeyHandle&>
int32 MoveKey (int32 KeyIndex, FFrameNumber NewTime, bool bRemoveDuplicateKeys, TCanRemove &&CanRemove)
 
int32 SetKeyTime (int32 KeyIndex, FFrameNumber InNewTime)
 
void RemapTimes (const UE::MovieScene::IRetimingInterface &Retimer)
 
void ReplaceKeyHandle (int32 KeyIndex, FKeyHandle NewHandle)
 
void ReplaceKeyHandles (TConstArrayView< int32 > KeyIndices, TConstArrayView< FKeyHandle > NewHandles)
 
void RemoveKey (int32 KeyIndex)
 
FKeyHandle UpdateOrAddKey (FFrameNumber InTime, ParamType InValue)
 
void UpdateOrAddKeys (const TArrayView< const FFrameNumber > InTimes, const TArrayView< ValueType > InValues)
 
void SetKeyTimes (TArrayView< const FKeyHandle > InHandles, TArrayView< const FFrameNumber > InKeyTimes)
 
void DuplicateKeys (TArrayView< const FKeyHandle > InHandles, TArrayView< FKeyHandle > OutNewHandles)
 
void DeleteKeys (TArrayView< const FKeyHandle > InHandles)
 
void DeleteKeysFrom (FFrameNumber InTime, bool bDeleteKeysBefore)
 
void Reset ()
 
- Public Member Functions inherited from FMovieSceneChannelData
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)
 

Additional Inherited Members

- Protected Member Functions inherited from FMovieSceneChannelData
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 inherited from FMovieSceneChannelData
TArray< FFrameNumber > * Times
 
FKeyHandleLookupTableKeyHandles
 
FMovieSceneChannelOwningChannel
 

Detailed Description

template<typename ValueType>
struct TMovieSceneChannelData< ValueType >

Templated channel data utility class that provides a consistent interface for interacting with a channel's keys and values. Assumes that the supplied time and value arrays are already sorted ascendingly by time and are the same size. This class will maintain those invariants throughout its lifetime.

Member Typedef Documentation

◆ ParamType

template<typename ValueType >
typedef TCallTraits<ValueType>::ParamType TMovieSceneChannelData< ValueType >::ParamType

Constructor & Destructor Documentation

◆ TMovieSceneChannelData() [1/2]

template<typename ValueType >
TMovieSceneChannelData< ValueType >::TMovieSceneChannelData ( TArray< FFrameNumber > *  InTimes,
TArray< ValueType > *  InValues,
FKeyHandleLookupTable InKeyHandles,
FMovieSceneChannel InChannel = nullptr 
)
inline

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

Parameters
InTimesA pointer to an array of times that should be operated on by this class. Externally owned.
InValuesA pointer to an array of values that should be operated on by this class. Externally owned.
InKeyHandlesA key handle map used for persistent, order independent identification of keys
InChannelA option point to the owning channel, should be set if the move,add, delete delegates are utilizaed

◆ TMovieSceneChannelData() [2/2]

template<typename ValueType >
TMovieSceneChannelData< ValueType >::TMovieSceneChannelData ( TArray< FFrameNumber > *  InTimes,
TArray< ValueType > *  InValues,
FMovieSceneChannel InChannel,
FKeyHandleLookupTable InKeyHandles 
)
inline

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

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

Member Function Documentation

◆ AddKey()

template<typename ValueType >
int32 TMovieSceneChannelData< ValueType >::AddKey ( FFrameNumber  InTime,
ParamType  InValue 
)
inline

Add a new key at a given time

Parameters
InTimeThe time at which to add the new key
InValueThe value of the new key
Returns
The index of the newly added key

◆ DeleteKeys()

template<typename ValueType >
void TMovieSceneChannelData< ValueType >::DeleteKeys ( TArrayView< const FKeyHandle InHandles)
inline

Delete a number of keys from this channel data

Parameters
InHandlesArray of key handles that should be deleted

◆ DeleteKeysFrom()

template<typename ValueType >
void TMovieSceneChannelData< ValueType >::DeleteKeysFrom ( FFrameNumber  InTime,
bool  bDeleteKeysBefore 
)
inline

Delete keys before or after a specified time

Parameters
InTimeDelete keys after this time
bDeleteKeysBeforeWhether to delete keys before the specified time

◆ DuplicateKeys()

template<typename ValueType >
void TMovieSceneChannelData< ValueType >::DuplicateKeys ( TArrayView< const FKeyHandle InHandles,
TArrayView< FKeyHandle OutNewHandles 
)
inline

Duplicate a number of keys within this channel data

Parameters
InHandlesArray of key handles that should be duplicated
OutNewHandlesArray view to receive key handles for each duplicated key. Must exactly mathc the size of InHandles.

◆ GetValues() [1/2]

template<typename ValueType >
TArrayView< ValueType > TMovieSceneChannelData< ValueType >::GetValues ( )
inline

Mutable access to this channel's values

◆ GetValues() [2/2]

template<typename ValueType >
TArrayView< const ValueType > TMovieSceneChannelData< ValueType >::GetValues ( ) const
inline

Read-only access to this channel's values

◆ MoveKey() [1/2]

template<typename ValueType >
template<typename TCanRemove >
requires std::is_invocable_r_v<bool, TCanRemove, const FKeyHandle&>
int32 TMovieSceneChannelData< ValueType >::MoveKey ( int32  KeyIndex,
FFrameNumber  NewTime,
bool  bRemoveDuplicateKeys,
TCanRemove &&  CanRemove 
)
inline

◆ MoveKey() [2/2]

template<typename ValueType >
int32 TMovieSceneChannelData< ValueType >::MoveKey ( int32  KeyIndex,
FFrameNumber  NewTime,
bool  bRemoveDuplicateKeys = false 
)
inline

Move the key at index KeyIndex to a new time

Parameters
KeyIndexThe index of the key to move
NewTimeThe time to move the key to
Returns
The index of the key in its new position

◆ operator TMovieSceneChannelData< const ValueType >()

template<typename ValueType >
TMovieSceneChannelData< ValueType >::operator TMovieSceneChannelData< const ValueType > ( )
inline

Conversion to a constant version of this class

◆ RemapTimes()

template<typename ValueType >
void TMovieSceneChannelData< ValueType >::RemapTimes ( const UE::MovieScene::IRetimingInterface Retimer)
inline

Remap the times of all the keys in this channel using an abstract retimer

Parameters
RetimerCustom retimer object that can convert from an old time to a new time

◆ RemoveKey()

template<typename ValueType >
void TMovieSceneChannelData< ValueType >::RemoveKey ( int32  KeyIndex)
inline

Remove the key at a given index

Parameters
KeyIndexThe index of the key to remove

◆ ReplaceKeyHandle()

template<typename ValueType >
void TMovieSceneChannelData< ValueType >::ReplaceKeyHandle ( int32  KeyIndex,
FKeyHandle  NewHandle 
)
inline

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

Parameters
KeyIndexThe index of the key to replace
NewHandleThe key handle instance that should be at the given index.

◆ ReplaceKeyHandles()

template<typename ValueType >
void TMovieSceneChannelData< ValueType >::ReplaceKeyHandles ( TConstArrayView< int32 KeyIndices,
TConstArrayView< FKeyHandle NewHandles 
)
inline

Replaces the key handles at the given KeyIndices with NewHandles. Handles already in use are skipped.

Parameters
KeyIndicesThe indidces of the keys to replace
NewHandlesThe key handle instances that should be at the given indices.

◆ Reset()

template<typename ValueType >
void TMovieSceneChannelData< ValueType >::Reset ( )
inline

Remove all the keys from this channel

◆ SetKeyTime()

template<typename ValueType >
int32 TMovieSceneChannelData< ValueType >::SetKeyTime ( int32  KeyIndex,
FFrameNumber  InNewTime 
)
inline

Move the key at index KeyIndex to a new time

Parameters
KeyIndexThe index of the key to move
NewTimeThe time to move the key to
Returns
The index of the key in its new position

◆ SetKeyTimes()

template<typename ValueType >
void TMovieSceneChannelData< ValueType >::SetKeyTimes ( TArrayView< const FKeyHandle InHandles,
TArrayView< const FFrameNumber InKeyTimes 
)
inline

Set key times for a number of keys in this channel data

Parameters
InHandlesArray of key handles that should have their times set
InKeyTimesArray of new times for each handle of the above array

◆ UpdateOrAddKey()

template<typename ValueType >
FKeyHandle TMovieSceneChannelData< ValueType >::UpdateOrAddKey ( FFrameNumber  InTime,
ParamType  InValue 
)
inline

Set the value of the key at InTime to InValue, adding a new key if necessary

Parameters
InTimeThe time at which to add the new key
InValueThe value of the new key
Returns
The handle of the key

◆ UpdateOrAddKeys()

template<typename ValueType >
void TMovieSceneChannelData< ValueType >::UpdateOrAddKeys ( const TArrayView< const FFrameNumber InTimes,
const TArrayView< ValueType >  InValues 
)
inline

Updates keys with these times in the channel. Will add or insert any missing keys, and replace values of existing keys. This assumes that the InTimes array is sorted, as it performs a tape merge to efficiently update the keys.

Parameters
InTimesTimes to update
InValuesValues to update

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