[Bf-blender-cvs] [279cc34343d] master: Keymap: disable 'Alt' click for tools prompt by default
Campbell Barton
noreply at git.blender.org
Thu Jul 16 15:49:22 CEST 2020
Commit: 279cc34343d55f78d2356de94e7dfccacfeaaa00
Author: Campbell Barton
Date: Thu Jul 16 23:44:38 2020 +1000
Branches: master
https://developer.blender.org/rB279cc34343d55f78d2356de94e7dfccacfeaaa00
Keymap: disable 'Alt' click for tools prompt by default
Based on feedback from artists in the Blender Studio this is too
easy to access by accident.
This is still accessible as a preference.
===================================================================
M release/scripts/presets/keyconfig/blender.py
M release/scripts/presets/keyconfig/keymap_data/blender_default.py
===================================================================
diff --git a/release/scripts/presets/keyconfig/blender.py b/release/scripts/presets/keyconfig/blender.py
index 0bff9974aaa..cbdd01b3cbe 100644
--- a/release/scripts/presets/keyconfig/blender.py
+++ b/release/scripts/presets/keyconfig/blender.py
@@ -54,6 +54,15 @@ class Prefs(bpy.types.KeyConfigPreferences):
default='PLAY',
update=update_fn,
)
+ use_alt_click_leader: BoolProperty(
+ name="Alt Click Tool Prompt",
+ description=(
+ "Tapping Alt (without pressing any other keys) shows a prompt in the status-bar\n"
+ "prompting a second keystroke to activate the tool"
+ ),
+ default=False,
+ update=update_fn,
+ )
use_select_all_toggle: BoolProperty(
name="Select All Toggles",
description=(
@@ -164,13 +173,16 @@ class Prefs(bpy.types.KeyConfigPreferences):
col = layout.column()
col.row().prop(self, "select_mouse", text="Select with Mouse Button", expand=True)
col.row().prop(self, "spacebar_action", text="Spacebar Action", expand=True)
+
if is_select_left:
col.row().prop(self, "gizmo_action", text="Activate Gizmo Event", expand=True)
# Checkboxes sub-layout.
col = layout.column()
sub = col.column(align=True)
- sub.prop(self, "use_select_all_toggle")
+ row = sub.row()
+ row.prop(self, "use_select_all_toggle")
+ row.prop(self, "use_alt_click_leader")
# 3DView settings.
col = layout.column()
@@ -217,6 +229,7 @@ def load():
kc_prefs.select_mouse == 'LEFT' and
kc_prefs.gizmo_action == 'DRAG'
),
+ use_alt_click_leader=kc_prefs.use_alt_click_leader,
use_pie_click_drag=kc_prefs.use_pie_click_drag,
),
)
diff --git a/release/scripts/presets/keyconfig/keymap_data/blender_default.py b/release/scripts/presets/keyconfig/keymap_data/blender_default.py
index fae247b30a5..c8d0843e8dd 100644
--- a/release/scripts/presets/keyconfig/keymap_data/blender_default.py
+++ b/release/scripts/presets/keyconfig/keymap_data/blender_default.py
@@ -52,6 +52,8 @@ class Params:
"use_v3d_shade_ex_pie",
# Swap orbit/pan keys (for 2D workflows).
"use_v3d_mmb_pan",
+ # Alt click to access tools.
+ "use_alt_click_leader",
# Experimental option.
"use_pie_click_drag",
"v3d_tilde_action",
@@ -73,6 +75,7 @@ class Params:
use_v3d_tab_menu=False,
use_v3d_shade_ex_pie=False,
use_v3d_mmb_pan=False,
+ use_alt_click_leader=False,
use_pie_click_drag=False,
v3d_tilde_action='VIEW',
v3d_alt_mmb_drag_action='RELATIVE',
@@ -126,6 +129,7 @@ class Params:
self.v3d_tilde_action = v3d_tilde_action
self.v3d_alt_mmb_drag_action = v3d_alt_mmb_drag_action
+ self.use_alt_click_leader = use_alt_click_leader
self.use_pie_click_drag = use_pie_click_drag
if not use_pie_click_drag:
self.pie_value = 'PRESS'
@@ -449,11 +453,15 @@ def km_window(params):
op_menu("TOPBAR_MT_file_context_menu", {"type": 'F4', "value": 'PRESS'}),
# Pass through when when no tool-system exists or the fallback isn't available.
("wm.toolbar_fallback_pie", {"type": 'W', "value": 'PRESS', "alt": True}, None),
- # Alt as "Leader-Key".
- ("wm.toolbar_prompt", {"type": 'LEFT_ALT', "value": 'CLICK'}, None),
- ("wm.toolbar_prompt", {"type": 'RIGHT_ALT', "value": 'CLICK'}, None),
])
+ if params.use_alt_click_leader:
+ items.extend([
+ # Alt as "Leader-Key".
+ ("wm.toolbar_prompt", {"type": 'LEFT_ALT', "value": 'CLICK'}, None),
+ ("wm.toolbar_prompt", {"type": 'RIGHT_ALT', "value": 'CLICK'}, None),
+ ])
+
if params.spacebar_action == 'TOOL':
items.append(
("wm.toolbar", {"type": 'SPACE', "value": 'PRESS'}, None),
More information about the Bf-blender-cvs
mailing list