Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <campbell@blender.org>2022-03-30 04:27:35 +0300
committerCampbell Barton <campbell@blender.org>2022-03-30 04:34:14 +0300
commit2499768e071965dc6e743cf540966a33e07e5d63 (patch)
tree52d3c292382fe173eecb5b8cea6dda8b23683f66 /release/scripts/presets
parent400ea40dca7a9be5fd2c1974c1c542d896621d67 (diff)
Keymap: "Mouse Select & Move" now uses click to de-select others
While it's useful for click-drag to leave the selection as-is (when clicking on items that are already selected), it's useful for a single click to de-select all other elements. This also removes the need for the initial selection to set the object as active since this is possible by clicking on it.
Diffstat (limited to 'release/scripts/presets')
-rw-r--r--release/scripts/presets/keyconfig/keymap_data/blender_default.py26
1 files changed, 24 insertions, 2 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 [(