UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
IAnimationDataController Class Referenceabstract

#include <IAnimationDataController.h>

Public Member Functions

virtual void SetModel (TScriptInterface< IAnimationDataModel > InModel)=0
 
virtual TScriptInterface< IAnimationDataModelGetModelInterface () const =0
 
virtual const IAnimationDataModel *const GetModel () const =0
 
virtual void OpenBracket (const FText &InTitle, bool bShouldTransact=true)=0
 
virtual void CloseBracket (bool bShouldTransact=true)=0
 
virtual void SetNumberOfFrames (FFrameNumber NewLengthInFrames, bool bShouldTransact=true)=0
 
virtual void SetPlayLength (float Length, bool bShouldTransact=true)=0
 
virtual void ResizeNumberOfFrames (FFrameNumber NewLengthInFrames, FFrameNumber T0, FFrameNumber T1, bool bShouldTransact=true)=0
 
virtual void ResizePlayLength (float NewLength, float T0, float T1, bool bShouldTransact=true)=0
 
virtual void ResizeInFrames (FFrameNumber NewLengthInFrames, FFrameNumber T0, FFrameNumber T1, bool bShouldTransact=true)=0
 
virtual void Resize (float Length, float T0, float T1, bool bShouldTransact=true)=0
 
virtual void SetFrameRate (FFrameRate FrameRate, bool bShouldTransact=true)=0
 
virtual int32 AddBoneTrack (FName BoneName, bool bShouldTransact=true)
 
virtual bool AddBoneCurve (FName BoneName, bool bShouldTransact=true)=0
 
virtual int32 InsertBoneTrack (FName BoneName, int32 DesiredIndex, bool bShouldTransact=true)=0
 
virtual bool RemoveBoneTrack (FName BoneName, bool bShouldTransact=true)=0
 
virtual void RemoveAllBoneTracks (bool bShouldTransact=true)=0
 
virtual bool SetBoneTrackKeys (FName BoneName, const TArray< FVector3f > &PositionalKeys, const TArray< FQuat4f > &RotationalKeys, const TArray< FVector3f > &ScalingKeys, bool bShouldTransact=true)=0
 
virtual bool SetBoneTrackKeys (FName BoneName, const TArray< FVector > &PositionalKeys, const TArray< FQuat > &RotationalKeys, const TArray< FVector > &ScalingKeys, bool bShouldTransact=true)=0
 
virtual bool UpdateBoneTrackKeys (FName BoneName, const FInt32Range &KeyRangeToSet, const TArray< FVector3f > &PositionalKeys, const TArray< FQuat4f > &RotationalKeys, const TArray< FVector3f > &ScalingKeys, bool bShouldTransact=true)=0
 
virtual bool UpdateBoneTrackKeys (FName BoneName, const FInt32Range &KeyRangeToSet, const TArray< FVector > &PositionalKeys, const TArray< FQuat > &RotationalKeys, const TArray< FVector > &ScalingKeys, bool bShouldTransact=true)=0
 
virtual bool AddCurve (const FAnimationCurveIdentifier &CurveId, int32 CurveFlags=0x00000004, bool bShouldTransact=true)=0
 
virtual bool DuplicateCurve (const FAnimationCurveIdentifier &CopyCurveId, const FAnimationCurveIdentifier &NewCurveId, bool bShouldTransact=true)=0
 
virtual bool RemoveCurve (const FAnimationCurveIdentifier &CurveId, bool bShouldTransact=true)=0
 
virtual void RemoveAllCurvesOfType (ERawCurveTrackTypes SupportedCurveType, bool bShouldTransact=true)=0
 
virtual bool SetCurveFlag (const FAnimationCurveIdentifier &CurveId, EAnimAssetCurveFlags Flag, bool bState=true, bool bShouldTransact=true)=0
 
virtual bool SetCurveFlags (const FAnimationCurveIdentifier &CurveId, int32 Flags, bool bShouldTransact=true)=0
 
virtual bool SetTransformCurveKeys (const FAnimationCurveIdentifier &CurveId, const TArray< FTransform > &TransformValues, const TArray< float > &TimeKeys, bool bShouldTransact=true)=0
 
virtual bool SetTransformCurveKey (const FAnimationCurveIdentifier &CurveId, float Time, const FTransform &Value, bool bShouldTransact=true)=0
 
virtual bool RemoveTransformCurveKey (const FAnimationCurveIdentifier &CurveId, float Time, bool bShouldTransact=true)=0
 
virtual bool RenameCurve (const FAnimationCurveIdentifier &CurveToRenameId, const FAnimationCurveIdentifier &NewCurveId, bool bShouldTransact=true)=0
 
virtual bool SetCurveColor (const FAnimationCurveIdentifier &CurveId, FLinearColor Color, bool bShouldTransact=true)=0
 
virtual bool SetCurveComment (const FAnimationCurveIdentifier &CurveId, const FString &Comment, bool bShouldTransact=true)=0
 
virtual bool ScaleCurve (const FAnimationCurveIdentifier &CurveId, float Origin, float Factor, bool bShouldTransact=true)=0
 
virtual bool SetCurveKey (const FAnimationCurveIdentifier &CurveId, const FRichCurveKey &Key, bool bShouldTransact=true)=0
 
virtual bool RemoveCurveKey (const FAnimationCurveIdentifier &CurveId, float Time, bool bShouldTransact=true)=0
 
virtual bool SetCurveKeys (const FAnimationCurveIdentifier &CurveId, const TArray< FRichCurveKey > &CurveKeys, bool bShouldTransact=true)=0
 
virtual bool SetCurveAttributes (const FAnimationCurveIdentifier &CurveId, const FCurveAttributes &Attributes, bool bShouldTransact=true)=0
 
