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/editors/include
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/editors/include')
-rw-r--r--source/blender/editors/include/ED_gpencil.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/source/blender/editors/include/ED_gpencil.h b/source/blender/editors/include/ED_gpencil.h
index acaa6495ba9..0136d599e8a 100644
--- a/source/blender/editors/include/ED_gpencil.h
+++ b/source/blender/editors/include/ED_gpencil.h
@@ -62,6 +62,8 @@ struct bAnimContext;
struct wmKeyConfig;
struct wmOperator;
+enum eUndoStepDir;
+
#define GPENCIL_MINIMUM_JOIN_DIST 20.0f
/* Reproject stroke modes. */
@@ -213,7 +215,7 @@ bool ED_gpencil_anim_copybuf_paste(struct bAnimContext *ac, const short copy_mod
/* ------------ Grease-Pencil Undo System ------------------ */
int ED_gpencil_session_active(void);
-int ED_undo_gpencil_step(struct bContext *C, const int step);
+int ED_undo_gpencil_step(struct bContext *C, const enum eUndoStepDir step);
/* ------------ Grease-Pencil Armature ------------------ */
bool ED_gpencil_add_armature(const struct bContext *C,