NDOF: simplify the UI and preferences

- Navigation modes has been redefined a bit and introduced in a form of
  an enum so that new ones can me implemented in the future.
  Additionally switching between modes shouldn't require any additional
  configurations like inverting all the axes.
  Currently there are only 2 modes implemented,
  but 2 more are planned and will be proposed in follow-up PRs.
  Implemented modes are:

  - Object: works like "Orbit" option.
    but has all axes implicitly inverted
  - Fly: works the same as "Free".

- "Turntable" option has been turned into "Lock Horizon".
  This single option works for both normal navigation and Fly/Walk
  modes now.
- Pan and Rotation axes inversion has been removed from default
  configuration.
- UI has been simplified following the design from #136880.
- Zoom Invert has been removed since it looks like a duplication of
  `NDOF_PANZ_INVERT`.

Ref !139343
This commit is contained in:
Kamil Galik
2025-06-05 20:30:29 +10:00
committed by Campbell Barton
parent b89c36f0e7
commit 64696cc699
13 changed files with 143 additions and 97 deletions

View File

@@ -157,13 +157,8 @@ const UserDef U_default = {
.ndof_sensitivity = 4.0,
.ndof_orbit_sensitivity = 4.0,
.ndof_deadzone = 0.0,
.ndof_flag = (NDOF_SHOW_GUIDE_ORBIT_CENTER | NDOF_ORBIT_CENTER_AUTO | NDOF_MODE_ORBIT |
NDOF_LOCK_HORIZON | NDOF_SHOULD_PAN | NDOF_SHOULD_ZOOM | NDOF_SHOULD_ROTATE |
/* Software from the driver authors follows this convention
* so invert this by default, see: #67579. */
NDOF_ROTX_INVERT_AXIS | NDOF_ROTY_INVERT_AXIS | NDOF_ROTZ_INVERT_AXIS |
NDOF_PANX_INVERT_AXIS | NDOF_PANY_INVERT_AXIS | NDOF_PANZ_INVERT_AXIS |
NDOF_ZOOM_INVERT | NDOF_CAMERA_PAN_ZOOM),
.ndof_flag = (NDOF_SHOW_GUIDE_ORBIT_CENTER | NDOF_ORBIT_CENTER_AUTO | NDOF_LOCK_HORIZON |
NDOF_SHOULD_PAN | NDOF_SHOULD_ZOOM | NDOF_SHOULD_ROTATE | NDOF_CAMERA_PAN_ZOOM),
.image_draw_method = IMAGE_DRAW_METHOD_AUTO,
.glalphaclip = 0.004,
.autokey_mode = (AUTOKEY_MODE_NORMAL & ~AUTOKEY_ON),