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>2021-10-06 12:38:11 +0300
committerBastien Montagne <bastien@blender.org>2021-10-06 12:43:42 +0300
commit9ed19db5392d76bc810afabeb93fcd34a23fd88d (patch)
tree5a2009f6c0223eba7cbd7b826fe2579d7fdb18e7 /source/blender/blenkernel/intern/lib_remap.c
parentb5ea3d2c09c5df49ed783dabdc83820c55effdd2 (diff)
Fix handling of overrides during append.
Liboverride references need a special handling during append, since those pointers should never be made local, nor reampped to newly localized data. And liboverride references should never be directly made local either, to ensure their liboverride usages remain pointing to linked data and not local one. Issue was reported by the studio, and also probably as part of T91892.
Diffstat (limited to 'source/blender/blenkernel/intern/lib_remap.c')
-rw-r--r--source/blender/blenkernel/intern/lib_remap.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/source/blender/blenkernel/intern/lib_remap.c b/source/blender/blenkernel/intern/lib_remap.c
index 48396c5e6d9..b5c45c0902b 100644
--- a/source/blender/blenkernel/intern/lib_remap.c
+++ b/source/blender/blenkernel/intern/lib_remap.c
@@ -719,7 +719,7 @@ void BKE_libblock_relink_to_newid(ID *id)
static int id_relink_to_newid_looper_new(LibraryIDLinkCallbackData *cb_data)
{
const int cb_flag = cb_data->cb_flag;
- if (cb_flag & IDWALK_CB_EMBEDDED) {
+ if (cb_flag & (IDWALK_CB_EMBEDDED | IDWALK_CB_OVERRIDE_LIBRARY_REFERENCE)) {
return IDWALK_RET_NOP;
}
@@ -730,7 +730,11 @@ static int id_relink_to_newid_looper_new(LibraryIDLinkCallbackData *cb_data)
if (id) {
/* See: NEW_ID macro */
if (id->newid != NULL) {
- BKE_libblock_relink_ex(bmain, id_owner, id, id->newid, ID_REMAP_SKIP_INDIRECT_USAGE);
+ BKE_libblock_relink_ex(bmain,
+ id_owner,
+ id,
+ id->newid,
+ ID_REMAP_SKIP_INDIRECT_USAGE | ID_REMAP_SKIP_OVERRIDE_LIBRARY);
id = id->newid;
}
if (id->tag & LIB_TAG_NEW) {