diff options
author | Campbell Barton <ideasman42@gmail.com> | 2020-09-09 07:39:54 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2020-09-09 07:51:28 +0300 |
commit | 3e8b1550dc429b35aef8ad599ac94f913ab0d436 (patch) | |
tree | 9e8c92ca628969ec45e1609d2a4aa9edef2e5475 /source | |
parent | 23f1dea4408fa87db5193b88b4315d8de15804b2 (diff) |
Fix "Select" option being ignored when linking collection instances
Also check 'BASE_SELECTABLE' before selecting
which was only done for collections.
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/blenloader/intern/readfile.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c index 195bb1e7f9f..18d563cb365 100644 --- a/source/blender/blenloader/intern/readfile.c +++ b/source/blender/blenloader/intern/readfile.c @@ -10312,7 +10312,7 @@ static void add_loose_objects_to_scene(Main *mainvar, base->local_view_bits |= v3d->local_view_uuid; } - if (flag & FILE_AUTOSELECT) { + if ((flag & FILE_AUTOSELECT) && (base->flag & BASE_SELECTABLE)) { /* Do NOT make base active here! screws up GUI stuff, * if you want it do it at the editor level. */ base->flag |= BASE_SELECTED; @@ -10370,7 +10370,7 @@ static void add_loose_object_data_to_scene(Main *mainvar, base->local_view_bits |= v3d->local_view_uuid; } - if (flag & FILE_AUTOSELECT) { + if ((flag & FILE_AUTOSELECT) && (base->flag & BASE_SELECTABLE)) { /* Do NOT make base active here! screws up GUI stuff, * if you want it do it at the editor level. */ base->flag |= BASE_SELECTED; @@ -10416,13 +10416,16 @@ static void add_collections_to_scene(Main *mainvar, base->local_view_bits |= v3d->local_view_uuid; } - if (base->flag & BASE_SELECTABLE) { + if ((flag & FILE_AUTOSELECT) && (base->flag & BASE_SELECTABLE)) { base->flag |= BASE_SELECTED; } BKE_scene_object_base_flag_sync_from_base(base); DEG_id_tag_update(&ob->id, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY | ID_RECALC_ANIMATION); - view_layer->basact = base; + + if (flag & FILE_AUTOSELECT) { + view_layer->basact = base; + } /* Assign the collection. */ ob->instance_collection = collection; |