Fix #115253: NDOF zoom-speed depends on selected objects

Recent refactor to viewport navigation caused a regression where
"Orbit Around Selected" logic to impacted "Free" NDOF navigation logic.

Resolve by disabling orbit around selection with "Free" navigation.
This commit is contained in:
Campbell Barton
2023-12-06 13:12:56 +11:00
parent 8b26ad0a8a
commit 3eaf2b2e50

View File

@@ -253,6 +253,14 @@ void ViewOpsData::init_navigation(bContext *C,
&ViewOpsType_ndof_all))
{
calc_rv3d_dist = false;
/* When using "Free" NDOF navigation, ignore "Orbit Around Selected" preference.
* Logically it doesn't make sense to use the selection as a pivot when the first-person
* navigation pivots from the view-point. This also interferes with zoom-speed,
* causing zoom-speed scale based on the distance to the selection center, see: #115253. */
if ((U.ndof_flag & NDOF_MODE_ORBIT) == 0) {
viewops_flag &= ~VIEWOPS_FLAG_ORBIT_SELECT;
}
}
#endif