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 <ideasman42@gmail.com>2021-06-02 14:32:25 +0300
committerCampbell Barton <ideasman42@gmail.com>2021-06-02 14:34:30 +0300
commitf92f5d1ac62c66ceb7a6ac1ff69084fbd5e3614a (patch)
tree22e35e8885607039e5b6de01eedbde6be6691d02 /release
parent69e15eb1e4a520764ca30c82dcadffe42c96707e (diff)
Keymap: use D-Key for view-pie menu
Use the D-key to access the view menu instead of the Tilda key, which isn't accessible on some international layouts. To resolve the conflicts the following changes have been made. - `D` (motion) opens the view menu. - `D` (mouse-button) uses grease-pencil (as it does currently). - `Tilda` is used to for "Object Mode Transfer" instead of the View menu. See T88092 for details. Reviewed By: Severin Ref D11189
Diffstat (limited to 'release')
-rw-r--r--release/scripts/presets/keyconfig/Blender.py6
-rw-r--r--release/scripts/presets/keyconfig/keymap_data/blender_default.py40
2 files changed, 32 insertions, 14 deletions
diff --git a/release/scripts/presets/keyconfig/Blender.py b/release/scripts/presets/keyconfig/Blender.py
index eb66c961472..222ee43432f 100644
--- a/release/scripts/presets/keyconfig/Blender.py
+++ b/release/scripts/presets/keyconfig/Blender.py
@@ -103,8 +103,8 @@ class Prefs(bpy.types.KeyConfigPreferences):
v3d_tilde_action: EnumProperty(
name="Tilde Action",
items=(
- ('VIEW', "Navigate",
- "View operations (useful for keyboards without a numpad)",
+ ('OBJECT_SWITCH', "Object Switch",
+ "Switch the active object under the cursor (when not in object mode)",
0),
('GIZMO', "Gizmos",
"Control transform gizmos",
@@ -113,7 +113,7 @@ class Prefs(bpy.types.KeyConfigPreferences):
description=(
"Action when 'Tilde' is pressed"
),
- default='VIEW',
+ default='OBJECT_SWITCH',
update=update_fn,
)
diff --git a/release/scripts/presets/keyconfig/keymap_data/blender_default.py b/release/scripts/presets/keyconfig/keymap_data/blender_default.py
index d63ae7a2745..c476d488724 100644
--- a/release/scripts/presets/keyconfig/keymap_data/blender_default.py
+++ b/release/scripts/presets/keyconfig/keymap_data/blender_default.py
@@ -1078,17 +1078,11 @@ def km_view3d(params):
{"properties": [("use_all_regions", True), ("center", False)]}),
("view3d.view_all", {"type": 'C', "value": 'PRESS', "shift": True},
{"properties": [("center", True)]}),
- op_menu_pie(
- "VIEW3D_MT_view_pie" if params.v3d_tilde_action == 'VIEW' else "VIEW3D_MT_transform_gizmo_pie",
- {"type": 'ACCENT_GRAVE', "value": params.pie_value},
- ),
- *(() if not params.use_pie_click_drag else
- (("view3d.navigate", {"type": 'ACCENT_GRAVE', "value": 'CLICK'}, None),)),
- ("view3d.navigate", {"type": 'ACCENT_GRAVE', "value": 'PRESS', "shift": True}, None),
+ op_menu_pie("VIEW3D_MT_view_pie", {"type": 'D', "value": 'CLICK_DRAG'}),
# Numpad views.
("view3d.view_camera", {"type": 'NUMPAD_0', "value": 'PRESS'}, None),
- ("view3d.view_axis", {"type": 'NUMPAD_1', "value": 'PRESS'},
- {"properties": [("type", 'FRONT')]}),
+ ("view3d.view_axis", {"type": 'NUMPAD_1', "value": 'PRESS'},
+ {"properties": [("type", 'FRONT')]}),
("view3d.view_orbit", {"type": 'NUMPAD_2', "value": 'PRESS', "repeat": True},
{"properties": [("type", 'ORBITDOWN')]}),
("view3d.view_axis", {"type": 'NUMPAD_3', "value": 'PRESS'},
@@ -1327,6 +1321,32 @@ def km_view3d(params):
op_tool_cycle("builtin.select_box", {"type": 'W', "value": 'PRESS'}),
])
+ # Tilda key.
+ if params.use_pie_click_drag:
+ items.extend([
+ ("object.transfer_mode",
+ {"type": 'ACCENT_GRAVE', "value": 'CLICK' if params.use_pie_click_drag else 'PRESS'},
+ None),
+ op_menu_pie(
+ "VIEW3D_MT_transform_gizmo_pie",
+ {"type": 'ACCENT_GRAVE', "value": 'CLICK_DRAG'},
+ )
+ ])
+ else:
+ if params.v3d_tilde_action == 'OBJECT_SWITCH':
+ items.append(
+ ("object.transfer_mode",
+ {"type": 'ACCENT_GRAVE', "value": 'PRESS'},
+ {"properties": [("use_eyedropper", False)]})
+ )
+ else:
+ items.append(
+ op_menu_pie(
+ "VIEW3D_MT_transform_gizmo_pie",
+ {"type": 'ACCENT_GRAVE', "value": 'PRESS'},
+ )
+ )
+
return keymap
@@ -4484,8 +4504,6 @@ def km_sculpt(params):
)
items.extend([
- # Transfer Sculpt Mode (release to avoid conflict with grease pencil drawing).
- ("object.transfer_mode", {"type": 'D', "value": 'RELEASE'}, None),
# Brush strokes
("sculpt.brush_stroke", {"type": 'LEFTMOUSE', "value": 'PRESS'},
{"properties": [("mode", 'NORMAL')]}),