virtual void UpdateCurveNamesFromSkeleton (const USkeleton *Skeleton, ERawCurveTrackTypes SupportedCurveType, bool bShouldTransact=true)
 
virtual void FindOrAddCurveNamesOnSkeleton (USkeleton *Skeleton, ERawCurveTrackTypes SupportedCurveType, bool bShouldTransact=true)
 
virtual bool RemoveBoneTracksMissingFromSkeleton (const USkeleton *Skeleton, bool bShouldTransact=true)=0
 
virtual void UpdateAttributesFromSkeleton (const USkeleton *Skeleton, bool bShouldTransact=true)=0
 
virtual void NotifyPopulated ()=0
 
virtual void ResetModel (bool bShouldTransact=true)=0
 
virtual bool AddAttribute (const FAnimationAttributeIdentifier &AttributeIdentifier, bool bShouldTransact=true)=0
 
virtual bool RemoveAttribute (const FAnimationAttributeIdentifier &AttributeIdentifier, bool bShouldTransact=true)=0
 
virtual int32 RemoveAllAttributesForBone (const FName &BoneName, bool bShouldTransact=true)=0
 
virtual int32 RemoveAllAttributes (bool bShouldTransact=true)=0
 
template<typename AttributeType >
bool SetTypedAttributeKey (const FAnimationAttributeIdentifier &AttributeIdentifier, float Time, const AttributeType &KeyValue, bool bShouldTransact=true)
 
virtual bool SetAttributeKey (const FAnimationAttributeIdentifier &AttributeIdentifier, float Time, const void *KeyValue, const UScriptStruct *TypeStruct, bool bShouldTransact=true)=0
 
virtual bool SetAttributeKeys (const FAnimationAttributeIdentifier &AttributeIdentifier, TArrayView< const float > Times, TArrayView< const void * > KeyValues, const UScriptStruct *TypeStruct, bool bShouldTransact=true)=0
 
template<typename AttributeType >
bool SetTypedAttributeKeys (const FAnimationAttributeIdentifier &AttributeIdentifier, TArrayView< const float > Times, TArrayView< const AttributeType > KeyValues, bool bShouldTransact=true)
 
virtual bool RemoveAttributeKey (const FAnimationAttributeIdentifier &AttributeIdentifier, float Time, bool bShouldTransact=true)=0
 
virtual bool DuplicateAttribute (const FAnimationAttributeIdentifier &AttributeIdentifier, const FAnimationAttributeIdentifier &NewAttributeIdentifier, bool bShouldTransact=true)=0
 
virtual void UpdateWithSkeleton (USkeleton *TargetSkeleton, bool bShouldTransact=true)=0
 
virtual void PopulateWithExistingModel (TScriptInterface< IAnimationDataModel > InModel)=0
 
virtual void InitializeModel ()=0
 
FFrameNumber ConvertSecondsToFrameNumber (double Seconds) const
 

Static Public Member Functions

template<typename FmtType , typename... Types>
static void ReportObjectWarningf (const UObject *ErrorObject, const FmtType &Fmt, Types... Args)
 
template<typename FmtType , typename... Types>
static void ReportObjectErrorf (const UObject *ErrorObject, const FmtType &Fmt, Types... Args)
 
template<typename FmtType , typename... Types>
static void Reportf (ELogVerbosity::Type LogVerbosity, const UObject *ErrorObject, const FmtType &Fmt, Types... Args)
 
static ENGINE_API void ReportMessage (const UObject *ErrorObject, const FText &InMessage, ELogVerbosity::Type LogVerbosity)
 

Protected Member Functions

virtual void NotifyBracketOpen ()=0
 
virtual void NotifyBracketClosed ()=0
 
template<typename FmtType , typename... Types>
void ReportWarningf (const FmtType &Fmt, Types... Args) const
 
template<typename FmtType , typename... Types>
void ReportErrorf (const FmtType &Fmt, Types... Args) const
 
void Report (ELogVerbosity::Type Verbosity, const FText &Message) const
 
template<typename FmtType , typename... Types>
void Reportf (ELogVerbosity::Type Verbosity, const FmtType &Fmt, Types... Args) const
 
void ReportWarning (const FText &Message) const
 
void ReportError (const FText &Message) const
 
void ValidateModel () const
 
bool CheckOuterClass (UClass *InClass) const
 

Static Protected Member Functions

static bool IsSupportedCurveType (ERawCurveTrackTypes CurveType)
 
static FString GetCurveTypeValueName (ERawCurveTrackTypes InType)
 

Static Protected Attributes

static constexpr int32 DefaultCurveFlags = EAnimAssetCurveFlags::AACF_Editable
 

Friends

class FAnimDataControllerTestBase
 

Member Function Documentation

◆ AddAttribute()

virtual bool IAnimationDataController::AddAttribute ( const FAnimationAttributeIdentifier AttributeIdentifier,
bool  bShouldTransact = true 
)
pure virtual

Adds a new attribute with the provided information. Broadcasts a EAnimDataModelNotifyType::AttributeAdded notify if successful.

Parameters
AttributeIdentifierIdentifier for the to-be-added attribute
bShouldTransactWhether or not any undo-redo changes should be generated
Returns
Whether or not the attribute was successfully added

◆ AddBoneCurve()

virtual bool IAnimationDataController::AddBoneCurve ( FName  BoneName,
bool  bShouldTransact = true 
)
pure virtual

◆ AddBoneTrack()

virtual int32 IAnimationDataController::AddBoneTrack ( FName  BoneName,
bool  bShouldTransact = true 
)
inlinevirtual

Adds a new bone animation track for the provided name. Broadcasts a EAnimDataModelNotifyType::TrackAdded notify if successful.

