diff options
author | Campbell Barton <campbell@blender.org> | 2022-03-17 06:37:20 +0300 |
---|---|---|
committer | Campbell Barton <campbell@blender.org> | 2022-03-17 06:37:20 +0300 |
commit | 1d88aeb95fc40771be7ef3a835af4206c845aa9b (patch) | |
tree | ac7108df46d7dcc7b6cebd206b0e3448f774f456 /source/blender/editors/armature/armature_select.c | |
parent | ea0c86e961de20d4215824d5cfd239a1f4c4cc90 (diff) |
View 3D: support for select passthrough when picking selected items
Currently this isn't used in the key-map, it will eventually
allow the 3D viewports tweak tool to match the behavior of other
editors that support tweaking a selection without first de-selecting
all other elements.
Diffstat (limited to 'source/blender/editors/armature/armature_select.c')
-rw-r--r-- | source/blender/editors/armature/armature_select.c | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/source/blender/editors/armature/armature_select.c b/source/blender/editors/armature/armature_select.c index d1a5c128c35..08d5d6558e0 100644 --- a/source/blender/editors/armature/armature_select.c +++ b/source/blender/editors/armature/armature_select.c @@ -965,14 +965,20 @@ bool ED_armature_edit_select_pick_bone(bContext *C, } } - if ((params->sel_op == SEL_OP_SET) && (found || params->deselect_all)) { - /* Deselect everything. */ - uint bases_len = 0; - Base **bases = BKE_view_layer_array_from_bases_in_edit_mode_unique_data( - view_layer, v3d, &bases_len); - ED_armature_edit_deselect_all_multi_ex(bases, bases_len); - MEM_freeN(bases); - changed = true; + if (params->sel_op == SEL_OP_SET) { + if ((found && params->select_passthrough) && + (ED_armature_ebone_selectflag_get(ebone) & selmask)) { + found = false; + } + else if (found || params->deselect_all) { + /* Deselect everything. */ + uint bases_len = 0; + Base **bases = BKE_view_layer_array_from_bases_in_edit_mode_unique_data( + view_layer, v3d, &bases_len); + ED_armature_edit_deselect_all_multi_ex(bases, bases_len); + MEM_freeN(bases); + changed = true; + } } if (found) { |