diff options
Diffstat (limited to 'source/blender/blenkernel/intern/undo_system.c')
-rw-r--r-- | source/blender/blenkernel/intern/undo_system.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/undo_system.c b/source/blender/blenkernel/intern/undo_system.c index 760c6a60976..5a0081bff16 100644 --- a/source/blender/blenkernel/intern/undo_system.c +++ b/source/blender/blenkernel/intern/undo_system.c @@ -500,6 +500,16 @@ UndoStep *BKE_undosys_step_find_by_name(UndoStack *ustack, const char *name) return BLI_rfindstring(&ustack->steps, name, offsetof(UndoStep, name)); } +UndoStep *BKE_undosys_step_find_by_type(UndoStack *ustack, const UndoType *ut) +{ + for (UndoStep *us = ustack->steps.last; us; us = us->prev) { + if (us->type == ut) { + return us; + } + } + return NULL; +} + bool BKE_undosys_step_undo_with_data_ex( UndoStack *ustack, bContext *C, UndoStep *us, bool use_skip) |