UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
MovieScenePreAnimatedStateStorage.h
Go to the documentation of this file.
1// Copyright Epic Games, Inc. All Rights Reserved.
2
3#pragma once
4
5#include "Containers/Map.h"
8#include "CoreTypes.h"
25#include "Templates/Casts.h"
29#include "UObject/ObjectKey.h"
30
32class UObject;
33
34namespace UE
35{
36namespace MovieScene
37{
38
39struct FPreAnimatedObjectGroupManager;
40struct FRestoreStateParams;
41struct FRootInstanceHandle;
42
51
57template<typename... InputTypes>
69
94{
95 enum
96 {
100 };
101};
102
141template<typename StorageTraits>
143{
145 using KeyType = typename StorageTraits::KeyType;
147 using StorageType = typename StorageTraits::StorageType;
148
151 {
152 virtual ~IRestoreMask(){}
153
154 virtual bool CanRestore(const KeyType& InKey) const = 0;
155 };
156
159
163
167
168public:
169
172 {
175
176 if constexpr (StorageTraits::NeedsInitialize)
177 {
178 this->Traits.Initialize(InStorageID, InParentExtension);
179 }
180 }
181
184 {
185 return StorageID;
186 }
187
202 {
203 if (RestoreMask)
204 {
205 if (!RestoreMask->CanRestore(PreAnimatedStorage[StorageIndex].Key))
206 {
208 }
209 }
210
212 {
213 // Restoring global state
215 {
216 FCachedData CachedData = MoveTemp(PreAnimatedStorage[StorageIndex]);
217
218 KeyToStorageIndex.Remove(CachedData.Key);
219 PreAnimatedStorage.RemoveAt(StorageIndex, 1);
220 TransientPreAnimatedStorage.Remove(StorageIndex);
221
222 if (CachedData.bInitialized)
223 {
224 Traits.RestorePreAnimatedValue(CachedData.Key, CachedData.Value, Params);
225 }
227 }
228 else
229 {
231
232 FCachedData& CachedData = PreAnimatedStorage[StorageIndex];
233 if (CachedData.bInitialized)
234 {
235 Traits.RestorePreAnimatedValue(CachedData.Key, CachedData.Value, Params);
236 }
237
239 }
240 }
241
243
244 // Always restore from the transient storage if available
245 if (StorageType* CachedData = TransientPreAnimatedStorage.Find(StorageIndex))
246 {
247 Traits.RestorePreAnimatedValue(PreAnimatedStorage[StorageIndex].Key, *CachedData, Params);
248
249 TransientPreAnimatedStorage.Remove(StorageIndex);
250
252 }
253
255 {
257 if (ActualValue.bPersistent)
258 {
259 if (ActualValue.bInitialized)
260 {
261 Traits.RestorePreAnimatedValue(ActualValue.Key, ActualValue.Value, Params);
262 }
264 }
265
266 FCachedData Tmp = MoveTemp(PreAnimatedStorage[StorageIndex]);
267
268 KeyToStorageIndex.Remove(Tmp.Key);
269 PreAnimatedStorage.RemoveAt(StorageIndex, 1);
270 TransientPreAnimatedStorage.Remove(StorageIndex);
271
272 if (Tmp.bInitialized)
273 {
274 Traits.RestorePreAnimatedValue(Tmp.Key, Tmp.Value, Params);
275 }
276
278 }
279
281 {
282 // Restore the value but keep the value cached
284
285 if (PersistentData.bInitialized)
286 {
288 Traits.RestorePreAnimatedValue(PersistentData.Key, PersistentData.Value, Params);
289 }
290 }
291
293 }
294
304 {
305 if (RestoreMask)
306 {
307 if (!RestoreMask->CanRestore(PreAnimatedStorage[StorageIndex].Key))
308 {
310 }
311 }
312
314 {
315 KeyType Key = PreAnimatedStorage[StorageIndex].Key;
316
317 KeyToStorageIndex.Remove(Key);
318 PreAnimatedStorage.RemoveAt(StorageIndex, 1);
319 TransientPreAnimatedStorage.Remove(StorageIndex);
320
322 }
323 else
324 {
326 const int32 NumTransients = TransientPreAnimatedStorage.Remove(StorageIndex);
327 if (NumTransients == 0)
328 {
329 PreAnimatedStorage[StorageIndex].bPersistent = true;
330 }
332 }
333 }
334
342
347 {
349 {
350 for (auto It = KeyToStorageIndex.CreateIterator(); It; ++It)
351 {
353 }
354 }
355
357 {
358 for (FCachedData& CachedData : PreAnimatedStorage)
359 {
362 }
363 }
365 {
366 for (auto It = TransientPreAnimatedStorage.CreateIterator(); It; ++It)
367 {
369 }
370 }
371 }
372
387
392 {
393 return KeyToStorageIndex.FindRef(InKey);
394 }
395
404 {
405 check(StorageIndex);
406
407 FCachedData& CachedData = PreAnimatedStorage[StorageIndex.Value];
408
410 {
411 ensure(!CachedData.bInitialized);
412 CachedData.Value = MoveTemp(InNewValue);
413 CachedData.bPersistent = true;
414 CachedData.bInitialized = true;
415 }
417 {
418 ensure(!CachedData.bInitialized || !TransientPreAnimatedStorage.Contains(StorageIndex));
419
420 // Assign the transient value
421 if (!CachedData.bInitialized)
422 {
423 CachedData.Value = MoveTemp(InNewValue);
424 CachedData.bInitialized = true;
425 }
426 else
427 {
429 }
430 }
431 }
432
437 {
438 check(StorageIndex);
439
440 const FCachedData& CachedData = PreAnimatedStorage[StorageIndex.Value];
441
443 {
444 return CachedData.bInitialized;
445 }
447 {
448 return (CachedData.bInitialized && CachedData.bPersistent == false)
449 || TransientPreAnimatedStorage.Contains(StorageIndex);
450 }
451
452 return true;
453 }
454
462 template<typename... KeyArgs>
464 {
466
468 if constexpr (StorageTraits::SupportsGrouping)
469 {
470 GroupHandle = this->Traits.FindGroup(this->Traits.ResolveComponent(InKeyArgs)...);
471 }
472
473 FPreAnimatedStorageIndex StorageIndex = this->FindStorageIndex(Key);
474
475 return FPreAnimatedStateEntry{ GroupHandle, FPreAnimatedStateCachedValueHandle{ this->StorageID, StorageIndex } };
476 }
477
483 template<typename... KeyArgs>
485 {
487
489 if constexpr(StorageTraits::SupportsGrouping)
490 {
491 GroupHandle = this->Traits.MakeGroup(this->Traits.ResolveComponent(InKeyArgs)...);
492 }
493
494 FPreAnimatedStorageIndex StorageIndex = this->GetOrCreateStorageIndex(Key);
495
496 return FPreAnimatedStateEntry{ GroupHandle, FPreAnimatedStateCachedValueHandle{ this->StorageID, StorageIndex } };
497 }
498
500 {
502 }
503
511 {
512 check(StorageIndex);
513 PreAnimatedStorage[StorageIndex.Value].bPersistent = true;
514 }
515
522 {
523 return StorageIndex && (PreAnimatedStorage[StorageIndex.Value].bInitialized || TransientPreAnimatedStorage.Contains(StorageIndex));
524 }
525
530 {
531 return StorageIndex && PreAnimatedStorage[StorageIndex.Value].bInitialized;
532 }
533
537 const KeyType& GetKey(FPreAnimatedStorageIndex StorageIndex) const
538 {
539 return PreAnimatedStorage[StorageIndex].Key;
540 }
541
545 void ReplaceKey(FPreAnimatedStorageIndex StorageIndex, const KeyType& NewKey)
546 {
547 KeyType OldKey = PreAnimatedStorage[StorageIndex].Key;
548 PreAnimatedStorage[StorageIndex].Key = NewKey;
549
551 KeyToStorageIndex.Add(NewKey, StorageIndex);
552 }
553
558 {
559 static const StorageType DefaultValue = StorageType();
560
561 if (ensure(PreAnimatedStorage.IsValidIndex(StorageIndex.Value)))
562 {
563 const FCachedData& CachedData = PreAnimatedStorage[StorageIndex.Value];
564 if (CachedData.bInitialized)
565 {
566 return CachedData.Value;
567 }
568 }
569 return DefaultValue;
570 }
571
577 template<typename... ContributorTypes>
582
588 template<typename TaskType, typename... ContributorTypes>
590 {
592 {
593 FPreAnimatedTrackerParams Params(Item);
594
595 const int32 Num = Params.Num;
596 const bool bWantsRestore = Params.bWantsRestoreState;
597
598 if (!this->ParentExtension->IsCapturingGlobalState() && !bWantsRestore)
599 {
600 return;
601 }
602
604 for (int32 Index = 0; Index < Num; ++Index)
605 {
606 FPreAnimatedStateEntry Entry = MakeEntry(Inputs[Index]...);
607 EntityMetaData->BeginTrackingEntity(Entry, EntityIDs[Index], RootInstanceHandles[Index], bWantsRestore);
608 }
609 };
610
612
613 FComponentMask ExcludeMask({ BuiltInComponents->Tags.NeedsUnlink, BuiltInComponents->Tags.Finished, BuiltInComponents->Tags.Ignored });
614
616 .ReadEntityIDs()
617 .Read(BuiltInComponents->RootInstanceHandle)
618 .ReadAllOf(InComponentTypes...)
620 .CombineFilter(InParams.AdditionalFilter)
621 .Iterate_PerAllocation(&Linker->EntityManager, VisitAllocation);
622 }
623
629 template<typename... ContributorTypes>
630 void BeginTrackingEntity(FMovieSceneEntityID EntityID, const bool bWantsRestoreState, FRootInstanceHandle RootInstanceHandle, ContributorTypes... InComponents)
631 {
632 if (!this->ParentExtension->IsCapturingGlobalState() && !bWantsRestoreState)
633 {
634 return;
635 }
636
638
641 EntityMetaData->BeginTrackingEntity(Entry, EntityID, RootInstanceHandle, bWantsRestoreState);
642 }
643
647 template<typename... ContributorTypes>
652
656 template<typename TaskType, typename... ContributorTypes>
658 {
659 auto VisitAllocation = [this, &InParams](FEntityAllocationIteratorItem Item, TRead<ContributorTypes>... Values)
660 {
661 const int32 Num = Item.GetAllocation()->Num();
662 for (int32 Index = 0; Index < Num; ++Index)
663 {
664 if (!ShouldTrackCaptureSource(InParams.TrackingMode, Values[Index]...))
665 {
666 continue;
667 }
668
669 FPreAnimatedStateEntry Entry = MakeEntry(Values[Index]...);
670 TrackCaptureSource(Entry, InParams.TrackingMode);
671
674 {
675 StorageType NewValue = this->Traits.CachePreAnimatedValue(this->Traits.ResolveComponent(Values[Index])...);
677 }
678 }
679 };
680
682 .ReadAllOf(InComponentTypes...)
683 .CombineFilter(InParams.AdditionalFilter)
684 .Iterate_PerAllocation(&Linker->EntityManager, VisitAllocation);
685 }
686
691 template<typename... ContributorTypes>
696
701 template<typename... ContributorTypes>
703 {
704 if (ShouldTrackCaptureSource(TrackingMode, Values...))
705 {
706 FPreAnimatedStateEntry Entry = MakeEntry(Values...);
707
708 TrackCaptureSource(Entry, TrackingMode);
709
712 {
713 StorageType NewValue = this->Traits.CachePreAnimatedValue(this->Traits.ResolveComponent(Values)...);
715 }
716 }
717 }
718
723 template<typename OnCacheValue /* StorageType(const KeyType&) */>
725 {
726 static_assert(StorageTraits::SupportsGrouping == false, "Grouped pre-animated state requires passing a group handle");
728 }
729
734 template<typename OnCacheValue /* StorageType(const KeyType&) */>
736 {
737 ensureMsgf(GroupHandle.IsValid() || !StorageTraits::SupportsGrouping, TEXT("The group handle must be valid for pre-animated state that supports grouping, and invalid if not"));
738
739 if (!ShouldTrackCaptureSource(TrackingMode, InKey))
740 {
741 return;
742 }
743 // Find the storage index for the specific key we're animating
745 FPreAnimatedStateEntry Entry{ GroupHandle, FPreAnimatedStateCachedValueHandle{ this->StorageID, StorageIndex } };
746 TrackCaptureSource(Entry, TrackingMode);
747
749 if (!IsStorageRequirementSatisfied(Entry.ValueHandle.StorageIndex, StorageRequirement))
750 {
751 StorageType NewValue = CacheCallback(InKey);
752 AssignPreAnimatedValue(StorageIndex, StorageRequirement, MoveTemp(NewValue));
753 }
754 }
755
759 template<typename... ContributorTypes>
764
768 template<typename TaskType, typename... ContributorTypes>
770 {
772 {
773 FPreAnimatedTrackerParams Params(Item);
774
775 const int32 Num = Params.Num;
776 const bool bWantsRestore = Params.bWantsRestoreState;
777
778 if (!this->ParentExtension->IsCapturingGlobalState() && !bWantsRestore)
779 {
780 return;
781 }
782
784 for (int32 Index = 0; Index < Num; ++Index)
785 {
786 FPreAnimatedStateEntry Entry = MakeEntry(Inputs[Index]...);
787
788 EntityMetaData->BeginTrackingEntity(Entry, EntityIDs[Index], RootInstanceHandles[Index], bWantsRestore);
789
792 {
793 StorageType NewValue = this->Traits.CachePreAnimatedValue(this->Traits.ResolveComponent(Inputs[Index])...);
795 }
796 }
797 };
798
800
802 .ReadEntityIDs()
803 .Read(BuiltInComponents->RootInstanceHandle)
804 .ReadAllOf(InComponentTypes...)
805 .CombineFilter(InParams.AdditionalFilter)
806 .Iterate_PerAllocation(&Linker->EntityManager, VisitAllocation);
807 }
808
810 {
811 KeyType ExistingKey = this->GetKey(StorageIndex);
812 if constexpr(StorageTraits::SupportsReplaceObject)
813 {
814 this->Traits.ReplaceObject(ExistingKey, NewObject);
815 }
816 this->ReplaceKey(StorageIndex, ExistingKey);
817 }
818
819protected:
820
821 template<typename... KeyArgs>
823 {
824 switch (TrackingMode)
825 {
827 {
828 // If we're capturing global state we always track changes
830 {
831 return true;
832 }
833
834 // Only cache the value if an entry already exists, and if metadata already exists.
835 // (ie, something is actively animating this and wants restore state)
837 {
838 return ensureMsgf(this->ParentExtension->MetaDataExists(Entry), TEXT("PreAnimatedStateEntry has allocated storage but no metadata exists to track it."));
839 }
840 return false;
841 }
842 break;
843
845 {
846 // Always cache the source meta data. If there is no capture source this calls EnsureMetaData as above
847 return true;
848 }
849 break;
850
851 default:
852 ensureMsgf(false, TEXT("Unsupported tracking mode, no pre-animated state caching will occur!"));
853 return false;
854 }
855 }
856
862 {
863 switch (TrackingMode)
864 {
866 {
867 // If we're capturing global state we always track changes
869 {
870 this->ParentExtension->EnsureMetaData(Entry);
871 return;
872 }
873
874 // Only cache the value if tracking meta-data exists for this entry
875 // (ie, something is actively animating this and wants restore state)
876 ensureMsgf(Entry.IsValid() && this->ParentExtension->MetaDataExists(Entry), TEXT("PreAnimatedStateEntry has allocated storage but no metadata exists to track it."));
877 }
878 break;
879
881 {
882 // Always cache the source meta data. If there is no capture source this calls EnsureMetaData as above
884 return;
885 }
886 break;
887
888 default:
889 ensureMsgf(false, TEXT("Unsupported tracking mode, no pre-animated state caching will occur!"));
890 }
891 }
892
918
921
925
934
937
939 const IRestoreMask* RestoreMask = nullptr;
940
943
944public:
945
947 StorageTraits Traits;
948};
949
950
956template<typename InKeyType, typename InStorageType>
958{
961
962 void RestorePreAnimatedValue(const KeyType& Key, StorageType& SavedValue, const FRestoreStateParams& Params)
963 {
964 SavedValue.RestoreState(Key, Params);
965 }
966};
967
968
973template<typename KeyType, typename StorageType>
974struct TSimplePreAnimatedStateStorage : TPreAnimatedStateStorage<TSimplePreAnimatedStateTraits<KeyType, StorageType>>
975{
976};
977
978} // namespace MovieScene
979} // namespace UE
#define check(expr)
Definition AssertionMacros.h:314
#define ensureMsgf( InExpression, InFormat,...)
Definition AssertionMacros.h:465
#define ensure( InExpression)
Definition AssertionMacros.h:464
#define TEXT(x)
Definition Platform.h:1272
FPlatformTypes::int32 int32
A 32-bit signed integer.
Definition Platform.h:1125
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
return true
Definition ExternalRpcRegistry.cpp:601
@ Num
Definition MetalRHIPrivate.h:234
UE_INTRINSIC_CAST UE_REWRITE constexpr std::remove_reference_t< T > && MoveTemp(T &&Obj) noexcept
Definition UnrealTemplate.h:520
Definition UObjectGlobals.h:2492
Definition MovieScene.Build.cs:6
Definition UnrealString.h.inl:34
Definition SortedMap.h:20
Definition SparseArray.h:524
Definition MovieSceneEntitySystemLinker.h:113
Definition Object.h:95
Definition Linker.cpp:38
void AddReferencedObjectForComponent(FReferenceCollector *ReferenceCollector, FObjectComponent *ComponentData)
Definition BuiltInComponentTypes.cpp:250
EPreAnimatedStorageRequirement
Definition MovieScenePreAnimatedStateTypes.h:32
EPreAnimatedCaptureSourceTracking
Definition MovieScenePreAnimatedStateStorage.h:45
Definition AdvancedWidgetsModule.cpp:13
@ false
Definition radaudio_common.h:23
U16 Index
Definition radfft.cpp:71
Definition ObjectKey.h:19
Definition BuiltInComponentTypes.h:578
struct UE::MovieScene::FBuiltInComponentTypes::@1489 Tags
FComponentTypeID NeedsLink
Definition BuiltInComponentTypes.h:789
FComponentTypeID Finished
Definition BuiltInComponentTypes.h:808
FComponentTypeID Ignored
Definition BuiltInComponentTypes.h:810
TComponentTypeID< FRootInstanceHandle > RootInstanceHandle
Definition BuiltInComponentTypes.h:604
static MOVIESCENE_API FBuiltInComponentTypes * Get()
Definition BuiltInComponentTypes.cpp:667
FComponentTypeID NeedsUnlink
Definition BuiltInComponentTypes.h:790
Definition MovieSceneEntityIDs.h:40
Definition MovieSceneEntitySystemTypes.h:977
MOVIESCENE_API const FEntityAllocation * GetAllocation() const
Definition MovieSceneEntitySystemTypes.cpp:144
int32 Num() const
Definition MovieSceneEntitySystemTypes.h:813
Definition MovieSceneEntitySystemTypes.h:295
FEntityComponentFilter & All(const FComponentMask &InComponentMask)
Definition MovieSceneEntitySystemTypes.h:308
Definition MovieSceneEntitySystemTask.h:1045
Definition MovieSceneEntityIDs.h:302
Definition MovieScenePreAnimatedCaptureSources.h:115
MOVIESCENE_API void BeginTrackingEntity(const FPreAnimatedStateEntry &Entry, FMovieSceneEntityID EntityID, FRootInstanceHandle RootInstanceHandle, bool bWantsRestoreState)
Definition MovieScenePreAnimatedCaptureSources.cpp:26
Definition MovieScenePreAnimatedStateTypes.h:134
FPreAnimatedStorageIndex StorageIndex
Definition MovieScenePreAnimatedStateTypes.h:139
Definition MovieScenePreAnimatedStateTypes.h:158
FPreAnimatedStateCachedValueHandle ValueHandle
Definition MovieScenePreAnimatedStateTypes.h:162
bool IsValid() const
Definition MovieScenePreAnimatedStateTypes.h:164
Definition MovieScenePreAnimatedStateExtension.h:73
MOVIESCENE_API void AddSourceMetaData(const FPreAnimatedStateEntry &Entry)
Definition MovieScenePreAnimatedStateExtension.cpp:815
MOVIESCENE_API void EnsureMetaData(const FPreAnimatedStateEntry &Entry)
Definition MovieScenePreAnimatedStateExtension.cpp:142
bool IsCapturingGlobalState() const
Definition MovieScenePreAnimatedStateExtension.h:205
MOVIESCENE_API FPreAnimatedEntityCaptureSource * GetOrCreateEntityMetaData()
Definition MovieScenePreAnimatedStateExtension.cpp:243
MOVIESCENE_API EPreAnimatedStorageRequirement GetStorageRequirement(const FPreAnimatedStateEntry &Entry) const
Definition MovieScenePreAnimatedStateExtension.cpp:127
MOVIESCENE_API bool MetaDataExists(const FPreAnimatedStateEntry &Entry) const
Definition MovieScenePreAnimatedStateExtension.cpp:147
Definition MovieScenePreAnimatedStateStorage.h:94
@ NeedsInitialize
Definition MovieScenePreAnimatedStateStorage.h:97
@ SupportsGrouping
Definition MovieScenePreAnimatedStateStorage.h:98
@ SupportsReplaceObject
Definition MovieScenePreAnimatedStateStorage.h:99
Definition MovieScenePreAnimatedStateTypes.h:86
bool IsValid() const
Definition MovieScenePreAnimatedStateTypes.h:101
Definition MovieScenePreAnimatedStorageID.h:14
Definition MovieScenePreAnimatedStateTypes.h:42
int32 Value
Definition MovieScenePreAnimatedStateTypes.h:82
Definition MovieScenePreAnimatedStateTypes.h:19
Definition MovieSceneRestoreStateParams.h:21
Definition MovieSceneSequenceInstanceHandle.h:58
Definition IMovieScenePreAnimatedStorage.h:32
Definition MovieSceneEntityIDs.h:283
TFilteredEntityTask< T... > FilterNone(const FComponentMask &InComponentMask)
Definition MovieSceneEntitySystemTask.h:208
TFilteredEntityTask< T... > CombineFilter(const FEntityComponentFilter &InFilter)
Definition MovieSceneEntitySystemTask.h:268
Definition MovieSceneComponentTypeInfo.h:67
Definition MovieScenePreAnimatedStateStorage.h:894
bool bPersistent
Definition MovieScenePreAnimatedStateStorage.h:916
StorageType Value
Definition MovieScenePreAnimatedStateStorage.h:914
FCachedData()
Definition MovieScenePreAnimatedStateStorage.h:895
bool bInitialized
Definition MovieScenePreAnimatedStateStorage.h:915
KeyType Key
Definition MovieScenePreAnimatedStateStorage.h:913
FCachedData(const KeyType &InKey, StorageType &&InValue)
Definition MovieScenePreAnimatedStateStorage.h:906
FCachedData(const KeyType &InKey)
Definition MovieScenePreAnimatedStateStorage.h:900
Definition MovieScenePreAnimatedStateStorage.h:151
virtual ~IRestoreMask()
Definition MovieScenePreAnimatedStateStorage.h:152
virtual bool CanRestore(const KeyType &InKey) const =0
Definition MovieScenePreAnimatedStateStorage.h:143
EPreAnimatedStorageRequirement RestorePreAnimatedStateStorage(FPreAnimatedStorageIndex StorageIndex, EPreAnimatedStorageRequirement SourceRequirement, EPreAnimatedStorageRequirement TargetRequirement, const FRestoreStateParams &Params) override
Definition MovieScenePreAnimatedStateStorage.h:201
void AddReferencedObjects(FReferenceCollector &ReferenceCollector) override
Definition MovieScenePreAnimatedStateStorage.h:346
void CachePreAnimatedValuesTask(UMovieSceneEntitySystemLinker *Linker, const TaskType &InParams, TComponentTypeID< ContributorTypes >... InComponentTypes)
Definition MovieScenePreAnimatedStateStorage.h:657
FPreAnimatedStorageID GetStorageType() const override
Definition MovieScenePreAnimatedStateStorage.h:183
FPreAnimatedStateEntry MakeEntry(KeyArgs &&... InKeyArgs)
Definition MovieScenePreAnimatedStateStorage.h:484
TPreAnimatedStateStorage()
Definition MovieScenePreAnimatedStateStorage.h:157
bool IsCapturingGlobalState() const
Definition MovieScenePreAnimatedStateStorage.h:499
void BeginTrackingAndCachePreAnimatedValuesTask(UMovieSceneEntitySystemLinker *Linker, const TaskType &InParams, TComponentTypeID< ContributorTypes >... InComponentTypes)
Definition MovieScenePreAnimatedStateStorage.h:769
bool IsStorageRequirementSatisfied(FPreAnimatedStorageIndex StorageIndex, EPreAnimatedStorageRequirement StorageRequirement) const
Definition MovieScenePreAnimatedStateStorage.h:436
typename StorageTraits::KeyType KeyType
Definition MovieScenePreAnimatedStateStorage.h:145
void BeginTrackingAndCachePreAnimatedValues(UMovieSceneEntitySystemLinker *Linker, TComponentTypeID< ContributorTypes >... InComponentTypes)
Definition MovieScenePreAnimatedStateStorage.h:760
FPreAnimatedStorageID StorageID
Definition MovieScenePreAnimatedStateStorage.h:942
FPreAnimatedStateExtension * ParentExtension
Definition MovieScenePreAnimatedStateStorage.h:936
void BeginTrackingEntitiesTask(UMovieSceneEntitySystemLinker *Linker, const TaskType &InParams, TComponentTypeID< ContributorTypes >... InComponentTypes)
Definition MovieScenePreAnimatedStateStorage.h:589
typename StorageTraits::StorageType StorageType
Definition MovieScenePreAnimatedStateStorage.h:147
FPreAnimatedStateEntry FindEntry(KeyArgs &&... InKeyArgs)
Definition MovieScenePreAnimatedStateStorage.h:463
void CacheTrackedPreAnimatedValue(EPreAnimatedCaptureSourceTracking TrackingMode, ContributorTypes... Values)
Definition MovieScenePreAnimatedStateStorage.h:702
TPreAnimatedStateStorage(const TPreAnimatedStateStorage &)=delete
void AssignPreAnimatedValue(FPreAnimatedStorageIndex StorageIndex, EPreAnimatedStorageRequirement StorageRequirement, StorageType &&InNewValue)
Definition MovieScenePreAnimatedStateStorage.h:403
bool ShouldTrackCaptureSource(EPreAnimatedCaptureSourceTracking TrackingMode, KeyArgs &&... InKeyArgs)
Definition MovieScenePreAnimatedStateStorage.h:822
void TrackCaptureSource(const FPreAnimatedStateEntry &Entry, EPreAnimatedCaptureSourceTracking TrackingMode)
Definition MovieScenePreAnimatedStateStorage.h:861
TSortedMap< FPreAnimatedStorageIndex, StorageType > TransientPreAnimatedStorage
Definition MovieScenePreAnimatedStateStorage.h:933
void CachePreAnimatedValues(UMovieSceneEntitySystemLinker *Linker, TComponentTypeID< ContributorTypes >... InComponentTypes)
Definition MovieScenePreAnimatedStateStorage.h:648
const StorageType & GetCachedValue(FPreAnimatedStorageIndex StorageIndex) const
Definition MovieScenePreAnimatedStateStorage.h:557
const IRestoreMask * RestoreMask
Definition MovieScenePreAnimatedStateStorage.h:939
void BeginTrackingEntity(FMovieSceneEntityID EntityID, const bool bWantsRestoreState, FRootInstanceHandle RootInstanceHandle, ContributorTypes... InComponents)
Definition MovieScenePreAnimatedStateStorage.h:630
TSparseArray< FCachedData > PreAnimatedStorage
Definition MovieScenePreAnimatedStateStorage.h:924
StorageTraits Traits
Definition MovieScenePreAnimatedStateStorage.h:947
void ReplaceKey(FPreAnimatedStorageIndex StorageIndex, const KeyType &NewKey)
Definition MovieScenePreAnimatedStateStorage.h:545
void Initialize(FPreAnimatedStorageID InStorageID, FPreAnimatedStateExtension *InParentExtension) override
Definition MovieScenePreAnimatedStateStorage.h:171
void CachePreAnimatedValue(ContributorTypes... Values)
Definition MovieScenePreAnimatedStateStorage.h:692
const KeyType & GetKey(FPreAnimatedStorageIndex StorageIndex) const
Definition MovieScenePreAnimatedStateStorage.h:537
TPreAnimatedStateStorage(StorageTraits &&InTraits)
Definition MovieScenePreAnimatedStateStorage.h:160
bool HasEverAnimated(FPreAnimatedStorageIndex StorageIndex) const
Definition MovieScenePreAnimatedStateStorage.h:529
TPreAnimatedStateStorage & operator=(const TPreAnimatedStateStorage &)=delete
FPreAnimatedStorageIndex GetOrCreateStorageIndex(const KeyType &InKey)
Definition MovieScenePreAnimatedStateStorage.h:376
void CachePreAnimatedValue(const KeyType &InKey, OnCacheValue &&CacheCallback, EPreAnimatedCaptureSourceTracking TrackingMode=EPreAnimatedCaptureSourceTracking::CacheIfTracked)
Definition MovieScenePreAnimatedStateStorage.h:724
EPreAnimatedStorageRequirement DiscardPreAnimatedStateStorage(FPreAnimatedStorageIndex StorageIndex, EPreAnimatedStorageRequirement SourceRequirement) override
Definition MovieScenePreAnimatedStateStorage.h:303
void BeginTrackingEntities(UMovieSceneEntitySystemLinker *Linker, TComponentTypeID< ContributorTypes >... InComponentTypes)
Definition MovieScenePreAnimatedStateStorage.h:578
void SetRestoreMask(const IRestoreMask *InRestoreMask)
Definition MovieScenePreAnimatedStateStorage.h:338
FPreAnimatedStorageIndex FindStorageIndex(const KeyType &InKey) const
Definition MovieScenePreAnimatedStateStorage.h:391
TMap< KeyType, FPreAnimatedStorageIndex > KeyToStorageIndex
Definition MovieScenePreAnimatedStateStorage.h:920
void OnObjectReplaced(FPreAnimatedStorageIndex StorageIndex, const FObjectKey &OldObject, const FObjectKey &NewObject) override
Definition MovieScenePreAnimatedStateStorage.h:809
void ForciblyPersistStorage(FPreAnimatedStorageIndex StorageIndex)
Definition MovieScenePreAnimatedStateStorage.h:510
bool IsStorageInitialized(FPreAnimatedStorageIndex StorageIndex) const
Definition MovieScenePreAnimatedStateStorage.h:521
void CachePreAnimatedValue(FPreAnimatedStorageGroupHandle GroupHandle, const KeyType &InKey, OnCacheValue &&CacheCallback, EPreAnimatedCaptureSourceTracking TrackingMode=EPreAnimatedCaptureSourceTracking::CacheIfTracked)
Definition MovieScenePreAnimatedStateStorage.h:735
Definition MovieScenePreAnimatedStateStorage.h:59
EPreAnimatedCaptureSourceTracking TrackingMode
Definition MovieScenePreAnimatedStateStorage.h:61
TPreAnimatedStateTaskParams()
Definition MovieScenePreAnimatedStateStorage.h:63
FEntityComponentFilter AdditionalFilter
Definition MovieScenePreAnimatedStateStorage.h:60
Definition MovieSceneComponentPtr.h:195
Definition MovieScenePreAnimatedStateStorage.h:975
Definition MovieScenePreAnimatedStateStorage.h:958
InStorageType StorageType
Definition MovieScenePreAnimatedStateStorage.h:960
InKeyType KeyType
Definition MovieScenePreAnimatedStateStorage.h:959
void RestorePreAnimatedValue(const KeyType &Key, StorageType &SavedValue, const FRestoreStateParams &Params)
Definition MovieScenePreAnimatedStateStorage.h:962