diff options
author | Campbell Barton <ideasman42@gmail.com> | 2018-09-19 10:50:31 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2018-09-19 10:52:13 +0300 |
commit | 574484006bfae749becff1ac8703695b3fba2355 (patch) | |
tree | 00f5017b76ffd5e2f994433de428c8101e4e7366 /source/blender | |
parent | ba38206608e547d7a46d21386ebdfb4541bdd192 (diff) |
EditMesh: show the spin arc as a thin ribbon
Closer to the design from T54661
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/editors/include/ED_gizmo_library.h | 1 | ||||
-rw-r--r-- | source/blender/editors/mesh/editmesh_extrude_spin_gizmo.c | 9 |
2 files changed, 6 insertions, 4 deletions
diff --git a/source/blender/editors/include/ED_gizmo_library.h b/source/blender/editors/include/ED_gizmo_library.h index 610127269a3..983f3b89771 100644 --- a/source/blender/editors/include/ED_gizmo_library.h +++ b/source/blender/editors/include/ED_gizmo_library.h @@ -190,6 +190,7 @@ enum { ED_GIZMO_DIAL_DRAW_FLAG_FILL = (1 << 1), ED_GIZMO_DIAL_DRAW_FLAG_ANGLE_MIRROR = (1 << 2), ED_GIZMO_DIAL_DRAW_FLAG_ANGLE_START_Y = (1 << 3), + /* Always show the angle value as an arc in the dial. */ ED_GIZMO_DIAL_DRAW_FLAG_ANGLE_VALUE = (1 << 4), }; diff --git a/source/blender/editors/mesh/editmesh_extrude_spin_gizmo.c b/source/blender/editors/mesh/editmesh_extrude_spin_gizmo.c index 8b3a6cb98e2..4f3f6c76783 100644 --- a/source/blender/editors/mesh/editmesh_extrude_spin_gizmo.c +++ b/source/blender/editors/mesh/editmesh_extrude_spin_gizmo.c @@ -325,8 +325,8 @@ static void gizmo_mesh_spin_redo_update_from_op(GizmoGroupData_SpinRedo *ggd) WM_gizmo_set_scale(ggd->translate_c, 0.2); - WM_gizmo_set_scale(ggd->angle_z, 1.5f); - WM_gizmo_set_line_width(ggd->angle_z, 2.0f); + WM_gizmo_set_scale(ggd->angle_z, 2.0f); + WM_gizmo_set_line_width(ggd->angle_z, 1.0f); RegionView3D *rv3d = ED_view3d_context_rv3d(ggd->data.context); if (rv3d) { @@ -581,14 +581,15 @@ static void gizmo_mesh_spin_redo_setup(const bContext *C, wmGizmoGroup *gzgroup) UI_GetThemeColor3fv(TH_GIZMO_PRIMARY, ggd->translate_z->color); UI_GetThemeColor3fv(TH_GIZMO_PRIMARY, ggd->translate_c->color); UI_GetThemeColor3fv(TH_GIZMO_SECONDARY, ggd->rotate_c->color); - UI_GetThemeColor3fv(TH_AXIS_Z, ggd->angle_z->color); - + copy_v3_v3(ggd->angle_z->color, ggd->angle_z->color_hi); + ggd->angle_z->color[3] = 0.5f; RNA_enum_set(ggd->translate_z->ptr, "draw_style", ED_GIZMO_ARROW_STYLE_NORMAL); RNA_enum_set(ggd->translate_c->ptr, "draw_style", ED_GIZMO_MOVE_STYLE_RING_2D); RNA_boolean_set(ggd->angle_z->ptr, "wrap_angle", false); RNA_enum_set(ggd->angle_z->ptr, "draw_options", ED_GIZMO_DIAL_DRAW_FLAG_ANGLE_VALUE); + RNA_float_set(ggd->angle_z->ptr, "arc_inner_factor", 0.9f); WM_gizmo_set_flag(ggd->translate_c, WM_GIZMO_DRAW_VALUE, true); WM_gizmo_set_flag(ggd->rotate_c, WM_GIZMO_DRAW_VALUE, true); |