[Bf-blender-cvs] [dc858a048b0] master: GPencil: Set alpha to 1 for all materials in SOLID mode

Antonioya noreply at git.blender.org
Sat Mar 2 14:28:58 CET 2019


Commit: dc858a048b0f41207678677e0baba1fd29eadfb0
Author: Antonioya
Date:   Sat Mar 2 14:28:44 2019 +0100
Branches: master
https://developer.blender.org/rBdc858a048b0f41207678677e0baba1fd29eadfb0

GPencil: Set alpha to 1 for all materials in SOLID mode

To be consistent, the alpha must be set to 1 when solid mode is enabled.

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

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

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

diff --git a/source/blender/draw/engines/gpencil/gpencil_draw_utils.c b/source/blender/draw/engines/gpencil/gpencil_draw_utils.c
index 3b2d5ec0825..c4d7da2dca8 100644
--- a/source/blender/draw/engines/gpencil/gpencil_draw_utils.c
+++ b/source/blender/draw/engines/gpencil/gpencil_draw_utils.c
@@ -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 */



More information about the Bf-blender-cvs mailing list