Parameters
BoneNameBone name for which a track should be added
bShouldTransactWhether or not any undo-redo changes should be generated
Returns
The index at which the bone track was added, INDEX_NONE if adding it failed

◆ AddCurve()

virtual bool IAnimationDataController::AddCurve ( const FAnimationCurveIdentifier CurveId,
int32  CurveFlags = 0x00000004,
bool  bShouldTransact = true 
)
pure virtual

Adds a new curve with the provided information. Broadcasts a EAnimDataModelNotifyType::CurveAdded notify if successful.

Parameters
CurveIdIdentifier for the to-be-added curve
CurveFlagsFlags to be set for the curve
bShouldTransactWhether or not any undo-redo changes should be generated
Returns
Whether or not the curve was successfully added

◆ CheckOuterClass()

bool IAnimationDataController::CheckOuterClass ( UClass InClass) const
inlineprotected

Verifies whether or not the Model's outer object is (or is derived from) the specified UClass

◆ CloseBracket()

virtual void IAnimationDataController::CloseBracket ( bool  bShouldTransact = true)
pure virtual

Closes a previously opened interaction bracket, used for combining a set of controller actions. Broadcasts a EAnimDataModelNotifyType::BracketClosed notify.

Parameters
bShouldTransactWhether or not any undo-redo changes should be generated

◆ ConvertSecondsToFrameNumber()

FFrameNumber IAnimationDataController::ConvertSecondsToFrameNumber ( double  Seconds) const
inline

Returns the final frame number calculating according to the Model its frame-rate, additionally outputs log information for invalid/loss of precision

◆ DuplicateAttribute()

virtual bool IAnimationDataController::DuplicateAttribute ( const FAnimationAttributeIdentifier AttributeIdentifier,
const FAnimationAttributeIdentifier NewAttributeIdentifier,
bool  bShouldTransact = true 
)
pure virtual

Duplicated the attribute (curve) with the identifier. Broadcasts a EAnimDataModelNotifyType::AttributeAdded notify if successful.

Parameters
AttributeIdentifierIdentifier for the to-be-duplicated attribute
NewAttributeIdentifierIdentifier for the to-be-added attribute
bShouldTransactWhether or not any undo-redo changes should be generated
Returns
Whether or not the attribute was successfully duplicated

◆ DuplicateCurve()

virtual bool IAnimationDataController::DuplicateCurve ( const FAnimationCurveIdentifier CopyCurveId,
const FAnimationCurveIdentifier NewCurveId,
bool  bShouldTransact = true 
)
pure virtual

Duplicated the curve with the identifier. Broadcasts a EAnimDataModelNotifyType::CurveAdded notify if successful.

Parameters
CopyCurveIdIdentifier for the to-be-duplicated curve
NewCurveIdIdentifier for the to-be-added curve
bShouldTransactWhether or not any undo-redo changes should be generated
Returns
Whether or not the curve was successfully duplicated

◆ FindOrAddCurveNamesOnSkeleton()

virtual void IAnimationDataController::FindOrAddCurveNamesOnSkeleton ( USkeleton Skeleton,
ERawCurveTrackTypes  SupportedCurveType,
bool  bShouldTransact = true 
)
inlinevirtual

Updates the curve names with the provided skeleton, if a display name is not found it will be added thus modifying the skeleton. Broadcasts a EAnimDataModelNotifyType::CurveRenamed for each curve name for which the UID was different or if it was added as a new smart-name, wrapped within BracketOpened/BracketClosed notifies.

Parameters
SkeletonSkeleton to retrieve the display name values from
SupportedCurveTypeCurve type for which the names should be updated
bShouldTransactWhether or not any undo-redo changes should be generated

◆ GetCurveTypeValueName()

static FString IAnimationDataController::GetCurveTypeValueName ( ERawCurveTrackTypes  InType)
inlinestaticprotected

Returns the string representation of the provided curve enum type value

◆ GetModel()

virtual const IAnimationDataModel *const IAnimationDataController::GetModel ( ) const
pure virtual
Returns
The IAnimationDataModel instance this controller is currently targeting

◆ GetModelInterface()

virtual TScriptInterface< IAnimationDataModel > IAnimationDataController::GetModelInterface ( ) const
pure virtual
Returns
The IAnimationDataModel instance this controller is currently targeting

◆ InitializeModel()

virtual void IAnimationDataController::InitializeModel ( )
pure virtual

Initializes model data structures

◆ InsertBoneTrack()

virtual int32 IAnimationDataController::InsertBoneTrack ( FName  BoneName,
int32  DesiredIndex,
bool  bShouldTransact = true 
)
pure virtual

Inserts a new bone animation track for the provided name, at the provided index. Broadcasts a EAnimDataModelNotifyType::TrackAdded notify if successful. The bone name is verified with the AnimModel's outer target USkeleton to ensure the bone exists.

Parameters
BoneNameBone name for which a track should be inserted
DesiredIndexIndex at which the track should be inserted
bShouldTransactWhether or not any undo-redo changes should be generated
Returns
The index at which the bone track was inserted, INDEX_NONE if the insertion failed

◆ IsSupportedCurveType()

static bool IAnimationDataController::IsSupportedCurveType ( ERawCurveTrackTypes  CurveType)
inlinestaticprotected

Returns whether or not the supplied curve type is supported by the controller functionality

◆ NotifyBracketClosed()

virtual void IAnimationDataController::NotifyBracketClosed ( )
protectedpure virtual

◆ NotifyBracketOpen()

virtual void IAnimationDataController::NotifyBracketOpen ( )
protectedpure virtual

Functionality used by FOpenBracketAction and FCloseBracketAction to broadcast their equivalent notifies without actually opening a bracket.

