[Bf-blender-cvs] [839ece64772] blender-v3.3-release: Fix T100411: Invert Axis Pan option ignored for Lock Camera Pan/Zoom
Campbell Barton
noreply at git.blender.org
Wed Aug 17 09:07:12 CEST 2022
Commit: 839ece6477203382b7a7483062961540180ff1cd
Author: Campbell Barton
Date: Wed Aug 17 17:06:09 2022 +1000
Branches: blender-v3.3-release
https://developer.blender.org/rB839ece6477203382b7a7483062961540180ff1cd
Fix T100411: Invert Axis Pan option ignored for Lock Camera Pan/Zoom
===================================================================
M source/blender/editors/space_view3d/view3d_navigate_ndof.c
===================================================================
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;
}
More information about the Bf-blender-cvs
mailing list