[Bf-blender-cvs] [d33be9025f9] greasepencil-object: GPencil: Use Brush size for cursor in Vertex Paint mode
Antonio Vazquez
noreply at git.blender.org
Thu Nov 7 19:24:31 CET 2019
Commit: d33be9025f9393c1a80eca77382a030980114fbd
Author: Antonio Vazquez
Date: Thu Nov 7 19:24:16 2019 +0100
Branches: greasepencil-object
https://developer.blender.org/rBd33be9025f9393c1a80eca77382a030980114fbd
GPencil: Use Brush size for cursor in Vertex Paint mode
===================================================================
M source/blender/editors/gpencil/gpencil_utils.c
===================================================================
diff --git a/source/blender/editors/gpencil/gpencil_utils.c b/source/blender/editors/gpencil/gpencil_utils.c
index 29c92b9a168..1d6967d1337 100644
--- a/source/blender/editors/gpencil/gpencil_utils.c
+++ b/source/blender/editors/gpencil/gpencil_utils.c
@@ -1757,6 +1757,16 @@ static void gp_brush_cursor_draw(bContext *C, int x, int y, void *customdata)
}
}
+ /* For Vertex Paint use brush size. */
+ if (GPENCIL_VERTEX_MODE(gpd)) {
+ brush = scene->toolsettings->gp_vertexpaint->paint.brush;
+ if ((brush == NULL) || (brush->gpencil_settings == NULL)) {
+ return;
+ }
+ radius = brush->size;
+ copy_v3_v3(color, brush->rgb);
+ }
+
/* draw icon */
GPUVertFormat *format = immVertexFormat();
uint pos = GPU_vertformat_attr_add(format, "pos", GPU_COMP_F32, 2, GPU_FETCH_FLOAT);
More information about the Bf-blender-cvs
mailing list