diff options
author | Joseph Eagar <joeedh@gmail.com> | 2022-08-16 00:52:02 +0300 |
---|---|---|
committer | Joseph Eagar <joeedh@gmail.com> | 2022-08-16 00:52:02 +0300 |
commit | 3f9299e45d39051f341fcc2d6415defcc01eca93 (patch) | |
tree | bc831f2db7d246155bd1600e5e3492c1eedf95d4 /source/blender/editors/include | |
parent | 6b49b54bb13721b8fbe23acb6084af9280887778 (diff) |
Sculpt: Fix redo panel bugs
SCULPT_undo_push_begin no longer takes an explicit
name. Instead it takes a wmOperator pointer and uses
op->type->name for the name. This is necassary for
the redo panel to work and should fix the entire class
of bugs related to misspelled undo push names.
Cases where the calling operator is not registered
may use SCULPT_undo_push_begin_ex if desired; it
takes a name string as before.
Diffstat (limited to 'source/blender/editors/include')
-rw-r--r-- | source/blender/editors/include/ED_sculpt.h | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/source/blender/editors/include/ED_sculpt.h b/source/blender/editors/include/ED_sculpt.h index 550040d2bc6..5efeeaa29e1 100644 --- a/source/blender/editors/include/ED_sculpt.h +++ b/source/blender/editors/include/ED_sculpt.h @@ -20,6 +20,7 @@ struct rcti; struct wmMsgSubscribeKey; struct wmMsgSubscribeValue; struct wmRegionMessageSubscribeParams; +struct wmOperator; /* sculpt.c */ @@ -33,7 +34,7 @@ bool ED_sculpt_mask_box_select(struct bContext *C, /* sculpt_transform.c */ void ED_sculpt_update_modal_transform(struct bContext *C, struct Object *ob); -void ED_sculpt_init_transform(struct bContext *C, struct Object *ob); +void ED_sculpt_init_transform(struct bContext *C, struct Object *ob, const char *undo_name); void ED_sculpt_end_transform(struct bContext *C, struct Object *ob); /* sculpt_undo.c */ @@ -41,7 +42,12 @@ void ED_sculpt_end_transform(struct bContext *C, struct Object *ob); /** Export for ED_undo_sys. */ void ED_sculpt_undosys_type(struct UndoType *ut); -void ED_sculpt_undo_geometry_begin(struct Object *ob, const char *name); +/* Pushes an undo step using the operator name. This is necassary for + * redo panels to work; operators that do not support that may use + * ED_sculpt_undo_geometry_begin_ex instead if so desired. + */ +void ED_sculpt_undo_geometry_begin(struct Object *ob, const struct wmOperator *op); +void ED_sculpt_undo_geometry_begin_ex(struct Object *ob, const char *name); void ED_sculpt_undo_geometry_end(struct Object *ob); /* Face sets. */ |