[Bf-blender-cvs] [15f5cc70646] greasepencil-object: GPencil: Don't disable Vertex paint if Material mode

Antonio Vazquez noreply at git.blender.org
Fri Nov 29 23:48:38 CET 2019


Commit: 15f5cc706468e79128bc0b9b7872481ee2c43a94
Author: Antonio Vazquez
Date:   Fri Nov 29 23:48:02 2019 +0100
Branches: greasepencil-object
https://developer.blender.org/rB15f5cc706468e79128bc0b9b7872481ee2c43a94

GPencil: Don't disable Vertex paint if Material mode

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

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 8f4fa87b9e0..5ecd0342d4d 100644
--- a/source/blender/draw/engines/gpencil/gpencil_draw_utils.c
+++ b/source/blender/draw/engines/gpencil/gpencil_draw_utils.c
@@ -975,7 +975,8 @@ static DRWShadingGroup *gpencil_shgroup_point_create(GPENCIL_e_data *e_data,
 float gpencil_get_vertex_paint_factor(View3D *v3d)
 {
   if (v3d) {
-    float vpaint_mix = (v3d->shading.color_type == V3D_SHADING_MATERIAL_COLOR) ?
+    float vpaint_mix = ((v3d->shading.type < OB_MATERIAL) &&
+                        (v3d->shading.color_type == V3D_SHADING_MATERIAL_COLOR)) ?
                            0.0f :
                            v3d->overlay.gpencil_vertex_paint_opacity;
     return vpaint_mix;



More information about the Bf-blender-cvs mailing list