Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <campbell@blender.org>2022-02-23 13:25:46 +0300
committerCampbell Barton <campbell@blender.org>2022-02-23 13:25:46 +0300
commit391c3848b1326db1c29fc5c5f791d732d7d282a3 (patch)
tree9c835b3618a8177b5b724454f635e0f19d0f171d /source/blender/editors/space_view3d
parent34294449059744ba4b3d4b16eb5fb14a48c16265 (diff)
NDOF: make camera view/pan behavior optional
User request since adding this option in: 51975b89edfcc02131f1f8248e1b3442ea2778fa When disabled, use the previous behavior when orbiting a camera view.
Diffstat (limited to 'source/blender/editors/space_view3d')
-rw-r--r--source/blender/editors/space_view3d/view3d_navigate_ndof.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/source/blender/editors/space_view3d/view3d_navigate_ndof.c b/source/blender/editors/space_view3d/view3d_navigate_ndof.c
index 67b48154e8c..6b77f464773 100644
--- a/source/blender/editors/space_view3d/view3d_navigate_ndof.c
+++ b/source/blender/editors/space_view3d/view3d_navigate_ndof.c
@@ -500,9 +500,11 @@ static int ndof_orbit_zoom_invoke(bContext *C, wmOperator *op, const wmEvent *ev
return OPERATOR_CANCELLED;
}
- const int camera_retval = view3d_ndof_cameraview_pan_zoom(C, event);
- if (camera_retval != OPERATOR_PASS_THROUGH) {
- return camera_retval;
+ if (U.ndof_flag & NDOF_CAMERA_PAN_ZOOM) {
+ const int camera_retval = view3d_ndof_cameraview_pan_zoom(C, event);
+ if (camera_retval != OPERATOR_PASS_THROUGH) {
+ return camera_retval;
+ }
}
const Depsgraph *depsgraph = CTX_data_ensure_evaluated_depsgraph(C);
@@ -619,9 +621,11 @@ static int ndof_pan_invoke(bContext *C, wmOperator *UNUSED(op), const wmEvent *e
return OPERATOR_CANCELLED;
}
- const int camera_retval = view3d_ndof_cameraview_pan_zoom(C, event);
- if (camera_retval != OPERATOR_PASS_THROUGH) {
- return camera_retval;
+ if (U.ndof_flag & NDOF_CAMERA_PAN_ZOOM) {
+ const int camera_retval = view3d_ndof_cameraview_pan_zoom(C, event);
+ if (camera_retval != OPERATOR_PASS_THROUGH) {
+ return camera_retval;
+ }
}
const Depsgraph *depsgraph = CTX_data_ensure_evaluated_depsgraph(C);