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:
authorBastien Montagne <montagne29@wanadoo.fr>2017-11-29 19:06:28 +0300
committerBastien Montagne <montagne29@wanadoo.fr>2017-11-29 19:23:25 +0300
commitc1401a0d492eccdbba543c8ae3d14c9dad6b5c15 (patch)
tree13b313fc6f06085ba1d6b6a53d4970093a285720 /source/blender/editors/util
parent0007873645149c022805a5f6668d48552148a813 (diff)
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! ;)
Diffstat (limited to 'source/blender/editors/util')
-rw-r--r--source/blender/editors/util/undo.c4
1 files changed, 4 insertions, 0 deletions
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;