diff options
author | Campbell Barton <ideasman42@gmail.com> | 2020-05-14 07:52:07 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2020-05-14 07:52:07 +0300 |
commit | 0cd9b1243cd8d06a68cce7419047fec6b18cfc09 (patch) | |
tree | 46fa0dd0906f4d6a22cf46a4289f32049d76bccd /source/blender/blenkernel/BKE_undo_system.h | |
parent | 95a47ff2269fc97d60cf83a44726d1f49027a882 (diff) |
Fix sculpt/paint missing undo-step limiting
Diffstat (limited to 'source/blender/blenkernel/BKE_undo_system.h')
-rw-r--r-- | source/blender/blenkernel/BKE_undo_system.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/source/blender/blenkernel/BKE_undo_system.h b/source/blender/blenkernel/BKE_undo_system.h index 4870b19fe1d..f462a7fab71 100644 --- a/source/blender/blenkernel/BKE_undo_system.h +++ b/source/blender/blenkernel/BKE_undo_system.h @@ -152,6 +152,8 @@ void BKE_undosys_stack_init_from_context(UndoStack *ustack, struct bContext *C); UndoStep *BKE_undosys_stack_active_with_type(UndoStack *ustack, const UndoType *ut); UndoStep *BKE_undosys_stack_init_or_active_with_type(UndoStack *ustack, const UndoType *ut); void BKE_undosys_stack_limit_steps_and_memory(UndoStack *ustack, int steps, size_t memory_limit); +#define BKE_undosys_stack_limit_steps_and_memory_defaults(ustack) \ + BKE_undosys_stack_limit_steps_and_memory(ustack, U.undosteps, (size_t)U.undomemory * 1024 * 1024) /* Only some UndoType's require init. */ UndoStep *BKE_undosys_step_push_init_with_type(UndoStack *ustack, |