diff options
author | Campbell Barton <ideasman42@gmail.com> | 2019-01-31 03:34:57 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2019-01-31 04:07:13 +0300 |
commit | 51bba03b319319d59f739673c3fafb71bc308e0d (patch) | |
tree | 239eaf352608f35d924061002d4fcb8adb4f3749 /source/blender/blenkernel/BKE_undo_system.h | |
parent | d16e4d077dfe4ac887b51075784170911d3adca5 (diff) |
Undo System: add Main argument to encode/decode
Needed since we don't always have the context,
and avoids adding G_MAIN into undo callbacks.
Diffstat (limited to 'source/blender/blenkernel/BKE_undo_system.h')
-rw-r--r-- | source/blender/blenkernel/BKE_undo_system.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/source/blender/blenkernel/BKE_undo_system.h b/source/blender/blenkernel/BKE_undo_system.h index 2863642a3e0..33eefcf6085 100644 --- a/source/blender/blenkernel/BKE_undo_system.h +++ b/source/blender/blenkernel/BKE_undo_system.h @@ -29,6 +29,7 @@ struct UndoStep; struct bContext; /* ID's */ +struct Main; struct Mesh; struct Object; struct Scene; @@ -115,8 +116,8 @@ typedef struct UndoType { */ void (*step_encode_init)(struct bContext *C, UndoStep *us); - bool (*step_encode)(struct bContext *C, UndoStep *us); - void (*step_decode)(struct bContext *C, UndoStep *us, int dir); + bool (*step_encode)(struct bContext *C, struct Main *bmain, UndoStep *us); + void (*step_decode)(struct bContext *C, struct Main *bmain, UndoStep *us, int dir); /** * \note When freeing all steps, |