From 8d2576fd295fc67e2b70c282117928173ec1af8a Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Fri, 30 Oct 2020 20:24:13 +1100 Subject: Undo System: support for grouping steps with begin/end calls This adds support for treating multiple undo steps as a single step from the user perspective. This is needed for outliner mode switching and `object.switch_object` operator which change active object and mode in a single action. --- source/blender/editors/include/ED_undo.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'source/blender/editors/include') diff --git a/source/blender/editors/include/ED_undo.h b/source/blender/editors/include/ED_undo.h index dbd374415b0..989854872f3 100644 --- a/source/blender/editors/include/ED_undo.h +++ b/source/blender/editors/include/ED_undo.h @@ -36,6 +36,9 @@ struct wmOperator; struct wmOperatorType; /* undo.c */ +bool ED_undo_is_state_valid(struct bContext *C); +void ED_undo_group_begin(struct bContext *C); +void ED_undo_group_end(struct bContext *C); void ED_undo_push(struct bContext *C, const char *str); void ED_undo_push_op(struct bContext *C, struct wmOperator *op); void ED_undo_grouped_push(struct bContext *C, const char *str); -- cgit v1.2.3