GPencil: Set alpha to 1 for all materials in SOLID mode
authorAntonioya <blendergit@gmail.com>
Sat, 2 Mar 2019 13:28:44 +0000 (14:28 +0100)
committerAntonioya <blendergit@gmail.com>
Sat, 2 Mar 2019 13:28:44 +0000 (14:28 +0100)
To be consistent, the alpha must be set to 1 when solid mode is enabled.

source/blender/draw/engines/gpencil/gpencil_draw_utils.c

index 3b2d5ec..c4d7da2 100644 (file)
@@ -342,6 +342,11 @@ static void set_wireframe_color(Object *ob, bGPDlayer *gpl, View3D *v3d,
        else {
                copy_v4_v4(stl->shgroups[id].wire_color, color);
        }
+
+       /* if solid, the alpha must be set to 1.0 */
+       if (stl->shgroups[id].shading_type[0] == OB_SOLID) {
+               stl->shgroups[id].wire_color[3] = 1.0f;
+       }
 }
 
 /* create shading group for filling */