[Bf-blender-cvs] [574484006bf] blender2.8: EditMesh: show the spin arc as a thin ribbon

Campbell Barton noreply at git.blender.org
Wed Sep 19 09:40:09 CEST 2018


Commit: 574484006bfae749becff1ac8703695b3fba2355
Author: Campbell Barton
Date:   Wed Sep 19 17:50:31 2018 +1000
Branches: blender2.8
https://developer.blender.org/rB574484006bfae749becff1ac8703695b3fba2355

EditMesh: show the spin arc as a thin ribbon

Closer to the design from T54661

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

M	source/blender/editors/include/ED_gizmo_library.h
M	source/blender/editors/mesh/editmesh_extrude_spin_gizmo.c

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

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);



More information about the Bf-blender-cvs mailing list