◆ NotifyPopulated()

virtual void IAnimationDataController::NotifyPopulated ( )
pure virtual

◆ OpenBracket()

virtual void IAnimationDataController::OpenBracket ( const FText InTitle,
bool  bShouldTransact = true 
)
pure virtual

Opens an interaction bracket, used for combining a set of controller actions. Broadcasts a EAnimDataModelNotifyType::BracketOpened notify, this can be used by any Views or dependent systems to halt any unnecessary or invalid operations until the (last) bracket is closed.

Parameters
InTitleDescription of the bracket, e.g. "Generating Curve Data"
bShouldTransactWhether or not any undo-redo changes should be generated

◆ PopulateWithExistingModel()

virtual void IAnimationDataController::PopulateWithExistingModel ( TScriptInterface< IAnimationDataModel InModel)
pure virtual

Copies any animation relevant data from an already existing IAnimationDataModel object

◆ RemoveAllAttributes()

virtual int32 IAnimationDataController::RemoveAllAttributes ( bool  bShouldTransact = true)
pure virtual

Removes all stored attributes. Broadcasts a EAnimDataModelNotifyType::AttributeRemoved notify for each removed attribute.

Parameters
bShouldTransactWhether or not any undo-redo changes should be generated
Returns
Total number of removes attributes

◆ RemoveAllAttributesForBone()

virtual int32 IAnimationDataController::RemoveAllAttributesForBone ( const FName BoneName,
bool  bShouldTransact = true 
)
pure virtual

Removes all attributes for the specified bone name, if any. Broadcasts a EAnimDataModelNotifyType::AttributeRemoved notify for each removed attribute.

Parameters
BoneNameName of the bone to remove attributes for
bShouldTransactWhether or not any undo-redo changes should be generated
Returns
Total number of removes attributes

◆ RemoveAllBoneTracks()

virtual void IAnimationDataController::RemoveAllBoneTracks ( bool  bShouldTransact = true)
pure virtual

Removes all existing Bone Animation tracks. Broadcasts a EAnimDataModelNotifyType::TrackRemoved for each removed track, wrapped within BracketOpened/BracketClosed notifies.

Parameters
bShouldTransactWhether or not any undo-redo changes should be generated

◆ RemoveAllCurvesOfType()

virtual void IAnimationDataController::RemoveAllCurvesOfType ( ERawCurveTrackTypes  SupportedCurveType,
bool  bShouldTransact = true 
)
pure virtual

Removes all the curves of the provided type. Broadcasts a EAnimDataModelNotifyType::CurveRemoved for each removed curve, wrapped within BracketOpened/BracketClosed notifies.

Parameters
SupportedCurveTypeType for which all curves are to be removed
bShouldTransactWhether or not any undo-redo changes should be generated

◆ RemoveAttribute()

virtual bool IAnimationDataController::RemoveAttribute ( const FAnimationAttributeIdentifier AttributeIdentifier,
bool  bShouldTransact = true 
)
pure virtual

Removes an attribute, if found, with the provided information. Broadcasts a EAnimDataModelNotifyType::AttributeRemoved notify if successful.

Parameters
AttributeIdentifierIdentifier for the to-be-removed attribute
bShouldTransactWhether or not any undo-redo changes should be generated
Returns
Whether or not the attribute was successfully removed

◆ RemoveAttributeKey()

virtual bool IAnimationDataController::RemoveAttributeKey ( const FAnimationAttributeIdentifier AttributeIdentifier,
float  Time,
bool  bShouldTransact = true 
)
pure virtual

Remove a single key from the attribute with provided identifier. Broadcasts a EAnimDataModelNotifyType::AttributeChanged notify if successful.

Parameters
AttributeIdentifierIdentifier for the attribute from which the key is to be removed
TimeTime of the key to be removed
bShouldTransactWhether or not any undo-redo changes should be generated
Returns
Whether or not the attribute key was successfully removed

◆ RemoveBoneTrack()

virtual bool IAnimationDataController::RemoveBoneTrack ( FName  BoneName,
bool  bShouldTransact = true 
)
pure virtual

Removes an existing bone animation track with the provided name. Broadcasts a EAnimDataModelNotifyType::TrackRemoved notify if successful.

Parameters
BoneNameBone name of the track which should be removed
bShouldTransactWhether or not any undo-redo changes should be generated
Returns
Whether or not the removal was successful

◆ RemoveBoneTracksMissingFromSkeleton()

virtual bool IAnimationDataController::RemoveBoneTracksMissingFromSkeleton ( const USkeleton Skeleton,
bool  bShouldTransact = true 
)
pure virtual

Removes any bone track for which the name was not found in the provided skeleton. Broadcasts a EAnimDataModelNotifyType::TrackRemoved for each track which was not found in the skeleton, wrapped within BracketOpened/BracketClosed notifies.

Parameters
SkeletonSkeleton to retrieve the display name values from
bShouldTransactWhether or not any undo-redo changes should be generated

◆ RemoveCurve()

virtual bool IAnimationDataController::RemoveCurve ( const FAnimationCurveIdentifier CurveId,
bool  bShouldTransact = true 
)
pure virtual

Remove the curve with provided identifier. Broadcasts a EAnimDataModelNotifyType::CurveRemoved notify if successful.

Parameters
CurveIdIdentifier for the to-be-removed curve
bShouldTransactWhether or not any undo-redo changes should be generated
Returns
Whether or not the curve was successfully removed

◆ RemoveCurveKey()

virtual bool IAnimationDataController::RemoveCurveKey ( const FAnimationCurveIdentifier CurveId,
float  Time,
bool  bShouldTransact = true 
)
pure virtual

Remove a single key from the curve with provided identifier and name. Broadcasts a EAnimDataModelNotifyType::CurveChanged notify if successful.

