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-01 13:18:56 +0300
committerBastien Montagne <bastien@blender.org>2021-10-01 13:21:08 +0300
commit798e59300280605b8886d9a1f52e1fcf8e5ac008 (patch)
treed8359d64b8d04b7eca2ff1feae39bb8a10e67167
parent21c29480c3e931ad062b454bd458360821a47cd7 (diff)
Fix T87189: Copy/pasting IDs does not handle properly instantiation.
Copy/Paste uses its own code path for ID linking, which was not setting `LIB_TAG_DOIT` for proper instantiation later on. Would be nice the make this logic closer to the rest of the link/append code at some point, but for now this fix will do.
-rw-r--r--source/blender/blenloader/intern/readfile.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c
index 85fc6c2ad70..3ee5e41bf1f 100644
--- a/source/blender/blenloader/intern/readfile.c
+++ b/source/blender/blenloader/intern/readfile.c
@@ -4788,6 +4788,13 @@ int BLO_library_link_copypaste(Main *mainl, BlendHandle *bh, const uint64_t id_t
ListBase *lb = which_libbase(mainl, GS(id->name));
id_sort_by_name(lb, id, NULL);
+ /* Tag as loose object (or data associated with objects)
+ * needing to be instantiated (see also #link_named_part and its usage of
+ * #BLO_LIBLINK_NEEDS_ID_TAG_DOIT above). */
+ if (library_link_idcode_needs_tag_check(GS(id->name), BLO_LIBLINK_NEEDS_ID_TAG_DOIT)) {
+ id->tag |= LIB_TAG_DOIT;
+ }
+
if (bhead->code == ID_OB) {
/* Instead of instancing Base's directly, postpone until after collections are loaded
* otherwise the base's flag is set incorrectly when collections are used */