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:
authorBrecht Van Lommel <brechtvanlommel@gmail.com>2018-06-13 20:24:17 +0300
committerBrecht Van Lommel <brechtvanlommel@gmail.com>2018-06-13 20:26:52 +0300
commit711a50c5ea4de65be1512a1dbfa82b83ef993f56 (patch)
treec068e22657942f7a9cb8777e74a46ff54a111f5d /source/blender/blenkernel/intern/undo_system.c
parenta3c630aebb34e88de3a4820a0bb0f4359e13570d (diff)
parent4d58fac1b4ddcf424d78ee96b404445e8ccc6527 (diff)
Merge branch 'master' into blender2.8
This includes making Eevee match Cycles behavior of inserting an emission node when linking colors to closures.
Diffstat (limited to 'source/blender/blenkernel/intern/undo_system.c')
-rw-r--r--source/blender/blenkernel/intern/undo_system.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/undo_system.c b/source/blender/blenkernel/intern/undo_system.c
index a05e79aae1f..173b459f442 100644
--- a/source/blender/blenkernel/intern/undo_system.c
+++ b/source/blender/blenkernel/intern/undo_system.c
@@ -235,6 +235,23 @@ void BKE_undosys_stack_clear(UndoStack *ustack)
ustack->step_active = NULL;
}
+void BKE_undosys_stack_clear_active(UndoStack *ustack)
+{
+ /* Remove active and all following undos. */
+ UndoStep *us = ustack->step_active;
+
+ if (us) {
+ ustack->step_active = us->prev;
+ bool is_not_empty = ustack->step_active != NULL;
+
+ while (ustack->steps.last != ustack->step_active) {
+ UndoStep *us_iter = ustack->steps.last;
+ undosys_step_free_and_unlink(ustack, us_iter);
+ undosys_stack_validate(ustack, is_not_empty);
+ }
+ }
+}
+
static bool undosys_stack_push_main(UndoStack *ustack, const char *name, struct Main *bmain)
{
UNDO_NESTED_ASSERT(false);