Parameters
CurveIdIdentifier for the curve for which the key is to be removed
TimeTime of the key to be removed
bShouldTransactWhether or not any undo-redo changes should be generated
Returns
Whether or not the curve key was successfully removed

◆ RemoveTransformCurveKey()

virtual bool IAnimationDataController::RemoveTransformCurveKey ( const FAnimationCurveIdentifier CurveId,
float  Time,
bool  bShouldTransact = true 
)
pure virtual

Removes a single key for the transform curve with provided identifier. Broadcasts a EAnimDataModelNotifyType::CurveChanged notify if successful.

Parameters
CurveIdIdentifier for the transform curve for which the key is to be removed
TimeTime of the key to be removed
bShouldTransactWhether or not any undo-redo changes should be generated
Returns
Whether or not the transform curve key was successfully removed

◆ RenameCurve()

virtual bool IAnimationDataController::RenameCurve ( const FAnimationCurveIdentifier CurveToRenameId,
const FAnimationCurveIdentifier NewCurveId,
bool  bShouldTransact = true 
)
pure virtual

Renames the curve with provided identifier. Broadcasts a EAnimDataModelNotifyType::CurveRenamed notify if successful.

Parameters
CurveToRenameIdIdentifier for the curve to be renamed
NewCurveIdTime of the key to be removed
bShouldTransactWhether or not any undo-redo changes should be generated
Returns
Whether or not the curve was successfully renamed

◆ Report()

void IAnimationDataController::Report ( ELogVerbosity::Type  Verbosity,
const FText Message 
) const
inlineprotected

◆ ReportError()

void IAnimationDataController::ReportError ( const FText Message) const
inlineprotected

◆ ReportErrorf()

template<typename FmtType , typename... Types>
void IAnimationDataController::ReportErrorf ( const FmtType Fmt,
Types...  Args 
) const
inlineprotected

◆ Reportf() [1/2]

template<typename FmtType , typename... Types>
static void IAnimationDataController::Reportf ( ELogVerbosity::Type  LogVerbosity,
const UObject ErrorObject,
const FmtType Fmt,
Types...  Args 
)
inlinestatic

◆ Reportf() [2/2]

template<typename FmtType , typename... Types>
void IAnimationDataController::Reportf ( ELogVerbosity::Type  Verbosity,
const FmtType Fmt,
Types...  Args 
) const
inlineprotected

◆ ReportMessage()

void IAnimationDataController::ReportMessage ( const UObject ErrorObject,
const FText InMessage,
ELogVerbosity::Type  LogVerbosity 
)
static

◆ ReportObjectErrorf()

template<typename FmtType , typename... Types>
static void IAnimationDataController::ReportObjectErrorf ( const UObject ErrorObject,
const FmtType Fmt,
Types...  Args 
)
inlinestatic

◆ ReportObjectWarningf()

template<typename FmtType , typename... Types>
static void IAnimationDataController::ReportObjectWarningf ( const UObject ErrorObject,
const FmtType Fmt,
Types...  Args 
)
inlinestatic

◆ ReportWarning()

void IAnimationDataController::ReportWarning ( const FText Message) const
inlineprotected

◆ ReportWarningf()

template<typename FmtType , typename... Types>
void IAnimationDataController::ReportWarningf ( const FmtType Fmt,
Types...  Args 
) const
inlineprotected

◆ ResetModel()

virtual void IAnimationDataController::ResetModel ( bool  bShouldTransact = true)
pure virtual

Resets all data stored in the model, broadcasts a EAnimDataModelNotifyType::Reset and wraps all actions within BracketOpened/BracketClosed notifies.

Parameters
bShouldTransactWhether or not any undo-redo changes should be generated

◆ Resize()

virtual void IAnimationDataController::Resize ( float  Length,
float  T0,
float  T1,
bool  bShouldTransact = true 
)
pure virtual

◆ ResizeInFrames()

virtual void IAnimationDataController::ResizeInFrames ( FFrameNumber  NewLengthInFrames,
FFrameNumber  T0,
FFrameNumber  T1,
bool  bShouldTransact = true 
)
pure virtual

Sets the total play-able length in seconds and resizes curves. Broadcasts EAnimDataModelNotifyType::SequenceLengthChanged and EAnimDataModelNotifyType::CurveChanged notifies if successful. T0 and T1 are expected to represent the window of time that was either added or removed. E.g. for insertion T0 indicates the time at which additional time starts and T1 were it ends. For removal T0 indicates the time at which time should be started to remove, and T1 indicates the end. Giving a total of T1 - T0 added or removed length. The number of frames and keys for the provided length is recalculated according to the current value of UAnimDataModel::FrameRate.

Parameters
NewLengthInFramesTotal new play-able number of frames value (according to frame rate), has to be positive and non-zero
T0Point between 0 and NewLengthInFrames at which the change in length starts
T1Point between 0 and NewLengthInFrames at which the change in length ends
bShouldTransactWhether or not any undo-redo changes should be generated

◆ ResizeNumberOfFrames()

virtual void IAnimationDataController::ResizeNumberOfFrames ( FFrameNumber  NewLengthInFrames,
FFrameNumber  T0,
FFrameNumber  T1,
bool  bShouldTransact = true 
)
pure virtual

◆ ResizePlayLength()

virtual void IAnimationDataController::ResizePlayLength ( float  NewLength,
float  T0,
float  T1,
bool  bShouldTransact = true 
)
pure virtual

◆ ScaleCurve()

virtual bool IAnimationDataController::ScaleCurve ( const FAnimationCurveIdentifier CurveId,
float  Origin,
float  Factor,
bool  bShouldTransact = true 
)
pure virtual

