diff options
author | Campbell Barton <campbell@blender.org> | 2022-08-17 10:07:31 +0300 |
---|---|---|
committer | Campbell Barton <campbell@blender.org> | 2022-08-17 10:07:31 +0300 |
commit | a078262804c6ce82f91110c46ca2947ebb036f14 (patch) | |
tree | 8bf8088b31d90e61b94337b5486cef1b6c2694bc /source/blender/editors/space_view3d | |
parent | a123fc9e224a3b379ddd0e587aa72859f783b130 (diff) | |
parent | 839ece6477203382b7a7483062961540180ff1cd (diff) |
Merge branch 'blender-v3.3-release'
Diffstat (limited to 'source/blender/editors/space_view3d')
-rw-r--r-- | source/blender/editors/space_view3d/view3d_navigate_ndof.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/source/blender/editors/space_view3d/view3d_navigate_ndof.c b/source/blender/editors/space_view3d/view3d_navigate_ndof.c index 1ce9bdcb211..88abf602c26 100644 --- a/source/blender/editors/space_view3d/view3d_navigate_ndof.c +++ b/source/blender/editors/space_view3d/view3d_navigate_ndof.c @@ -373,6 +373,9 @@ static int view3d_ndof_cameraview_pan_zoom(bContext *C, const wmEvent *event) const bool has_translate = !is_zero_v2(ndof->tvec); const bool has_zoom = ndof->tvec[2] != 0.0f; + float pan_vec[3]; + WM_event_ndof_pan_get(ndof, pan_vec, true); + /* NOTE(@campbellbarton): In principle rotating could pass through to regular * non-camera NDOF behavior (exiting the camera-view and rotating). * Disabled this block since in practice it's difficult to control NDOF devices @@ -388,14 +391,14 @@ static int view3d_ndof_cameraview_pan_zoom(bContext *C, const wmEvent *event) if (has_translate) { const float speed = ndof->dt * NDOF_PIXELS_PER_SECOND; - float event_ofs[2] = {ndof->tvec[0] * speed, ndof->tvec[1] * speed}; + float event_ofs[2] = {pan_vec[0] * speed, pan_vec[1] * speed}; if (ED_view3d_camera_view_pan(region, event_ofs)) { changed = true; } } if (has_zoom) { - const float scale = 1.0f + (ndof->dt * ndof->tvec[2]); + const float scale = 1.0f + (ndof->dt * pan_vec[2]); if (ED_view3d_camera_view_zoom_scale(rv3d, scale)) { changed = true; } |