Commit: 0054dff67eb5262aabb1a0ee1f70641859044e65
Author: Brecht Van Lommel
Date:   Mon Jun 11 21:51:21 2018 +0200
Branches: blender2.8
https://developer.blender.org/rB0054dff67eb5262aabb1a0ee1f70641859044e65

Fix part of T55439: don't add indirectly linked objects to the scene on link.

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

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

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

diff --git a/source/blender/blenloader/intern/readfile.c 
b/source/blender/blenloader/intern/readfile.c
index 6aeb3e0e0cd..039af3cfa61 100644
--- a/source/blender/blenloader/intern/readfile.c
+++ b/source/blender/blenloader/intern/readfile.c
@@ -10002,13 +10002,15 @@ static void add_loose_objects_to_scene(
                if ((ob->id.tag & LIB_TAG_INDIRECT) && (ob->id.tag & 
LIB_TAG_PRE_EXISTING) == 0) {
                        bool do_it = false;
 
-                       if (ob->id.us == 0) {
-                               do_it = true;
-                       }
-                       else if (!is_link && (ob->id.lib == lib) && 
(object_in_any_scene(bmain, ob) == 0)) {
-                               /* When appending, make sure any indirectly 
loaded objects get a base, else they cant be accessed at all
-                                * (see T27437). */
-                               do_it = true;
+                       if (!is_link) {
+                               if (ob->id.us == 0) {
+                                       do_it = true;
+                               }
+                               else if ((ob->id.lib == lib) && 
(object_in_any_scene(bmain, ob) == 0)) {
+                                       /* When appending, make sure any 
indirectly loaded objects get a base, else they cant be accessed at all
+                                        * (see T27437). */
+                                       do_it = true;
+                               }
                        }
 
                        if (do_it) {

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to