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:
authorMike Erwin <significant.bit@gmail.com>2011-06-28 00:12:10 +0400
committerMike Erwin <significant.bit@gmail.com>2011-06-28 00:12:10 +0400
commitedd5980436cdfe9ca7a7a2a75b6dff2129b72275 (patch)
tree3bab951909c945fae8834489811a312a7be14144 /source/blender/editors/space_image
parentb8e8f8064dd14a0031cbef50d89c13c868c910cd (diff)
now using blender view coordinates for ndof input -- core and Linux in place
Diffstat (limited to 'source/blender/editors/space_image')
-rw-r--r--source/blender/editors/space_image/image_ops.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/source/blender/editors/space_image/image_ops.c b/source/blender/editors/space_image/image_ops.c
index fc7b84e21ae..77fb129e278 100644
--- a/source/blender/editors/space_image/image_ops.c
+++ b/source/blender/editors/space_image/image_ops.c
@@ -440,7 +440,7 @@ void IMAGE_OT_view_zoom(wmOperatorType *ot)
/********************** NDOF operator *********************/
/* Combined pan/zoom from a 3D mouse device.
- * Y zooms, XZ pans
+ * Z zooms, XY pans
* "view" (not "paper") control -- user moves the viewpoint, not the image being viewed
* that explains the negative signs in the code below
*/
@@ -461,8 +461,8 @@ static int view_ndof_invoke(bContext *C, wmOperator *op, wmEvent *event)
const float zoom_sensitivity = 0.5f;
const float pan_sensitivity = 300.f;
- float pan_x = pan_sensitivity * dt * -ndof->tx / sima->zoom;
- float pan_y = pan_sensitivity * dt * -ndof->tz / sima->zoom;
+ float pan_x = pan_sensitivity * dt * ndof->tx / sima->zoom;
+ float pan_y = pan_sensitivity * dt * ndof->ty / sima->zoom;
/* "mouse zoom" factor = 1 + (dx + dy) / 300
* what about "ndof zoom" factor? should behave like this:
@@ -470,7 +470,7 @@ static int view_ndof_invoke(bContext *C, wmOperator *op, wmEvent *event)
* move forward -> factor > 1
* move backward -> factor < 1
*/
- float zoom_factor = 1.f + zoom_sensitivity * dt * -ndof->ty;
+ float zoom_factor = 1.f + zoom_sensitivity * dt * -ndof->tz;
sima_zoom_set_factor(sima, ar, zoom_factor);
sima->xof += pan_x;