[Bf-blender-cvs] [322433f18ff] id_override_static: ID static override: automatically detect new overrides as part of undo step.
Bastien Montagne
noreply at git.blender.org
Wed Nov 29 17:45:43 CET 2017
Commit: 322433f18ff94cd2b8b1f1863115420af2dbb8d5
Author: Bastien Montagne
Date: Wed Nov 29 17:06:28 2017 +0100
Branches: id_override_static
https://developer.blender.org/rB322433f18ff94cd2b8b1f1863115420af2dbb8d5
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! ;)
===================================================================
M source/blender/editors/util/undo.c
===================================================================
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;
More information about the Bf-blender-cvs
mailing list