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 <bastien@blender.org>2020-11-12 13:48:59 +0300
committerBastien Montagne <bastien@blender.org>2020-11-12 13:50:33 +0300
commit9067cd64a5083c214fd37fd65bea374312abad10 (patch)
tree55493b2b3417846f297a8a598c7d33e505918f24
parent12dd26a2bbb37fc369956d9e2bcd7d851aafafde (diff)
Fix T82466: Library Overrides: overrides disappear when appending.
`BKE_library_make_local` was not properly checking for tags and/or libs in liboverrides case.
-rw-r--r--source/blender/blenkernel/intern/lib_id.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/source/blender/blenkernel/intern/lib_id.c b/source/blender/blenkernel/intern/lib_id.c
index ae6ee71da82..b0f38001d01 100644
--- a/source/blender/blenkernel/intern/lib_id.c
+++ b/source/blender/blenkernel/intern/lib_id.c
@@ -1884,7 +1884,9 @@ void BKE_library_make_local(Main *bmain,
if (id->lib == NULL) {
id->tag &= ~(LIB_TAG_EXTERN | LIB_TAG_INDIRECT | LIB_TAG_NEW);
id->flag &= ~LIB_INDIRECT_WEAK_LINK;
- if (ID_IS_OVERRIDE_LIBRARY_REAL(id)) {
+ if (ID_IS_OVERRIDE_LIBRARY_REAL(id) &&
+ ELEM(lib, NULL, id->override_library->reference->lib) &&
+ ((untagged_only == false) || !(id->tag & LIB_TAG_PRE_EXISTING))) {
BKE_lib_override_library_free(&id->override_library, true);
}
}