[Bf-blender-cvs] [dcf520cdad7] master: UI: increase size of scale gizmo circle
Campbell Barton
noreply at git.blender.org
Mon Jul 1 17:50:44 CEST 2019
Commit: dcf520cdad7903acb911a3da2cd62064a79208b5
Author: Campbell Barton
Date: Tue Jul 2 01:10:55 2019 +1000
Branches: master
https://developer.blender.org/rBdcf520cdad7903acb911a3da2cd62064a79208b5
UI: increase size of scale gizmo circle
The scale gizmo wasn't working usefully for uniform scale.
===================================================================
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 530abe6faff..2ad938e1d05 100644
--- a/source/blender/editors/transform/transform_gizmo_3d.c
+++ b/source/blender/editors/transform/transform_gizmo_3d.c
@@ -1489,7 +1489,12 @@ static GizmoGroup *gizmogroup_init(wmGizmoGroup *gzgroup)
ggd->gizmos[MAN_AXIS_ROT_T]->flag |= WM_GIZMO_SELECT_BACKGROUND;
/* Prevent axis gizmos overlapping the center point, see: T63744. */
- ggd->gizmos[MAN_AXIS_SCALE_C]->select_bias = ggd->gizmos[MAN_AXIS_TRANS_C]->select_bias = 2.0f;
+ ggd->gizmos[MAN_AXIS_TRANS_C]->select_bias = 2.0f;
+
+ ggd->gizmos[MAN_AXIS_SCALE_C]->select_bias = -2.0f;
+
+ /* Use 1/6 since this is '0.2' if the main scale is 1.2. */
+ RNA_float_set(ggd->gizmos[MAN_AXIS_SCALE_C]->ptr, "arc_inner_factor", 1.0 / 6.0);
return ggd;
}
@@ -1591,6 +1596,9 @@ static void gizmogroup_init_properties_from_twtype(wmGizmoGroup *gzgroup)
WM_gizmo_set_flag(axis, WM_GIZMO_DRAW_VALUE, true);
WM_gizmo_set_scale(axis, 1.2f);
}
+ else if (axis_idx == MAN_AXIS_SCALE_C) {
+ WM_gizmo_set_scale(axis, 1.2f);
+ }
else {
WM_gizmo_set_scale(axis, 0.2f);
}
More information about the Bf-blender-cvs
mailing list