diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2016-12-29 14:17:23 +0300 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2016-12-29 14:17:23 +0300 |
commit | 934b3f3682520727ee48eec8be01d46147f8927d (patch) | |
tree | 319379035b2219da29d59c42eef017529980206a | |
parent | 7ba2356a5336f760d12c064c120fe83b3db659d2 (diff) |
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.
-rw-r--r-- | source/blender/blenloader/intern/readfile.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c index b38d28b7d91..a63b9ed7d19 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); |