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>2019-05-23 00:34:07 +0300
committerBastien Montagne <montagne29@wanadoo.fr>2019-05-23 00:36:02 +0300
commitceed34aac18e578109a79d3fe945493a29e8c27e (patch)
tree6426cb8e94c5de48fda16c805d8ec054a1977df3 /source/blender/blenkernel/intern/blendfile.c
parent91aafd56e3af8313b49a87a9821c9abe9b901126 (diff)
parent3a702ec028231e7deb012edac3eee5ed7f2436d4 (diff)
Merge branch 'blender2.7'
Conflicts: source/blender/blenkernel/intern/library.c source/blender/blenloader/intern/readfile.c source/blender/editors/screen/screen_edit.c
Diffstat (limited to 'source/blender/blenkernel/intern/blendfile.c')
-rw-r--r--source/blender/blenkernel/intern/blendfile.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/blendfile.c b/source/blender/blenkernel/intern/blendfile.c
index 570c1b9bd4c..c301588af0c 100644
--- a/source/blender/blenkernel/intern/blendfile.c
+++ b/source/blender/blenkernel/intern/blendfile.c
@@ -359,6 +359,16 @@ static void setup_app_data(bContext *C,
/* TODO(sergey): Can this be also move above? */
RE_FreeAllPersistentData();
}
+
+ if (mode == LOAD_UNDO) {
+ /* In undo/redo case, we do a whole lot of magic tricks to avoid having to re-read linked
+ * datablocks from libraries (since those are not supposed to change). Unfortunately, that
+ * means that we do not reset their user count, however we do increase that one when doing
+ * lib_link on local IDs using linked ones.
+ * There is no real way to predict amount of changes here, so we have to fully redo
+ * refcounting . */
+ BLE_main_id_refcount_recompute(bmain, true);
+ }
}
static void setup_app_blend_file_data(bContext *C,