[Bf-blender-cvs] [bb74f6cc91f] greasepencil-object: GPencil: In Vertex Paint mode, Solid Vertex must be set always
Antonio Vazquez
noreply at git.blender.org
Tue Mar 3 19:39:53 CET 2020
Commit: bb74f6cc91f85f3bce42ba6b5baccf88fd1188d8
Author: Antonio Vazquez
Date: Tue Mar 3 19:38:02 2020 +0100
Branches: greasepencil-object
https://developer.blender.org/rBbb74f6cc91f85f3bce42ba6b5baccf88fd1188d8
GPencil: In Vertex Paint mode, Solid Vertex must be set always
In Vertex Paint mode, the Solid shading must be always Vertex
===================================================================
M source/blender/draw/engines/gpencil/gpencil_engine.c
===================================================================
diff --git a/source/blender/draw/engines/gpencil/gpencil_engine.c b/source/blender/draw/engines/gpencil/gpencil_engine.c
index b3990bcb8b1..84273396e18 100644
--- a/source/blender/draw/engines/gpencil/gpencil_engine.c
+++ b/source/blender/draw/engines/gpencil/gpencil_engine.c
@@ -127,6 +127,12 @@ void GPENCIL_engine_init(void *ved)
(v3d->shading.flag & V3D_SHADING_SCENE_WORLD_RENDER));
stl->pd->v3d_color_type = (v3d->shading.type == OB_SOLID) ? v3d->shading.color_type : -1;
+ /* Special case: If Vertex Paint mode, use always Vertex mode. */
+ if (v3d->shading.type == OB_SOLID && ctx->obact && ctx->obact->type == OB_GPENCIL &&
+ ctx->obact->mode == OB_MODE_VERTEX_GPENCIL) {
+ stl->pd->v3d_color_type = V3D_SHADING_VERTEX_COLOR;
+ }
+
copy_v3_v3(stl->pd->v3d_single_color, v3d->shading.single_color);
/* For non active frame, use only lines in multiedit mode. */
More information about the Bf-blender-cvs
mailing list