From 514f80b0c4f6375d1a01db1f2e32b495c23c17ca Mon Sep 17 00:00:00 2001 From: Bastien Montagne Date: Wed, 17 Jun 2020 14:58:47 +0200 Subject: Fix (unreported) broken logic in `BKE_libblock_relink_to_newid` Existing code would not follow as expected into new sub-IDs if they were only encoutered once in usages by parent IDs... --- source/blender/blenkernel/intern/lib_remap.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'source/blender/blenkernel') diff --git a/source/blender/blenkernel/intern/lib_remap.c b/source/blender/blenkernel/intern/lib_remap.c index ba986b1661b..d4246056efe 100644 --- a/source/blender/blenkernel/intern/lib_remap.c +++ b/source/blender/blenkernel/intern/lib_remap.c @@ -666,9 +666,10 @@ static int id_relink_to_newid_looper(LibraryIDLinkCallbackData *cb_data) /* See: NEW_ID macro */ if (id->newid) { BKE_library_update_ID_link_user(id->newid, id, cb_flag); - *id_pointer = id->newid; + id = id->newid; + *id_pointer = id; } - else if (id->tag & LIB_TAG_NEW) { + if (id->tag & LIB_TAG_NEW) { id->tag &= ~LIB_TAG_NEW; BKE_libblock_relink_to_newid(id); } -- cgit v1.2.3