[Bf-blender-cvs] [c2568394dd7] master: Fix T57203: Rotation overlaps scale gizmo handles

Campbell Barton noreply at git.blender.org
Wed May 15 08:34:25 CEST 2019


Commit: c2568394dd71853e67b607be5f0b10d24399421e
Author: Campbell Barton
Date:   Wed May 15 16:33:29 2019 +1000
Branches: master
https://developer.blender.org/rBc2568394dd71853e67b607be5f0b10d24399421e

Fix T57203: Rotation overlaps scale gizmo handles

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

M	source/blender/editors/transform/transform_gizmo_3d.c

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

diff --git a/source/blender/editors/transform/transform_gizmo_3d.c b/source/blender/editors/transform/transform_gizmo_3d.c
index 50610f1b3da..35fda39e8dc 100644
--- a/source/blender/editors/transform/transform_gizmo_3d.c
+++ b/source/blender/editors/transform/transform_gizmo_3d.c
@@ -1762,6 +1762,15 @@ static void WIDGETGROUP_gizmo_refresh(const bContext *C, wmGizmoGroup *gzgroup)
     }
   }
   MAN_ITER_AXES_END;
+
+  /* Ensure rotate disks don't overlap scale arrows, especially in ortho view. */
+  float rotate_select_bias = 0.0f;
+  if ((ggd->twtype & V3D_GIZMO_SHOW_OBJECT_SCALE) && ggd->twtype & V3D_GIZMO_SHOW_OBJECT_ROTATE) {
+    rotate_select_bias = -2.0f;
+  }
+  for (int i = MAN_AXIS_RANGE_ROT_START; i < MAN_AXIS_RANGE_ROT_END; i++) {
+    ggd->gizmos[i]->select_bias = rotate_select_bias;
+  }
 }
 
 static void WIDGETGROUP_gizmo_message_subscribe(const bContext *C,



More information about the Bf-blender-cvs mailing list