Navigation
API > API/Editor > API/Editor/CurveEditor
Utility that holds a snapshot of some curve data for the purposes of later comparing changes made to those curves.
This is useful for actions that take multiple frames, e.g. the user dragging keys. Start by constructing FCurvesSnapshotBuilder instance, adding the curves you want to diff later, and when the operation is done call ComputeDiff to compute the change.
Note: This class introduces some overhead by temporarily saving the curve state. If the change is a one-off (i.e. not interactive) you usually know exactly what will change, so you can consider building the change directly. It's still fine to use this class in that case as it simplifies the code: the overhead is usually acceptable.
| Name | FCurveChangeDiff |
| Type | class |
| Header File | /Engine/Source/Editor/CurveEditor/Public/Modification/Keys/CurveChangeDiff.h |
| Include Path | #include "Modification/Keys/CurveChangeDiff.h" |
Syntax
class FCurveChangeDiff
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
FCurveChangeDiff
(
FCurvesSnapshotBuilder InBuilder |
Modification/Keys/CurveChangeDiff.h | ||
FCurveChangeDiff
(
TWeakPtr< FCurveEditor > InCurveEditor, |
Modification/Keys/CurveChangeDiff.h |
Variables
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| Operations | const ECurveChangeFlags | The operations that we should diff with. | Modification/Keys/CurveChangeDiff.h | |
| Snapshot | const FCurvesSnapshot | Data that ComputeDiff diffs against. | Modification/Keys/CurveChangeDiff.h | |
| WeakCurveEditor | const TWeakPtr< FCurveEditor > | Needed to look up curves and compare state. | Modification/Keys/CurveChangeDiff.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
FGenericCurveChangeData ComputeDiff() |
Computes what has changed on the given curves. | Modification/Keys/CurveChangeDiff.h | |
const FCurvesSnapshot & GetSnapshot() |
The snapshot against which is diffed. | Modification/Keys/CurveChangeDiff.h | |
void ProcessDiffs
(
IMultiCurveChangeVisitor& InChangeBuilder |
Passes all changes to the given instance. | Modification/Keys/CurveChangeDiff.h |
See Also
- FScopedKeyChange For some profiling data.