[Bf-blender-cvs] [8c695404a48] blender-v2.81-release: Fix T70778: Library Override dissabled after re-instancing same collection in different scene.

Bastien Montagne noreply at git.blender.org
Fri Nov 8 17:48:16 CET 2019


Commit: 8c695404a481488879eb811b04e126fcdb92a915
Author: Bastien Montagne
Date:   Fri Nov 8 17:47:48 2019 +0100
Branches: blender-v2.81-release
https://developer.blender.org/rB8c695404a481488879eb811b04e126fcdb92a915

Fix T70778: Library Override dissabled after re-instancing same collection in different scene.

Very stupid mistake in own new generic ID lib_link function, that would try
to link ID pointers for all data-blocks, not only those actually needing it.

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

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

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

diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c
index 452e75081d6..167917f7b6a 100644
--- a/source/blender/blenloader/intern/readfile.c
+++ b/source/blender/blenloader/intern/readfile.c
@@ -2618,10 +2618,13 @@ static void lib_link_id(FileData *fd, Main *main)
     ID *id;
 
     for (id = lb->first; id; id = id->next) {
-      if (id->override_library) {
-        id->override_library->reference = newlibadr_us(
-            fd, id->lib, id->override_library->reference);
-        id->override_library->storage = newlibadr_us(fd, id->lib, id->override_library->storage);
+      if (id->tag & LIB_TAG_NEED_LINK) {
+        if (id->override_library) {
+          id->override_library->reference = newlibadr_us(
+              fd, id->lib, id->override_library->reference);
+          id->override_library->storage = newlibadr_us(fd, id->lib, id->override_library->storage);
+        }
+        /* DO NOT clear LIB_TAG_NEED_LINK here, it is used again by per-ID-type linkers. */
       }
     }
   }



More information about the Bf-blender-cvs mailing list