diff options
-rw-r--r-- | release/scripts/presets/keyconfig/keymap_data/blender_default.py | 26 | ||||
-rw-r--r-- | source/blender/editors/space_view3d/view3d_select.c | 5 |
2 files changed, 24 insertions, 7 deletions
diff --git a/release/scripts/presets/keyconfig/keymap_data/blender_default.py b/release/scripts/presets/keyconfig/keymap_data/blender_default.py index d307c3d0f0a..b626f6a237a 100644 --- a/release/scripts/presets/keyconfig/keymap_data/blender_default.py +++ b/release/scripts/presets/keyconfig/keymap_data/blender_default.py @@ -4690,7 +4690,7 @@ def _template_paint_radial_control(paint, rotation=False, secondary_rotation=Fal def _template_view3d_select(*, type, value, legacy, select_passthrough, exclude_mod=None): # NOTE: `exclude_mod` is needed since we don't want this tool to exclude Control-RMB actions when this is used # as a tool key-map with RMB-select and `use_fallback_tool_rmb` is enabled. See T92467. - return [( + items = [( "view3d.select", {"type": type, "value": value, **{m: True for m in mods}}, {"properties": [(c, True) for c in props]}, @@ -4706,6 +4706,17 @@ def _template_view3d_select(*, type, value, legacy, select_passthrough, exclude_ (("toggle", "center", "enumerate"), ("shift", "ctrl", "alt")), ) if exclude_mod is None or exclude_mod not in mods] + if select_passthrough and (value == 'PRESS'): + # Add an additional click item to de-select all other items, + # needed so pass-through is able to de-select other items. + items.append(( + "view3d.select", + {"type": type, "value": 'CLICK'}, + {"properties": [("deselect_all", True)]}, + )) + + return items + def _template_view3d_gpencil_select(*, type, value, legacy, use_select_mouse=True): return [ @@ -4723,7 +4734,7 @@ def _template_view3d_gpencil_select(*, type, value, legacy, use_select_mouse=Tru def _template_uv_select(*, type, value, select_passthrough, legacy): - return [ + items = [ ("uv.select", {"type": type, "value": value}, {"properties": [ *((("deselect_all", True),) if not legacy else ()), @@ -4733,6 +4744,17 @@ def _template_uv_select(*, type, value, select_passthrough, legacy): {"properties": [("toggle", True)]}), ] + if select_passthrough and (value == 'PRESS'): + # Add an additional click item to de-select all other items, + # needed so pass-through is able to de-select other items. + items.append(( + "uv.select", + {"type": type, "value": 'CLICK'}, + {"properties": [("deselect_all", True)]}, + )) + + return items + def _template_sequencer_generic_select(*, type, value, legacy): return [( diff --git a/source/blender/editors/space_view3d/view3d_select.c b/source/blender/editors/space_view3d/view3d_select.c index 30282df8026..54a335f98ed 100644 --- a/source/blender/editors/space_view3d/view3d_select.c +++ b/source/blender/editors/space_view3d/view3d_select.c @@ -2747,11 +2747,6 @@ static bool ed_object_select_pick(bContext *C, if (params->sel_op == SEL_OP_SET) { if ((found && params->select_passthrough) && (basact->flag & BASE_SELECTED)) { found = false; - /* NOTE(@campbellbarton): Experimental behavior to set active even keeping the selection - * without this it's inconvenient to set the active object. */ - if (basact != oldbasact) { - use_activate_selected_base = true; - } } else if (found || params->deselect_all) { /* Deselect everything. */ |