[Bf-blender-cvs] [fecce5dc094] blender-v2.92-release: Fix T85236: "Zoom to Mouse Position" inverts "Dolly View" direction

Campbell Barton noreply at git.blender.org
Sun Jan 31 09:45:07 CET 2021


Commit: fecce5dc09419a0aacfb20ff82005b0dcda3a254
Author: Campbell Barton
Date:   Sun Jan 31 19:36:25 2021 +1100
Branches: blender-v2.92-release
https://developer.blender.org/rBfecce5dc09419a0aacfb20ff82005b0dcda3a254

Fix T85236: "Zoom to Mouse Position" inverts "Dolly View" direction

===================================================================

M	source/blender/editors/space_view3d/view3d_edit.c

===================================================================

diff --git a/source/blender/editors/space_view3d/view3d_edit.c b/source/blender/editors/space_view3d/view3d_edit.c
index 56f0c0afccf..ab4e7be88fe 100644
--- a/source/blender/editors/space_view3d/view3d_edit.c
+++ b/source/blender/editors/space_view3d/view3d_edit.c
@@ -2628,9 +2628,10 @@ static int viewdolly_exec(bContext *C, wmOperator *op)
   /* overwrite the mouse vector with the view direction (zoom into the center) */
   if ((use_cursor_init && (U.uiflag & USER_ZOOM_TO_MOUSEPOS)) == 0) {
     normalize_v3_v3(mousevec, rv3d->viewinv[2]);
+    negate_v3(mousevec);
   }
 
-  view_dolly_to_vector_3d(region, rv3d->ofs, mousevec, delta < 0 ? 0.2f : 1.8f);
+  view_dolly_to_vector_3d(region, rv3d->ofs, mousevec, delta < 0 ? 1.8f : 0.2f);
 
   if (RV3D_LOCK_FLAGS(rv3d) & RV3D_BOXVIEW) {
     view3d_boxview_sync(area, region);



More information about the Bf-blender-cvs mailing list