Keymap: use 90 degree roll for NDOF roll shortcuts

3Dconnexion documentation states these buttons should roll 90 degrees.
This commit is contained in:
Campbell Barton 2022-02-24 17:58:11 +11:00
parent 13efaa8a09
commit 41d607976c
1 changed files with 6 additions and 3 deletions

View File

@ -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'},