From 618f39fca23ca7734a09a8f08efced8379efd2b3 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Fri, 1 Sep 2023 12:40:31 +1000 Subject: [PATCH] Keymap: improve tweak tool consistency & behavior Remove experimental options & make them default: - Tweak Select: Mouse Select & Move - Tweak Tool: Left Mouse Select & Move Changes: - LMB press selects the element (unless it's already selected - in that case no selection takes place). - LMB drag moves the selection. - LMB click selects the element (deselecting all others). Implications: - This makes it possible to tweak more than one item at a time. - It is no longer possible to set the 3D cursor with LMB when the tweak tool is active. Details: - Shift-LMB remains unchanged. - RMB selection remains unchanged. - Blender 2.7 key-map remains unchanged. Addresses design task #96544. --- scripts/presets/keyconfig/Blender.py | 31 ------------------- .../keyconfig/keymap_data/blender_default.py | 10 ++---- 2 files changed, 2 insertions(+), 39 deletions(-) diff --git a/scripts/presets/keyconfig/Blender.py b/scripts/presets/keyconfig/Blender.py index a421a9312b0..ad2d2c5d474 100644 --- a/scripts/presets/keyconfig/Blender.py +++ b/scripts/presets/keyconfig/Blender.py @@ -97,26 +97,6 @@ class Prefs(bpy.types.KeyConfigPreferences): default=False, update=update_fn, ) - # Experimental: only show with developer extras, see: #96544. - use_tweak_select_passthrough: BoolProperty( - name="Tweak Select: Mouse Select & Move", - description=( - "The tweak tool is activated immediately instead of placing the cursor. " - "This is an experimental preference and may be removed" - ), - default=False, - update=update_fn, - ) - # Experimental: only show with developer extras, see: #96544. - use_tweak_tool_lmb_interaction: BoolProperty( - name="Tweak Tool: Left Mouse Select & Move", - description=( - "The tweak tool is activated immediately instead of placing the cursor. " - "This is an experimental preference and may be removed" - ), - default=False, - update=update_fn, - ) use_alt_click_leader: BoolProperty( name="Alt Click Tool Prompt", @@ -313,12 +293,6 @@ class Prefs(bpy.types.KeyConfigPreferences): row = sub.row() row.prop(self, "use_select_all_toggle") - if show_developer_ui: - row = sub.row() - row.prop(self, "use_tweak_select_passthrough") - if show_developer_ui and (not is_select_left): - row = sub.row() - row.prop(self, "use_tweak_tool_lmb_interaction") if show_developer_ui: row = sub.row() row.prop(self, "use_region_toggle_pie") @@ -385,11 +359,6 @@ def load(): # Otherwise LMB activates the fallback tool and RMB always tweak-selects. (kc_prefs.rmb_action != 'FALLBACK_TOOL') ), - use_tweak_select_passthrough=(show_developer_ui and kc_prefs.use_tweak_select_passthrough), - use_tweak_tool_lmb_interaction=( - False if is_select_left else - (show_developer_ui and kc_prefs.use_tweak_tool_lmb_interaction) - ), use_alt_tool_or_cursor=( (not use_mouse_emulate_3_button) and (kc_prefs.use_alt_tool if is_select_left else kc_prefs.use_alt_cursor) diff --git a/scripts/presets/keyconfig/keymap_data/blender_default.py b/scripts/presets/keyconfig/keymap_data/blender_default.py index c7fbf5bed49..dbbfaf91b96 100644 --- a/scripts/presets/keyconfig/keymap_data/blender_default.py +++ b/scripts/presets/keyconfig/keymap_data/blender_default.py @@ -41,7 +41,6 @@ class Params: # - Click selects only the item at the cursor position. # See: #97032. "use_tweak_select_passthrough", - "use_tweak_tool_lmb_interaction", "use_mouse_emulate_3_button", # User preferences: @@ -120,8 +119,6 @@ class Params: use_gizmo_drag=True, use_fallback_tool=False, use_fallback_tool_select_handled=True, - use_tweak_select_passthrough=False, - use_tweak_tool_lmb_interaction=False, use_v3d_tab_menu=False, use_v3d_shade_ex_pie=False, use_v3d_mmb_pan=False, @@ -152,8 +149,6 @@ class Params: else: self.tool_maybe_tweak_value = 'CLICK_DRAG' - self.use_tweak_tool_lmb_interaction = use_tweak_tool_lmb_interaction - self.context_menu_event = {"type": 'W', "value": 'PRESS'} # Use the "cursor" functionality for RMB select. @@ -174,7 +169,6 @@ class Params: self.action_mouse = 'RIGHTMOUSE' self.tool_mouse = 'LEFTMOUSE' self.tool_maybe_tweak_value = 'CLICK_DRAG' - self.use_tweak_tool_lmb_interaction = False if self.legacy: self.context_menu_event = {"type": 'W', "value": 'PRESS'} @@ -211,7 +205,7 @@ class Params: self.use_file_single_click = use_file_single_click - self.use_tweak_select_passthrough = use_tweak_select_passthrough + self.use_tweak_select_passthrough = not legacy self.use_fallback_tool = use_fallback_tool @@ -579,7 +573,7 @@ def _template_items_tool_select( select_passthrough = params.use_tweak_select_passthrough else: if not cursor_prioritize: - select_passthrough = params.use_tweak_tool_lmb_interaction + select_passthrough = True if select_passthrough: return [