Commit: f80f7afbf03af08a0255b353e1e775d51174763e
Author: Campbell Barton
Date:   Thu Feb 24 15:19:15 2022 +1100
Branches: blender-v3.1-release
https://developer.blender.org/rBf80f7afbf03af08a0255b353e1e775d51174763e

Fix 2D view NDOF panning requiring both axes to be non-zero

Possible fix for T86592.

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

M       source/blender/editors/interface/view2d_ops.c

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

diff --git a/source/blender/editors/interface/view2d_ops.c 
b/source/blender/editors/interface/view2d_ops.c
index 0d3c427bf39..62103e2cd63 100644
--- a/source/blender/editors/interface/view2d_ops.c
+++ b/source/blender/editors/interface/view2d_ops.c
@@ -1465,7 +1465,7 @@ static int view2d_ndof_invoke(bContext *C, wmOperator 
*op, const wmEvent *event)
   /* tune these until it feels right */
   const float zoom_sensitivity = 0.5f;
   const float speed = 10.0f; /* match view3d ortho */
-  const bool has_translate = (ndof->tvec[0] && ndof->tvec[1]) && 
view_pan_poll(C);
+  const bool has_translate = !is_zero_v2(ndof->tvec) && view_pan_poll(C);
   const bool has_zoom = (ndof->tvec[2] != 0.0f) && view_zoom_poll(C);
 
   if (has_translate) {

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
List details, subscription details or unsubscribe:
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to