[Bf-blender-cvs] [21c29480c3e] master: Fix paste code linking 'direct' IDs with 'INDIRECT' flag.

Bastien Montagne noreply at git.blender.org
Fri Oct 1 12:25:01 CEST 2021


Commit: 21c29480c3e931ad062b454bd458360821a47cd7
Author: Bastien Montagne
Date:   Fri Oct 1 12:14:44 2021 +0200
Branches: master
https://developer.blender.org/rB21c29480c3e931ad062b454bd458360821a47cd7

Fix paste code linking 'direct' IDs with 'INDIRECT' flag.

No idea why this was done that way (it originate from initial paste
commit, rB12b642062c6f).

But the IDs 'selected' as direct paste in `BLO_library_link_copypaste`
should be 'directly' linked, it's similar case to actual append of
selected IDs by the user.

Related to T87189.

===================================================================

M	source/blender/blenloader/intern/readfile.c

===================================================================

diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c
index c7c5a8b8a0d..85fc6c2ad70 100644
--- a/source/blender/blenloader/intern/readfile.c
+++ b/source/blender/blenloader/intern/readfile.c
@@ -4779,7 +4779,7 @@ int BLO_library_link_copypaste(Main *mainl, BlendHandle *bh, const uint64_t id_t
     if (blo_bhead_is_id_valid_type(bhead) && BKE_idtype_idcode_is_linkable((short)bhead->code) &&
         (id_types_mask == 0 ||
          (BKE_idtype_idcode_to_idfilter((short)bhead->code) & id_types_mask) != 0)) {
-      read_libblock(fd, mainl, bhead, LIB_TAG_NEED_EXPAND | LIB_TAG_INDIRECT, false, &id);
+      read_libblock(fd, mainl, bhead, LIB_TAG_NEED_EXPAND | LIB_TAG_EXTERN, false, &id);
       num_directly_linked++;
     }



More information about the Bf-blender-cvs mailing list