[Bf-blender-cvs] [a54c1f1e771] blender-v2.83-release: Fix T76155: 'Object lost data' on copy-pasting with new undo code.
Bastien Montagne
noreply at git.blender.org
Wed Apr 29 21:37:49 CEST 2020
Commit: a54c1f1e77147352dfab1233ef63307e87e9f09c
Author: Bastien Montagne
Date: Wed Apr 29 18:11:33 2020 +0200
Branches: blender-v2.83-release
https://developer.blender.org/rBa54c1f1e77147352dfab1233ef63307e87e9f09c
Fix T76155: 'Object lost data' on copy-pasting with new undo code.
===================================================================
M source/blender/blenloader/intern/readfile.c
===================================================================
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c
index 8837dccb837..98e6369b634 100644
--- a/source/blender/blenloader/intern/readfile.c
+++ b/source/blender/blenloader/intern/readfile.c
@@ -9659,7 +9659,9 @@ static bool read_libblock_undo_restore(
/* Do not add LIB_TAG_NEW here, this should not be needed/used in undo case anyway (as
* this is only for do_version-like code), but for sake of consistency, and also because
* it will tell us which ID is re-used from old Main, and which one is actually new. */
- const int id_tag = tag | LIB_TAG_NEED_LINK | LIB_TAG_UNDO_OLD_ID_REUSED;
+ /* Also do not add LIB_TAG_NEED_LINK, those IDs will never be re-liblinked, hence that tag will
+ * never be cleared, leading to critical issue in link/appemd code. */
+ const int id_tag = tag | LIB_TAG_UNDO_OLD_ID_REUSED;
read_libblock_undo_restore_identical(fd, main, id, id_old, id_tag);
/* Insert into library map for lookup by newly read datablocks (with pointer value bhead->old).
More information about the Bf-blender-cvs
mailing list