Commit: 934b3f3682520727ee48eec8be01d46147f8927d
Author: Bastien Montagne
Date:   Thu Dec 29 12:17:23 2016 +0100
Branches: master
https://developer.blender.org/rB934b3f3682520727ee48eec8be01d46147f8927d

Fix T50334: Also select indirectly imported objects when linking/appending.

Since we create a base and instantiate them, they become directly
linked, so makes sense to also select them if requested.

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

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

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

diff --git a/source/blender/blenloader/intern/readfile.c 
b/source/blender/blenloader/intern/readfile.c
index b38d28b..a63b9ed 100644
--- a/source/blender/blenloader/intern/readfile.c
+++ b/source/blender/blenloader/intern/readfile.c
@@ -9808,9 +9808,15 @@ static void give_base_to_objects(Main *mainvar, Scene 
*scene, View3D *v3d, Libra
                                if (active_lay) {
                                        ob->lay = active_lay;
                                }
+                               if (flag & FILE_AUTOSELECT) {
+                                       /* Note that link_object_postprocess() 
already checks for FILE_AUTOSELECT flag,
+                                        * but it will miss objects from 
non-instanciated groups... */
+                                       ob->flag |= SELECT;
+                                       /* do NOT make base active here! screws 
up GUI stuff, if you want it do it on src/ level */
+                               }
 
-                               base->lay = ob->lay;
                                base->object = ob;
+                               base->lay = ob->lay;
                                base->flag = ob->flag;
 
                                CLAMP_MIN(ob->id.us, 0);

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

Reply via email to