Scales the curve with provided identifier. Broadcasts a EAnimDataModelNotifyType::CurveScaled notify if successful.

Parameters
CurveIdIdentifier of the curve to scale
OriginTime to use as the origin when scaling the curve
FactorFactor with which the curve is supposed to be scaled
bShouldTransactWhether or not any undo-redo changes should be generated
Returns
Whether or not scaling the curve was successful

◆ SetAttributeKey()

virtual bool IAnimationDataController::SetAttributeKey ( const FAnimationAttributeIdentifier AttributeIdentifier,
float  Time,
const void KeyValue,
const UScriptStruct TypeStruct,
bool  bShouldTransact = true 
)
pure virtual

Sets a single key for the attribute with provided identifier. Broadcasts a EAnimDataModelNotifyType::AttributeChanged notify if successful. In case a key for the provided key time already exists the key is replaced.

Parameters
AttributeIdentifierIdentifier for the attribute for which the key is to be set
TimeTime of the to-be-set key
KeyValueValue of the to-be-set key
TypeStructUScriptStruct describing the type of KeyValue
bShouldTransactWhether or not any undo-redo changes should be generated
Returns
Whether or not the key was successfully set

◆ SetAttributeKeys()

virtual bool IAnimationDataController::SetAttributeKeys ( const FAnimationAttributeIdentifier AttributeIdentifier,
TArrayView< const float Times,
TArrayView< const void * >  KeyValues,
const UScriptStruct TypeStruct,
bool  bShouldTransact = true 
)
pure virtual

Replace the keys for the attribute with provided identifier. Broadcasts a EAnimDataModelNotifyType::AttributeChanged notify if successful.

Parameters
AttributeIdentifierIdentifier for the attribute for which the keys are to be replaced
TimesTimes with which the existing key timings are to be replaced
KeyValuesValues with which the existing key values are to be replaced
TypeStructUScriptStruct describing the type of KeyValues
bShouldTransactWhether or not any undo-redo changes should be generated
Returns
Whether or not replacing the attribute keys was successful

◆ SetBoneTrackKeys() [1/2]

virtual bool IAnimationDataController::SetBoneTrackKeys ( FName  BoneName,
const TArray< FVector > &  PositionalKeys,
const TArray< FQuat > &  RotationalKeys,
const TArray< FVector > &  ScalingKeys,
bool  bShouldTransact = true 
)
pure virtual

Removes an existing bone animation track with the provided name. Broadcasts a EAnimDataModelNotifyType::TrackChanged notify if successful. The provided number of keys provided is expected to match for each component, and be non-zero.

Parameters
BoneNameBone name of the track for which the keys should be set
PositionalKeysArray of keys for the translation component
RotationalKeysArray of keys for the rotation component
ScalingKeysArray of keys for the scale component
bShouldTransactWhether or not any undo-redo changes should be generated
Returns
Whether or not the keys were successfully set

◆ SetBoneTrackKeys() [2/2]

virtual bool IAnimationDataController::SetBoneTrackKeys ( FName  BoneName,
const TArray< FVector3f > &  PositionalKeys,
const TArray< FQuat4f > &  RotationalKeys,
const TArray< FVector3f > &  ScalingKeys,
bool  bShouldTransact = true 
)
pure virtual

Removes an existing bone animation track with the provided name. Broadcasts a EAnimDataModelNotifyType::TrackChanged notify if successful. The provided number of keys provided is expected to match for each component, and be non-zero.

Parameters
BoneNameBone name of the track for which the keys should be set
PositionalKeysArray of keys for the translation component
RotationalKeysArray of keys for the rotation component
ScalingKeysArray of keys for the scale component
bShouldTransactWhether or not any undo-redo changes should be generated
Returns
Whether or not the keys were successfully set

◆ SetCurveAttributes()

virtual bool IAnimationDataController::SetCurveAttributes ( const FAnimationCurveIdentifier CurveId,
const FCurveAttributes Attributes,
bool  bShouldTransact = true 
)
pure virtual

Changes the attributes of the curve with provided identifier. Broadcasts a EAnimDataModelNotifyType::CurveChanged notify if successful.

Parameters
CurveIdIdentifier of the curve to change the color for
AttributesAttribute values to be applied
bShouldTransactWhether or not any undo-redo changes should be generated
Returns
Whether or not the curve attributes were set successfully

◆ SetCurveColor()

virtual bool IAnimationDataController::SetCurveColor ( const FAnimationCurveIdentifier CurveId,
FLinearColor  Color,
bool  bShouldTransact = true 
)
pure virtual

Changes the color of the curve with provided identifier. Broadcasts a EAnimDataModelNotifyType::CurveColorChanged notify if successful. Currently changing curve colors is only supported for float curves.

Parameters
CurveIdIdentifier of the curve to change the color for
ColorColor to which the curve is to be set
bShouldTransactWhether or not any undo-redo changes should be generated
Returns
Whether or not the curve color was successfully changed

◆ SetCurveComment()

virtual bool IAnimationDataController::SetCurveComment ( const FAnimationCurveIdentifier CurveId,
const FString &  Comment,
bool  bShouldTransact = true 
)
pure virtual

Changes the comment of the curve with provided identifier. Broadcasts a EAnimDataModelNotifyType::CurveCommentChanged notify if successful. Currently changing curve comments is only supported for float curves.

Parameters
CurveIdIdentifier of the curve to change the comment for
CommentComment to which the curve is to be set
bShouldTransactWhether or not any undo-redo changes should be generated
Returns
Whether or not the curve comment was successfully changed

◆ SetCurveFlag()

virtual bool IAnimationDataController::SetCurveFlag ( const FAnimationCurveIdentifier CurveId,
EAnimAssetCurveFlags  Flag,
bool  bState = true,
bool  bShouldTransact = true 
)
pure virtual

