Navigation
API > API/Runtime > API/Runtime/MovieScene
Storage container for a specific type of pre-animated state as defined by the specified traits.
Reference collection for KeyType and StorageType is automatically provided by way of an optional AddReferencedObjectForComponent override
Traits must include a type definition or using alias for its KeyType and StorageType, defining the type of key to use for associating the pre-animated value and the storage value type respectively.
Additionally, traits must define a RestorePreAnimatedValue function that will be used by the storage container to restore data back to its previous value.
An example trait that maps an object and a name identifier to a string would look like this: struct FExampleTraits { using KeyType = TTuple
static void RestorePreAnimatedValue(const KeyType& InKey, const FString& PreviousString, const FRestoreStateParams& Params) { if (UMyObjectType* Object = Cast
Furthermore, if the CachePreAnimatedValuesTask is used, traits must implement a CachePreAnimatedValue function that receives the contributor component types, and returns the cached value:
static FString CachePreAnimatedValue(UObject* InObject, const FName& StringName) { UMyObjectType* Object = CastChecked
Traits may be stateful if desired. Stateful traits must be provided to the constructor in order to be valid.
| Name | TPreAnimatedStateStorage |
| Type | struct |
| Header File | /Engine/Source/Runtime/MovieScene/Public/Evaluation/PreAnimatedState/MovieScenePreAnimatedStateStorage.h |
| Include Path | #include "Evaluation/PreAnimatedState/MovieScenePreAnimatedStateStorage.h" |
Syntax
template<typename StorageTraits>
struct TPreAnimatedStateStorage : public UE::MovieScene::IPreAnimatedStorage
Derived Classes
TPreAnimatedStateStorage derived class hierarchy
- FAnimTypePreAnimatedStateObjectStorage
- FAnimTypePreAnimatedStateRootStorage
- FPreAnimatedComponentMaterialParameterStorage
- FPreAnimatedComponentMaterialSwitcherStorage
- TPreAnimatedStateStorage_ObjectTraits
- FPreAnimatedControlRigParameterStorage
- FPreAnimatedControlRigStorage
- FPreAnimatedScalarMaterialParameterStorage
- FPreAnimatedVectorMaterialParameterStorage
- FPreAnimatedWidgetMaterialParameterStorage
- FPreAnimatedWidgetMaterialSwitcherStorage
- TPreAnimatedPropertyStorageImpl< PropertyTraits, TPropertyMetaData< MetaDataTypes... >, TIntegerSequence< int, MetaDataIndices... > >
- TSimplePreAnimatedStateStorage
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
TPreAnimatedStateStorage
(
StorageTraits&& InTraits |
Evaluation/PreAnimatedState/MovieScenePreAnimatedStateStorage.h | ||
| Evaluation/PreAnimatedState/MovieScenePreAnimatedStateStorage.h | |||
TPreAnimatedStateStorage
(
const TPreAnimatedStateStorage& |
Pre-Animated storage is not copyable | Evaluation/PreAnimatedState/MovieScenePreAnimatedStateStorage.h |
Structs
| Name | Remarks |
|---|---|
| FCachedData | |
| IRestoreMask | Interface used for restoring pre-animated state that allows an external system to control whether state should be restored or not |
Typedefs
| Name | Type | Remarks | Include Path |
|---|---|---|---|
| KeyType | typename StorageTraits::KeyType | The key type to use as a key in the map that associates pre-animated state values to owners (ie, an object and property name) | Evaluation/PreAnimatedState/MovieScenePreAnimatedStateStorage.h |
| StorageType | typename StorageTraits::StorageType | The value type this storage should store (ie, the actual property type) | Evaluation/PreAnimatedState/MovieScenePreAnimatedStateStorage.h |
Variables
Public
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| Traits | StorageTraits | Traits instance - normally not required but some traits require state | Evaluation/PreAnimatedState/MovieScenePreAnimatedStateStorage.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void AssignPreAnimatedValue
(
FPreAnimatedStorageIndex StorageIndex, |
Assign the value for a specific storage index. It is an error to re-assign an already cached value. | Evaluation/PreAnimatedState/MovieScenePreAnimatedStateStorage.h | |
void BeginTrackingAndCachePreAnimatedValues
(
UMovieSceneEntitySystemLinker* Linker, |
Look at any entity with the specified component types, and set up new associations with storage indices for those entities, whilst also caching pre-animated values at the same time. | Evaluation/PreAnimatedState/MovieScenePreAnimatedStateStorage.h | |
void BeginTrackingAndCachePreAnimatedValuesTask
(
UMovieSceneEntitySystemLinker* Linker, |
Look at any entity with the specified component types, and set up new associations with storage indices for those entities, whilst also caching pre-animated values at the same time. | Evaluation/PreAnimatedState/MovieScenePreAnimatedStateStorage.h | |
void BeginTrackingEntities
(
UMovieSceneEntitySystemLinker* Linker, |
Look at any entity with the specified component types, and set up new associations with storage indices for those entities The provided component values are put together to make up the storage key WARNING: Does not cache actual pre-animated values | Evaluation/PreAnimatedState/MovieScenePreAnimatedStateStorage.h | |
void BeginTrackingEntitiesTask
(
UMovieSceneEntitySystemLinker* Linker, |
Look at any entity with the specified component types, and set up new associations with storage indices for those entities The provided component values are put together to make up the storage key WARNING: Does not cache actual pre-animated values | Evaluation/PreAnimatedState/MovieScenePreAnimatedStateStorage.h | |
void BeginTrackingEntity
(
FMovieSceneEntityID EntityID, |
Set up a new associations with a storage index for the given entity The provided component values are put together to make up the storage key WARNING: Does not cache actual pre-animated values | Evaluation/PreAnimatedState/MovieScenePreAnimatedStateStorage.h | |
void CachePreAnimatedValue
(
FPreAnimatedStorageGroupHandle GroupHandle, |
Save pre-animated state for the specified group and key using a callback. | Evaluation/PreAnimatedState/MovieScenePreAnimatedStateStorage.h | |
void CachePreAnimatedValue
(
const KeyType& InKey, |
Save pre-animated state for the specified group and key using a callback. | Evaluation/PreAnimatedState/MovieScenePreAnimatedStateStorage.h | |
void CachePreAnimatedValue
(
ContributorTypes... Values |
Save pre-animated state for the specified values, using CacheIfTracked tracking Requires that the traits class implements CachePreAnimatedValue(ContributorTypes...) | Evaluation/PreAnimatedState/MovieScenePreAnimatedStateStorage.h | |
void CachePreAnimatedValues
(
UMovieSceneEntitySystemLinker* Linker, |
Cache pre-animated values for entities with the specified component types | Evaluation/PreAnimatedState/MovieScenePreAnimatedStateStorage.h | |
void CachePreAnimatedValuesTask
(
UMovieSceneEntitySystemLinker* Linker, |
Cache pre-animated values for entities with the specified component types | Evaluation/PreAnimatedState/MovieScenePreAnimatedStateStorage.h | |
void CacheTrackedPreAnimatedValue
(
EPreAnimatedCaptureSourceTracking TrackingMode, |
Save pre-animated state for the specified values Requires that the traits class implements CachePreAnimatedValue(ContributorTypes...) | Evaluation/PreAnimatedState/MovieScenePreAnimatedStateStorage.h | |
FPreAnimatedStateEntry FindEntry
(
KeyArgs&&... InKeyArgs |
Given a list of arguments suitable for building a storage key, builds that key, and then tries to find an existing pre-animated state entry for that key if it already exists. | Evaluation/PreAnimatedState/MovieScenePreAnimatedStateStorage.h | |
FPreAnimatedStorageIndex FindStorageIndex
(
const KeyType& InKey |
Attempt to find a storage index for the specified key | Evaluation/PreAnimatedState/MovieScenePreAnimatedStateStorage.h | |
void ForciblyPersistStorage
(
FPreAnimatedStorageIndex StorageIndex |
Cause a previously cached value to always outlive any actively animating sources. | Evaluation/PreAnimatedState/MovieScenePreAnimatedStateStorage.h | |
const StorageType & GetCachedValue
(
FPreAnimatedStorageIndex StorageIndex |
Get the cached value associated with a particular storage index | Evaluation/PreAnimatedState/MovieScenePreAnimatedStateStorage.h | |
const KeyType & GetKey
(
FPreAnimatedStorageIndex StorageIndex |
Get the key associated with a particular storage index | Evaluation/PreAnimatedState/MovieScenePreAnimatedStateStorage.h | |
FPreAnimatedStorageIndex GetOrCreateStorageIndex
(
const KeyType& InKey |
Attempt to find a storage index for the specified key, creating a new one if it doesn't exist | Evaluation/PreAnimatedState/MovieScenePreAnimatedStateStorage.h | |
bool HasEverAnimated
(
FPreAnimatedStorageIndex StorageIndex |
Check whether we have ever animated the specified storage index. | Evaluation/PreAnimatedState/MovieScenePreAnimatedStateStorage.h | |
bool IsCapturingGlobalState() |
Evaluation/PreAnimatedState/MovieScenePreAnimatedStateStorage.h | ||
bool IsStorageInitialized
(
FPreAnimatedStorageIndex StorageIndex |
Check whether a piece of cached storage has been initialized yet. | Evaluation/PreAnimatedState/MovieScenePreAnimatedStateStorage.h | |
bool IsStorageRequirementSatisfied
(
FPreAnimatedStorageIndex StorageIndex, |
Check whether the storage for a given index and requirement has already been initialized | Evaluation/PreAnimatedState/MovieScenePreAnimatedStateStorage.h | |
FPreAnimatedStateEntry MakeEntry
(
KeyArgs&&... InKeyArgs |
Creates a new pre-animated state entry from a list of arguments suitable for building the storage key. | Evaluation/PreAnimatedState/MovieScenePreAnimatedStateStorage.h | |
void ReplaceKey
(
FPreAnimatedStorageIndex StorageIndex, |
Replace the key associated with a particular storage index | Evaluation/PreAnimatedState/MovieScenePreAnimatedStateStorage.h | |
void SetRestoreMask
(
const IRestoreMask* InRestoreMask |
Called prior to restoring pre-animated state to control whether this storage should restore state or not | Evaluation/PreAnimatedState/MovieScenePreAnimatedStateStorage.h |
Overridden from IPreAnimatedStorage
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void AddReferencedObjects
(
FReferenceCollector& ReferenceCollector |
Called by the owning extension to add reference collection tracking for pre-animated state | Evaluation/PreAnimatedState/MovieScenePreAnimatedStateStorage.h | |
virtual EPreAnimatedStorageRequirement DiscardPreAnimatedStateStorage
(
FPreAnimatedStorageIndex StorageIndex, |
Discard a specified index within this storage container. | Evaluation/PreAnimatedState/MovieScenePreAnimatedStateStorage.h | |
virtual FPreAnimatedStorageID GetStorageType() |
Retrieve the ID that uniquely identifies this storage container | Evaluation/PreAnimatedState/MovieScenePreAnimatedStateStorage.h | |
virtual void Initialize
(
FPreAnimatedStorageID InStorageID, |
Called when this storage is created inside the pre-animated state extension on a UMovieSceneEntitySystemLinker | Evaluation/PreAnimatedState/MovieScenePreAnimatedStateStorage.h | |
virtual void OnObjectReplaced
(
FPreAnimatedStorageIndex StorageIndex, |
Evaluation/PreAnimatedState/MovieScenePreAnimatedStateStorage.h | ||
virtual EPreAnimatedStorageRequirement RestorePreAnimatedStateStorage
(
FPreAnimatedStorageIndex StorageIndex, |
Restore a specified index within this storage container. | Evaluation/PreAnimatedState/MovieScenePreAnimatedStateStorage.h |
Protected
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
bool ShouldTrackCaptureSource
(
EPreAnimatedCaptureSourceTracking TrackingMode, |
Evaluation/PreAnimatedState/MovieScenePreAnimatedStateStorage.h | ||
void TrackCaptureSource
(
const FPreAnimatedStateEntry& Entry, |
Begins tracking the current entry with the currently set tracking source, if necessary/desirable. | Evaluation/PreAnimatedState/MovieScenePreAnimatedStateStorage.h |
Operators
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
TPreAnimatedStateStorage & operator=
(
const TPreAnimatedStateStorage& |
Evaluation/PreAnimatedState/MovieScenePreAnimatedStateStorage.h |