Navigation
API > API/Plugins > API/Plugins/LevelSnapshots
Allows you to receive callbacks when an object is filtered and to display additional properties in the results view. This is used whenever a selection set is built.
By default only modified properties are shown. However, sometimes you may want to include unmodified properties, too.
Example 1: Transforms and parenting
Create cube
Rotate it to 40 degrees
Take a snapshot
Create new empty actor
Attach cube to empty actor
Rotate empty actor by 10 degrees
Apply the snapshot Result: After applying, the cube has a diff because its rotation is 50 degrees. The reason is because before applying the only thing that was different was the cube's attach parent. When the parent actor is removed, its world-space transform is retained; actors are removed first and then the properties of modified actors are saved. The solution is, using this interface, to add the cube's transform properties even though they're equal to the snapshot version. Users will see the property in the UI and can opt to not restore it.
Example 2: AMediaPlate Media plates add a transient UAssetUserData object to a component. In OnPreSaveWorld and OnPostSaveWorld the UAssetUserData would be removed and added back. Similar behaviour should occur for Level Snapshots when filtering and applying (events about applying are exposed by IRestorationListener).
Note that Level Snapshots restores TArrays either fully or not at all. For this reason, IPropertyComparer may not always be an option for you; this interface gives you more options. If you have changes that should be ignored by Level Snapshots, this interface allows you to modify the object in PreFilterObject and undo the changes in PostFilterObject.
| Name | ISnapshotFilterExtender |
| Type | class |
| Header File | /Engine/Plugins/VirtualProduction/LevelSnapshots/Source/LevelSnapshots/Public/Restorability/Interfaces/ISnapshotFilterExtender.h |
| Include Path | #include "Restorability/Interfaces/ISnapshotFilterExtender.h" |
Syntax
class ISnapshotFilterExtender
Destructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual ~ISnapshotFilterExtender() |
Restorability/Interfaces/ISnapshotFilterExtender.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual FPostApplyFiltersResult PostApplyFilters
(
const FPostApplyFiltersParams& Params |
Called after all properties have been filtered on the given object pair. | Restorability/Interfaces/ISnapshotFilterExtender.h | |
virtual void PreApplyFilters
(
const FPreApplyFiltersParams& Params |
Called before the object is filtered. | Restorability/Interfaces/ISnapshotFilterExtender.h |