From 41d607976c2b831ebe340c5dcdefbab97a5145bf Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Thu, 24 Feb 2022 17:58:11 +1100 Subject: Keymap: use 90 degree roll for NDOF roll shortcuts 3Dconnexion documentation states these buttons should roll 90 degrees. --- release/scripts/presets/keyconfig/keymap_data/blender_default.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'release/scripts') 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'}, -- cgit v1.2.3