Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien Montagne <bastien@blender.org>2021-02-05 00:03:39 +0300
committerBastien Montagne <bastien@blender.org>2021-02-05 00:03:39 +0300
commit94cf74afbb1329a9ff099e2ebd7f43ed8313f9ec (patch)
tree6859715425521345f93993ecdcf7182b060ac236 /source/blender/blenkernel/BKE_blender_undo.h
parent7d5640ee101e6b9ddbd9f534539ae939f68bfd9b (diff)
Cleanup/refactor: Undosys: Get rid of the magic values for undo direction.
Move `eUndoStepDir` to `BKE_undo_system.h` and use its values everywhere. Note that this also introduce the `STEP_INVALID` value in that enum. Finally, kept the matching struct members in some lower-level readfile code as an `int` to avoid having to include `BKE_undo_system.h` in a lot of unrelated files.
Diffstat (limited to 'source/blender/blenkernel/BKE_blender_undo.h')
-rw-r--r--source/blender/blenkernel/BKE_blender_undo.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/source/blender/blenkernel/BKE_blender_undo.h b/source/blender/blenkernel/BKE_blender_undo.h
index e5ce91df3fb..1febe75b6f2 100644
--- a/source/blender/blenkernel/BKE_blender_undo.h
+++ b/source/blender/blenkernel/BKE_blender_undo.h
@@ -27,12 +27,14 @@ struct Main;
struct MemFileUndoData;
struct bContext;
+enum eUndoStepDir;
+
#define BKE_UNDO_STR_MAX 64
struct MemFileUndoData *BKE_memfile_undo_encode(struct Main *bmain,
struct MemFileUndoData *mfu_prev);
bool BKE_memfile_undo_decode(struct MemFileUndoData *mfu,
- const int undo_direction,
+ const enum eUndoStepDir undo_direction,
const bool use_old_bmain_data,
struct bContext *C);
void BKE_memfile_undo_free(struct MemFileUndoData *mfu);