Set an individual flag for the curve with provided identifier. Broadcasts a EAnimDataModelNotifyType::CurveFlagsChanged notify if successful.

Parameters
CurveIdIdentifier for the curve for which the flag state is to be set
FlagFlag for which the state is supposed to be set
bStateState of the flag to be, true=set/false=not set
bShouldTransactWhether or not any undo-redo changes should be generated
Returns
Whether or not the flag state was successfully set

◆ SetCurveFlags()

virtual bool IAnimationDataController::SetCurveFlags ( const FAnimationCurveIdentifier CurveId,
int32  Flags,
bool  bShouldTransact = true 
)
pure virtual

Replace the flags for the curve with provided identifier. Broadcasts a EAnimDataModelNotifyType::CurveFlagsChanged notify if successful.

Parameters
CurveIdIdentifier for the curve for which the flag state is to be set
FlagsFlag mask with which the existing flags are to be replaced
bShouldTransactWhether or not any undo-redo changes should be generated
Returns
Whether or not the flag mask was successfully set

◆ SetCurveKey()

virtual bool IAnimationDataController::SetCurveKey ( const FAnimationCurveIdentifier CurveId,
const FRichCurveKey Key,
bool  bShouldTransact = true 
)
pure virtual

Sets a single key for the curve with provided identifier and name. Broadcasts a EAnimDataModelNotifyType::CurveChanged notify if successful. In case a key for the provided key time already exists the key is replaced.

Parameters
CurveIdIdentifier for the curve for which the key is to be set
KeyKey to be set
bShouldTransactWhether or not any undo-redo changes should be generated
Returns
Whether or not the curve key was successfully set

◆ SetCurveKeys()

virtual bool IAnimationDataController::SetCurveKeys ( const FAnimationCurveIdentifier CurveId,
const TArray< FRichCurveKey > &  CurveKeys,
bool  bShouldTransact = true 
)
pure virtual

Replace the keys for the curve with provided identifier and name. Broadcasts a EAnimDataModelNotifyType::CurveChanged notify if successful.

Parameters
CurveIdIdentifier for the curve for which the keys are to be replaced
CurveKeysKeys with which the existing keys are to be replaced
bShouldTransactWhether or not any undo-redo changes should be generated
Returns
Whether or not replacing curve keys was successful

◆ SetFrameRate()

virtual void IAnimationDataController::SetFrameRate ( FFrameRate  FrameRate,
bool  bShouldTransact = true 
)
pure virtual

Sets the frame rate according to which the bone animation is expected to be sampled. Broadcasts a EAnimDataModelNotifyType::FrameRateChanged notify if successful. The number of frames and keys for the provided frame rate is recalculated according to the current value of UAnimDataModel::PlayLength.

Parameters
FrameRateThe new sampling frame rate, has to be positive and non-zero
bShouldTransactWhether or not any undo-redo changes should be generated

◆ SetModel()

virtual void IAnimationDataController::SetModel ( TScriptInterface< IAnimationDataModel InModel)
pure virtual

Sets the AnimDataModel instance this controller is supposed to be targeting

Parameters
InModelIAnimationDataModel instance to target

◆ SetNumberOfFrames()

virtual void IAnimationDataController::SetNumberOfFrames ( FFrameNumber  NewLengthInFrames,
bool  bShouldTransact = true 
)
pure virtual

Sets the total play-able length in seconds. Broadcasts a EAnimDataModelNotifyType::SequenceLengthChanged notify if successful. The number of frames and keys for the provided length is recalculated according to the current value of UAnimDataModel::FrameRate.

Parameters
NewLengthInFramesTotal new play-able number of frames value (according to frame rate), has to be positive and non-zero
bShouldTransactWhether or not any undo-redo changes should be generated

◆ SetPlayLength()

virtual void IAnimationDataController::SetPlayLength ( float  Length,
bool  bShouldTransact = true 
)
pure virtual

◆ SetTransformCurveKey()

virtual bool IAnimationDataController::SetTransformCurveKey ( const FAnimationCurveIdentifier CurveId,
float  Time,
const FTransform Value,
bool  bShouldTransact = true 
)
pure virtual

Sets a single key for the transform curve with provided identifier. Broadcasts a EAnimDataModelNotifyType::CurveChanged notify if successful. In case a key for any of the individual transform channel curves already exists the value is replaced.

Parameters
CurveIdIdentifier for the transform curve for which the key is to be set
TimeTime of the key to be set
ValueValue of the key to be set
bShouldTransactWhether or not any undo-redo changes should be generated
Returns
Whether or not the transform curve key was successfully set

◆ SetTransformCurveKeys()

virtual bool IAnimationDataController::SetTransformCurveKeys ( const FAnimationCurveIdentifier CurveId,
const TArray< FTransform > &  TransformValues,
const TArray< float > &  TimeKeys,
bool  bShouldTransact = true 
)
pure virtual

Replace the keys for the transform curve with provided identifier. Broadcasts a EAnimDataModelNotifyType::CurveChanged notify if successful.

Parameters
CurveIdIdentifier for the transform curve for which the keys are to be set
TransformValuesTransform Values with which the existing values are to be replaced
TimeKeysTime Keys with which the existing keys are to be replaced
bShouldTransactWhether or not any undo-redo changes should be generated
Returns
Whether or not the transform curve keys were successfully set

◆ SetTypedAttributeKey()

template<typename AttributeType >
bool IAnimationDataController::SetTypedAttributeKey ( const FAnimationAttributeIdentifier AttributeIdentifier,
float  Time,
const AttributeType &  KeyValue,
bool  bShouldTransact = true 
)
inline

