NDOF: allow panning in view3d.ndof_orbit_zoom, but forward is still zoom

This makes it so NDOF without any modifiers pressed can pan and orbit
which means you have full 6dof, however if you only want to orbit+zoom
that works as before.

also change logic so rotation is disabled for axis views (orbit operator
will exit axis views still, as with mouse orbit)
This commit is contained in:
Campbell Barton
2014-02-17 22:05:10 +11:00
parent aa0aa73703
commit d8d7d8e1e3

View File

@@ -1435,9 +1435,9 @@ static int ndof_orbit_zoom_invoke(bContext *C, wmOperator *op, const wmEvent *ev
rv3d->rot_angle = 0.0f;
if (ndof->progress != P_FINISHING) {
const bool has_rotation = NDOF_HAS_ROTATE;
const bool has_rotation = NDOF_HAS_ROTATE && (RV3D_VIEW_IS_AXIS(rv3d->view) == false);
/* if we can't rotate, fallback to translate (locked axis views) */
const bool has_translate = NDOF_HAS_TRANSLATE && (rv3d->viewlock & RV3D_LOCKED);
const bool has_translate = NDOF_HAS_TRANSLATE;
/* always zoom since this is the main purpose of the function */
const bool has_zoom = true;