From 95cc5c6081d1f208028484e02d18881b7ccc6886 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Fri, 12 Aug 2022 13:50:17 +1000 Subject: Fix T96885: Drag Fallback on Tweak is using Move instead Since [0] (fix for T95591), the tweak tools fallback action used tweak instead of press. This was enabled so tools such as "Measure" & "Add Cube" could use fallback tools (otherwise is wasn't possible to add a new ruler without also selecting for e.g.), however this is of limited use since both tools support dragging anywhere to activate, making them less useful with other selection tools beside tweak (box/lasso for e.g.). Resolve by disabling the fallback option for tools where using the tweak tool to select is undesirable. Selection by clicking with "Measure" & "Add Cube" is still supported as this is also set in the 3D view's key-map. [0]: 0e51defcf42e1cb231d36da9ecc2cc0fbe6ae505 --- .../presets/keyconfig/keymap_data/blender_default.py | 13 +++++-------- release/scripts/startup/bl_ui/space_toolsystem_toolbar.py | 6 ------ 2 files changed, 5 insertions(+), 14 deletions(-) (limited to 'release') diff --git a/release/scripts/presets/keyconfig/keymap_data/blender_default.py b/release/scripts/presets/keyconfig/keymap_data/blender_default.py index d08efc6909b..efc70f22321 100644 --- a/release/scripts/presets/keyconfig/keymap_data/blender_default.py +++ b/release/scripts/presets/keyconfig/keymap_data/blender_default.py @@ -490,16 +490,13 @@ def _template_items_tool_select( ] if params.select_mouse == 'LEFTMOUSE': - # By default use 'PRESS' for immediate select without quick delay. - # Fallback key-maps 'CLICK' since 'PRESS' events passes through (allowing either click or drag). - # - # NOTE: When the active (non-fallback) tool uses a key-map that activates it's primary tool on drag, - # it's important that this key-map uses click and not press. Otherwise it becomes impossible to use - # the tool without selecting elements under the cursor. + # Use 'PRESS' for immediate select without delay. + # Tools that allow dragging anywhere should _NOT_ enable the fallback tool + # unless it is expected that the tool should operate on the selection (click-drag to rip for e.g.). return [ - (operator, {"type": 'LEFTMOUSE', "value": 'CLICK' if fallback else 'PRESS'}, + (operator, {"type": 'LEFTMOUSE', "value": 'PRESS'}, {"properties": [("deselect_all", True), *operator_props]}), - (operator, {"type": 'LEFTMOUSE', "value": 'CLICK' if fallback else 'PRESS', "shift": True}, + (operator, {"type": 'LEFTMOUSE', "value": 'PRESS', "shift": True}, {"properties": [("toggle", True), *operator_props]}), # Fallback key-map must transform as the primary tool is expected diff --git a/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py b/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py index 7b00e587f94..38aa343e542 100644 --- a/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py +++ b/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py @@ -125,7 +125,6 @@ class _defs_view3d_generic: icon="ops.view3d.ruler", widget="VIEW3D_GGT_ruler", keymap="3D View Tool: Measure", - options={'KEYMAP_FALLBACK'}, ) @@ -529,7 +528,6 @@ class _defs_view3d_add: widget="VIEW3D_GGT_placement", keymap="3D View Tool: Object, Add Primitive", draw_settings=draw_settings, - options={'KEYMAP_FALLBACK'}, ) @ToolDef.from_fn @@ -556,7 +554,6 @@ class _defs_view3d_add: widget="VIEW3D_GGT_placement", keymap="3D View Tool: Object, Add Primitive", draw_settings=draw_settings, - options={'KEYMAP_FALLBACK'}, ) @ToolDef.from_fn @@ -582,7 +579,6 @@ class _defs_view3d_add: widget="VIEW3D_GGT_placement", keymap="3D View Tool: Object, Add Primitive", draw_settings=draw_settings, - options={'KEYMAP_FALLBACK'}, ) @ToolDef.from_fn @@ -608,7 +604,6 @@ class _defs_view3d_add: widget="VIEW3D_GGT_placement", keymap="3D View Tool: Object, Add Primitive", draw_settings=draw_settings, - options={'KEYMAP_FALLBACK'}, ) @ToolDef.from_fn @@ -633,7 +628,6 @@ class _defs_view3d_add: widget="VIEW3D_GGT_placement", keymap="3D View Tool: Object, Add Primitive", draw_settings=draw_settings, - options={'KEYMAP_FALLBACK'}, ) -- cgit v1.2.3