Fix T82466: Library Overrides: overrides disappear when appending.

`BKE_library_make_local` was not properly checking for tags and/or libs
in liboverrides case.
This commit is contained in:
Bastien Montagne 2020-11-12 11:48:59 +01:00
parent 12dd26a2bb
commit 9067cd64a5
Notes: blender-bot 2023-02-14 06:00:46 +01:00
Referenced by issue #82466, Library Overrides: overrides disappear when appending
1 changed files with 3 additions and 1 deletions

View File

@ -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);
}
}