diff options
author | Campbell Barton <ideasman42@gmail.com> | 2019-11-28 07:06:04 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2019-11-28 07:09:27 +0300 |
commit | 6288dbffb6c1f98a04f7c25ed96caa963e5c8819 (patch) | |
tree | 8417570a7730115e45ff2e133106fdb1e9abd611 /source/blender/editors/space_view3d | |
parent | 4659fa547166b589cc8e3aef4b8dc699d95547df (diff) |
NDOF: support panning when orbiting
Also make orbit the default rotation mode.
Based on feedback from T67579, this seems one of the main
pain points users are experiencing.
Diffstat (limited to 'source/blender/editors/space_view3d')
-rw-r--r-- | source/blender/editors/space_view3d/view3d_edit.c | 11 |
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; } |