diff options
author | Campbell Barton <ideasman42@gmail.com> | 2014-02-18 04:33:40 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2014-02-18 04:57:48 +0400 |
commit | c4bebc06325abf3a7420d5d07d9bf29b1a6f578b (patch) | |
tree | 70bf974144dfc16efee21ae3285373ade5c09dfc /source/blender/editors/space_clip/clip_ops.c | |
parent | c67b9f4c3774d72d160901b3d410a685ae8e2359 (diff) |
NDOF: fix for broken zoom invert for image and clip editor
also match zoom speed with 3d view
Diffstat (limited to 'source/blender/editors/space_clip/clip_ops.c')
-rw-r--r-- | source/blender/editors/space_clip/clip_ops.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/source/blender/editors/space_clip/clip_ops.c b/source/blender/editors/space_clip/clip_ops.c index c8eadf952d0..64d96152ba5 100644 --- a/source/blender/editors/space_clip/clip_ops.c +++ b/source/blender/editors/space_clip/clip_ops.c @@ -1340,7 +1340,6 @@ static int clip_view_ndof_invoke(bContext *C, wmOperator *UNUSED(op), const wmEv float dt = ndof->dt; /* tune these until it feels right */ - const float zoom_sensitivity = 0.5f; /* 50% per second (I think) */ const float pan_sensitivity = 300.0f; /* screen pixels per second */ /* "mouse zoom" factor = 1 + (dx + dy) / 300 @@ -1349,7 +1348,7 @@ static int clip_view_ndof_invoke(bContext *C, wmOperator *UNUSED(op), const wmEv * move forward -> factor > 1 * move backward -> factor < 1 */ - float zoom_factor = 1.0f + zoom_sensitivity * dt * - ndof->tvec[2]; + float zoom_factor = dt * - ndof->tvec[2]; pan_vec[0] = ndof->tvec[0] * ((U.ndof_flag & NDOF_PANX_INVERT_AXIS) ? -1.0f : 1.0f); pan_vec[1] = ndof->tvec[1] * ((U.ndof_flag & NDOF_PANY_INVERT_AXIS) ? -1.0f : 1.0f); @@ -1359,7 +1358,7 @@ static int clip_view_ndof_invoke(bContext *C, wmOperator *UNUSED(op), const wmEv if (U.ndof_flag & NDOF_ZOOM_INVERT) zoom_factor = -zoom_factor; - sclip_zoom_set_factor(C, zoom_factor, NULL); + sclip_zoom_set_factor(C, 1.0f + zoom_factor, NULL); sc->xof += pan_vec[0]; sc->yof += pan_vec[1]; |