Fix T92467: Path Selection broken when Drag is set to Tweak

When RMB-select uses "Select Tweak" as a fallback tool,
ignore all bindings mapped to the Control key as these are
used for path selection.

This was fixed in 2a2d873124
however that caused shift-select to fail (T93100).
This commit is contained in:
Campbell Barton 2022-02-21 23:09:34 +11:00
parent 132f9a2e31
commit 829812f180
Notes: blender-bot 2023-02-14 08:07:50 +01:00
Referenced by issue #92467, Path Selection broken when Drag is set to Tweak
1 changed files with 5 additions and 3 deletions

View File

@ -4668,7 +4668,9 @@ def _template_paint_radial_control(paint, rotation=False, secondary_rotation=Fal
return items
def _template_view3d_select(*, type, value, legacy):
def _template_view3d_select(*, type, value, legacy, 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 [(
"view3d.select",
{"type": type, "value": value, **{m: True for m in mods}},
@ -4682,7 +4684,7 @@ def _template_view3d_select(*, type, value, legacy):
(("center", "enumerate"), ("ctrl", "alt")),
(("toggle", "enumerate"), ("shift", "alt")),
(("toggle", "center", "enumerate"), ("shift", "ctrl", "alt")),
)]
) if exclude_mod is None or exclude_mod not in mods]
def _template_view3d_gpencil_select(*, type, value, legacy, use_select_mouse=True):
@ -6490,7 +6492,7 @@ def km_3d_view_tool_select(params, *, fallback):
*([] if (fallback and (params.select_mouse == 'RIGHTMOUSE')) else _template_items_tool_select(
params, "view3d.select", "view3d.cursor3d", extend="toggle")),
*([] if (not params.use_fallback_tool_rmb) else _template_view3d_select(
type=params.select_mouse, value=params.select_mouse_value, legacy=params.legacy)),
type=params.select_mouse, value=params.select_mouse_value, legacy=params.legacy, exclude_mod="ctrl")),
]},
)