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:
authorCampbell Barton <ideasman42@gmail.com>2019-07-01 18:10:55 +0300
committerCampbell Barton <ideasman42@gmail.com>2019-07-01 18:48:58 +0300
commitdcf520cdad7903acb911a3da2cd62064a79208b5 (patch)
treef392edd74bec829ccae1efaa17820057406b9791 /source/blender/editors/transform/transform_gizmo_3d.c
parent016d5cf919481b18917656a774c015fd645a35bb (diff)
UI: increase size of scale gizmo circle
The scale gizmo wasn't working usefully for uniform scale.
Diffstat (limited to 'source/blender/editors/transform/transform_gizmo_3d.c')
-rw-r--r--source/blender/editors/transform/transform_gizmo_3d.c10
1 files changed, 9 insertions, 1 deletions
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);
}