Sets a single key for the attribute with provided identifier. Broadcasts a EAnimDataModelNotifyType::AttributeChanged notify if successful. In case a key for the provided key time already exists the key is replaced.

Parameters
AttributeIdentifierIdentifier for the attribute for which the key is to be set
TimeTime of the to-be-set key
KeyValueValue (templated) of the to-be-set key
bShouldTransactWhether or not any undo-redo changes should be generated
Returns
Whether or not the key was successfully set

◆ SetTypedAttributeKeys()

template<typename AttributeType >
bool IAnimationDataController::SetTypedAttributeKeys ( const FAnimationAttributeIdentifier AttributeIdentifier,
TArrayView< const float Times,
TArrayView< const AttributeType >  KeyValues,
bool  bShouldTransact = true 
)
inline

Replace the keys for the attribute with provided identifier. Broadcasts a EAnimDataModelNotifyType::AttributeChanged notify if successful.

Parameters
AttributeIdentifierIdentifier for the attribute for which the keys are to be replaced
TimesTimes with which the existing key timings are to be replaced
KeyValuesValues (templated) with which the existing key values are to be replaced
bShouldTransactWhether or not any undo-redo changes should be generated
Returns
Whether or not replacing the attribute keys was successful

◆ UpdateAttributesFromSkeleton()

virtual void IAnimationDataController::UpdateAttributesFromSkeleton ( const USkeleton Skeleton,
bool  bShouldTransact = true 
)
pure virtual

Removes any bone attribute for which the name was not found in the provided skeleton. Broadcasts a EAnimDataModelNotifyType::AttributeRemoved for each attribute which was not found in the skeleton, wrapped within BracketOpened/BracketClosed notifies. Updates any bone attribute for which the bone index is different in the provided skeleton. Broadcasts a EAnimDataModelNotifyType::AttributeAdded and EAnimDataModelNotifyType::AttributeRemove for each attribute which was remapped

Parameters
SkeletonSkeleton to retrieve the bone information from
bShouldTransactWhether or not any undo-redo changes should be generated

◆ UpdateBoneTrackKeys() [1/2]

virtual bool IAnimationDataController::UpdateBoneTrackKeys ( FName  BoneName,
const FInt32Range KeyRangeToSet,
const TArray< FVector > &  PositionalKeys,
const TArray< FQuat > &  RotationalKeys,
const TArray< FVector > &  ScalingKeys,
bool  bShouldTransact = true 
)
pure virtual

Sets a range of keys for an existing bone animation track with the provided name. Broadcasts a EAnimDataModelNotifyType::TrackChanged notify if successful. The provided number of keys provided is expected to match for each component, be between FrameLowerBound and FrameUpperBound (inclusive), and be non-zero.

Parameters
BoneNameBone name of the track for which the keys should be set
KeyRangeToSetRange of frames to set keys for
PositionalKeysArray of keys for the translation component
RotationalKeysArray of keys for the rotation component
ScalingKeysArray of keys for the scale component
bShouldTransactWhether or not any undo-redo changes should be generated
Returns
Whether or not the keys were successfully set

◆ UpdateBoneTrackKeys() [2/2]

virtual bool IAnimationDataController::UpdateBoneTrackKeys ( FName  BoneName,
const FInt32Range KeyRangeToSet,
const TArray< FVector3f > &  PositionalKeys,
const TArray< FQuat4f > &  RotationalKeys,
const TArray< FVector3f > &  ScalingKeys,
bool  bShouldTransact = true 
)
pure virtual

Sets a range of keys for an existing bone animation track with the provided name. Broadcasts a EAnimDataModelNotifyType::TrackChanged notify if successful. The provided number of keys provided is expected to match for each component, be between FrameLowerBound and FrameUpperBound (inclusive), and be non-zero.

Parameters
BoneNameBone name of the track for which the keys should be set
KeyRangeToSetRange of frames to set keys for
PositionalKeysArray of keys for the translation component
RotationalKeysArray of keys for the rotation component
ScalingKeysArray of keys for the scale component
bShouldTransactWhether or not any undo-redo changes should be generated
Returns
Whether or not the keys were successfully set

◆ UpdateCurveNamesFromSkeleton()

virtual void IAnimationDataController::UpdateCurveNamesFromSkeleton ( const USkeleton Skeleton,
ERawCurveTrackTypes  SupportedCurveType,
bool  bShouldTransact = true 
)
inlinevirtual

Updates the display name values for any stored curve, with the names being retrieved from the provided skeleton. Broadcasts a EAnimDataModelNotifyType::CurveRenamed for each to-be-updated curve name, wrapped within BracketOpened/BracketClosed notifies.

Parameters
SkeletonSkeleton to retrieve the display name values from
SupportedCurveTypeCurve type for which the names should be updated
bShouldTransactWhether or not any undo-redo changes should be generated

◆ UpdateWithSkeleton()

virtual void IAnimationDataController::UpdateWithSkeleton ( USkeleton TargetSkeleton,
bool  bShouldTransact = true 
)
pure virtual

Updates/removes/remaps contained animation data according to the newly assigned skeleton

Parameters
TargetSkeletonSkeleton to which the contained animation data is to be mapped
bShouldTransactWhether or not any undo-redo changes should be generated

◆ ValidateModel()

void IAnimationDataController::ValidateModel ( ) const
inlineprotected

Ensures that a valid model is currently targeted

Friends And Related Symbol Documentation

◆ FAnimDataControllerTestBase

friend class FAnimDataControllerTestBase
friend

Member Data Documentation

◆ DefaultCurveFlags

constexpr int32 IAnimationDataController::DefaultCurveFlags = EAnimAssetCurveFlags::AACF_Editable
staticconstexprprotected

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