Commit: 3d015c71ccbc7501a56e05727f744a60c13bde12
Author: Campbell Barton
Date:   Fri Nov 22 17:23:24 2019 +1100
Branches: master
https://developer.blender.org/rB3d015c71ccbc7501a56e05727f744a60c13bde12

Gizmo: show extrude gizmos with dark '+' instead of negative space

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

M       source/blender/editors/mesh/editmesh_extrude_spin_gizmo.c
M       source/blender/editors/transform/transform_gizmo_extrude_3d.c

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

diff --git a/source/blender/editors/mesh/editmesh_extrude_spin_gizmo.c 
b/source/blender/editors/mesh/editmesh_extrude_spin_gizmo.c
index 993898bddd5..af46d83265e 100644
--- a/source/blender/editors/mesh/editmesh_extrude_spin_gizmo.c
+++ b/source/blender/editors/mesh/editmesh_extrude_spin_gizmo.c
@@ -103,11 +103,8 @@ typedef struct GizmoGroupData_SpinInit {
 #define INIT_SCALE_BUTTON 0.15f
 
 static const uchar shape_plus[] = {
-    0x5f, 0xfb, 0x40, 0xee, 0x25, 0xda, 0x11, 0xbf, 0x4,  0xa0, 0x0,  0x80, 
0x4,  0x5f, 0x11, 0x40,
-    0x25, 0x25, 0x40, 0x11, 0x5f, 0x4,  0x7f, 0x0,  0xa0, 0x4,  0xbf, 0x11, 
0xda, 0x25, 0xee, 0x40,
-    0xfb, 0x5f, 0xff, 0x7f, 0xfb, 0xa0, 0xee, 0xbf, 0xda, 0xda, 0xbf, 0xee, 
0xa0, 0xfb, 0x80, 0xff,
-    0x6e, 0xd7, 0x92, 0xd7, 0x92, 0x90, 0xd8, 0x90, 0xd8, 0x6d, 0x92, 0x6d, 
0x92, 0x27, 0x6e, 0x27,
-    0x6e, 0x6d, 0x28, 0x6d, 0x28, 0x90, 0x6e, 0x90, 0x6e, 0xd7, 0x80, 0xff, 
0x5f, 0xfb, 0x5f, 0xfb,
+    0x73, 0x73, 0x73, 0x36, 0x8c, 0x36, 0x8c, 0x73, 0xc9, 0x73, 0xc9, 0x8c, 
0x8c,
+    0x8c, 0x8c, 0xc9, 0x73, 0xc9, 0x73, 0x8c, 0x36, 0x8c, 0x36, 0x73, 0x36, 
0x73,
 };
 
 static void gizmo_mesh_spin_init_setup(const bContext *UNUSED(C), wmGizmoGroup 
*gzgroup)
@@ -130,6 +127,8 @@ static void gizmo_mesh_spin_init_setup(const bContext 
*UNUSED(C), wmGizmoGroup *
       RNA_property_string_set_bytes(
           gz->ptr, prop, (const char *)shape_plus, ARRAY_SIZE(shape_plus));
 
+      RNA_enum_set(gz->ptr, "draw_options", ED_GIZMO_BUTTON_SHOW_BACKDROP);
+
       float color[4];
       UI_GetThemeColor3fv(TH_AXIS_X + i, color);
       color[3] = alpha;
diff --git a/source/blender/editors/transform/transform_gizmo_extrude_3d.c 
b/source/blender/editors/transform/transform_gizmo_extrude_3d.c
index a327cc941d5..513a8afa9b6 100644
--- a/source/blender/editors/transform/transform_gizmo_extrude_3d.c
+++ b/source/blender/editors/transform/transform_gizmo_extrude_3d.c
@@ -61,11 +61,8 @@ static const float extrude_arrow_normal_axis_scale = 1.0f;
 static const float extrude_dial_scale = 0.2;
 
 static const uchar shape_plus[] = {
-    0x5f, 0xfb, 0x40, 0xee, 0x25, 0xda, 0x11, 0xbf, 0x4,  0xa0, 0x0,  0x80, 
0x4,  0x5f, 0x11, 0x40,
-    0x25, 0x25, 0x40, 0x11, 0x5f, 0x4,  0x7f, 0x0,  0xa0, 0x4,  0xbf, 0x11, 
0xda, 0x25, 0xee, 0x40,
-    0xfb, 0x5f, 0xff, 0x7f, 0xfb, 0xa0, 0xee, 0xbf, 0xda, 0xda, 0xbf, 0xee, 
0xa0, 0xfb, 0x80, 0xff,
-    0x6e, 0xd7, 0x92, 0xd7, 0x92, 0x90, 0xd8, 0x90, 0xd8, 0x6d, 0x92, 0x6d, 
0x92, 0x27, 0x6e, 0x27,
-    0x6e, 0x6d, 0x28, 0x6d, 0x28, 0x90, 0x6e, 0x90, 0x6e, 0xd7, 0x80, 0xff, 
0x5f, 0xfb, 0x5f, 0xfb,
+    0x73, 0x73, 0x73, 0x36, 0x8c, 0x36, 0x8c, 0x73, 0xc9, 0x73, 0xc9, 0x8c, 
0x8c,
+    0x8c, 0x8c, 0xc9, 0x73, 0xc9, 0x73, 0x8c, 0x36, 0x8c, 0x36, 0x73, 0x36, 
0x73,
 };
 
 typedef struct GizmoExtrudeGroup {
@@ -327,16 +324,19 @@ static void gizmo_mesh_extrude_refresh(const bContext *C, 
wmGizmoGroup *gzgroup)
     for (int i = 0; i < 4; i++) {
       RNA_enum_set(ggd->invoke_xyz_no[i]->ptr,
                    "draw_options",
-                   ((gz_adjust == ggd->adjust[0]) &&
-                    dot_v3v3(ggd->adjust[0]->matrix_basis[2],
-                             ggd->invoke_xyz_no[i]->matrix_offset[3]) > 0.98f) 
?
-                       0 :
-                       ED_GIZMO_BUTTON_SHOW_HELPLINE);
+                   ED_GIZMO_BUTTON_SHOW_BACKDROP |
+                       (((gz_adjust == ggd->adjust[0]) &&
+                         dot_v3v3(ggd->adjust[0]->matrix_basis[2],
+                                  ggd->invoke_xyz_no[i]->matrix_offset[3]) > 
0.98f) ?
+                            0 :
+                            ED_GIZMO_BUTTON_SHOW_HELPLINE));
     }
   }
   else {
     for (int i = 0; i < 4; i++) {
-      RNA_enum_set(ggd->invoke_xyz_no[i]->ptr, "draw_options", 
ED_GIZMO_BUTTON_SHOW_HELPLINE);
+      RNA_enum_set(ggd->invoke_xyz_no[i]->ptr,
+                   "draw_options",
+                   ED_GIZMO_BUTTON_SHOW_BACKDROP | 
ED_GIZMO_BUTTON_SHOW_HELPLINE);
     }
   }

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to