Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAntonioya <blendergit@gmail.com>2019-03-02 16:28:44 +0300
committerAntonioya <blendergit@gmail.com>2019-03-02 16:28:44 +0300
commitdc858a048b0f41207678677e0baba1fd29eadfb0 (patch)
treef214937e97ad5ca154fe591cb1f47fd354fb5bc9
parentde78ffca844f7aa02d7a10059226c0db0293a159 (diff)
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.
-rw-r--r--source/blender/draw/engines/gpencil/gpencil_draw_utils.c5
1 files changed, 5 insertions, 0 deletions
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 */