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:
Diffstat (limited to 'source/blender/editors/space_view3d/view3d_edit.c')
-rw-r--r--source/blender/editors/space_view3d/view3d_edit.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/source/blender/editors/space_view3d/view3d_edit.c b/source/blender/editors/space_view3d/view3d_edit.c
index 3ad194a5d2b..67f23012d10 100644
--- a/source/blender/editors/space_view3d/view3d_edit.c
+++ b/source/blender/editors/space_view3d/view3d_edit.c
@@ -1432,11 +1432,18 @@ static int ndof_orbit_zoom_invoke(bContext *C, wmOperator *op, const wmEvent *ev
}
}
else if ((U.ndof_flag & NDOF_MODE_ORBIT) || ED_view3d_offset_lock_check(v3d, rv3d)) {
+ /* Note: based on feedback from T67579, users want to have pan and orbit enabled at once.
+ * It's arguable that orbit shouldn't pan (since we have a pan only operator),
+ * so if there are users who like to separate orbit/pan operations - it can be a preference.
+ *
+ * Also, the 'orbit' and 'free' blocks of code are now very similar.
+ * these could be merged, keep separate until design issues are sorted out - Campbell. */
const bool has_rotation = NDOF_HAS_ROTATE;
+ const bool has_translate = !is_zero_v2(ndof->tvec) && NDOF_HAS_TRANSLATE;
const bool has_zoom = (ndof->tvec[2] != 0.0f);
- if (has_zoom) {
- view3d_ndof_pan_zoom(ndof, vod->sa, vod->ar, false, has_zoom);
+ if (has_translate || has_zoom) {
+ view3d_ndof_pan_zoom(ndof, vod->sa, vod->ar, has_translate, has_zoom);
xform_flag |= HAS_TRANSLATE;
}