From c1401a0d492eccdbba543c8ae3d14c9dad6b5c15 Mon Sep 17 00:00:00 2001 From: Bastien Montagne Date: Wed, 29 Nov 2017 17:06:28 +0100 Subject: ID static override: automatically detect new overrides as part of undo step. We could do that in several different way, e.g. adding some tag during DEG evaluation, etc. But this is not a critical process (it's main purpose is user feedback), so current solution seems to work well enough - and it's dead simple! ;) --- source/blender/editors/util/undo.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'source/blender/editors/util') diff --git a/source/blender/editors/util/undo.c b/source/blender/editors/util/undo.c index 1ee1430d9f0..9e28a5f84ec 100644 --- a/source/blender/editors/util/undo.c +++ b/source/blender/editors/util/undo.c @@ -45,6 +45,7 @@ #include "BKE_blender_undo.h" #include "BKE_context.h" #include "BKE_global.h" +#include "BKE_library_override.h" #include "BKE_main.h" #include "BKE_screen.h" @@ -82,6 +83,9 @@ void ED_undo_push(bContext *C, const char *str) if (G.debug & G_DEBUG) printf("%s: %s\n", __func__, str); + /* Always do it for now, this might need to be refined... */ + BKE_main_override_static_operations_create(CTX_data_main(C)); + if (obedit) { if (U.undosteps == 0) return; -- cgit v1.2.3