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 <campbell@blender.org>2022-02-24 09:58:11 +0300
committerCampbell Barton <campbell@blender.org>2022-02-24 10:00:18 +0300
commit41d607976c2b831ebe340c5dcdefbab97a5145bf (patch)
tree1d8bf077e3b2847f8548a41f97d003f332f4609e /release/scripts
parent13efaa8a09ab805c81164bc04a7ac4cc2c40bd1c (diff)
Keymap: use 90 degree roll for NDOF roll shortcuts
3Dconnexion documentation states these buttons should roll 90 degrees.
Diffstat (limited to 'release/scripts')
-rw-r--r--release/scripts/presets/keyconfig/keymap_data/blender_default.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/release/scripts/presets/keyconfig/keymap_data/blender_default.py b/release/scripts/presets/keyconfig/keymap_data/blender_default.py
index 0f131b0d33f..5fb0f052154 100644
--- a/release/scripts/presets/keyconfig/keymap_data/blender_default.py
+++ b/release/scripts/presets/keyconfig/keymap_data/blender_default.py
@@ -208,6 +208,9 @@ class Params:
# ------------------------------------------------------------------------------
# Constants
+from math import pi
+pi_2 = pi / 2.0
+
# Physical layout.
NUMBERS_1 = ('ONE', 'TWO', 'THREE', 'FOUR', 'FIVE', 'SIX', 'SEVEN', 'EIGHT', 'NINE', 'ZERO')
# Numeric order.
@@ -1409,7 +1412,7 @@ def km_view3d(params):
("view3d.view_roll", {"type": 'NUMPAD_6', "value": 'PRESS', "shift": True, "repeat": True},
{"properties": [("type", 'RIGHT')]}),
("view3d.view_orbit", {"type": 'NUMPAD_9', "value": 'PRESS'},
- {"properties": [("angle", 3.1415927), ("type", 'ORBITRIGHT')]}),
+ {"properties": [("angle", pi), ("type", 'ORBITRIGHT')]}),
("view3d.view_axis", {"type": 'NUMPAD_1', "value": 'PRESS', "shift": True},
{"properties": [("type", 'FRONT'), ("align_active", True)]}),
("view3d.view_axis", {"type": 'NUMPAD_3', "value": 'PRESS', "shift": True},
@@ -1454,9 +1457,9 @@ def km_view3d(params):
("view3d.view_selected", {"type": 'NDOF_BUTTON_FIT', "value": 'PRESS'},
{"properties": [("use_all_regions", False)]}),
("view3d.view_roll", {"type": 'NDOF_BUTTON_ROLL_CW', "value": 'PRESS'},
- {"properties": [("type", 'LEFT')]}),
+ {"properties": [("angle", pi_2)]}),
("view3d.view_roll", {"type": 'NDOF_BUTTON_ROLL_CCW', "value": 'PRESS'},
- {"properties": [("type", 'RIGHT')]}),
+ {"properties": [("angle", -pi_2)]}),
("view3d.view_axis", {"type": 'NDOF_BUTTON_FRONT', "value": 'PRESS'},
{"properties": [("type", 'FRONT')]}),
("view3d.view_axis", {"type": 'NDOF_BUTTON_BACK', "value": 'PRESS'},