diff options
author | Antonio Vazquez <blendergit@gmail.com> | 2020-07-29 16:34:54 +0300 |
---|---|---|
committer | Antonio Vazquez <blendergit@gmail.com> | 2020-07-29 16:34:54 +0300 |
commit | 7becd283cc27c520a38e98a3802e7cb1edf515d9 (patch) | |
tree | 043f6ebd901c2615ede353e1ba2f745936cec637 /source/blender/editors/gpencil/gpencil_primitive.c | |
parent | e749643793809248dfc6ffd078be04aec3eeab82 (diff) |
GPencil: New Brush predefined mode
it's good to have an option to ' pin' a mode to the brush, to use that mode always, independent of the current viewport selected mode.
{F8723224}
Reviewed By: pepeland
Differential Revision: https://developer.blender.org/D8399
81a002
Diffstat (limited to 'source/blender/editors/gpencil/gpencil_primitive.c')
-rw-r--r-- | source/blender/editors/gpencil/gpencil_primitive.c | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/source/blender/editors/gpencil/gpencil_primitive.c b/source/blender/editors/gpencil/gpencil_primitive.c index f206f5c832a..fb0d94f2307 100644 --- a/source/blender/editors/gpencil/gpencil_primitive.c +++ b/source/blender/editors/gpencil/gpencil_primitive.c @@ -695,7 +695,6 @@ static void gpencil_primitive_update_strokes(bContext *C, tGPDprimitive *tgpi) bool is_depth = (bool)(*align_flag & (GP_PROJECT_DEPTH_VIEW | GP_PROJECT_DEPTH_STROKE)); const bool is_camera = (bool)(ts->gp_sculpt.lock_axis == 0) && (tgpi->rv3d->persp == RV3D_CAMOB) && (!is_depth); - const bool is_vertex_stroke = GPENCIL_USE_VERTEX_COLOR_STROKE(ts, brush); if (tgpi->type == GP_STROKE_BOX) { gps->totpoints = (tgpi->tot_edges * 4 + tgpi->tot_stored_edges); @@ -1020,12 +1019,7 @@ static void gpencil_primitive_update_strokes(bContext *C, tGPDprimitive *tgpi) pt->time = 0.0f; pt->flag = 0; pt->uv_fac = tpt->uv_fac; - if (is_vertex_stroke) { - copy_v4_v4(pt->vert_color, tpt->vert_color); - } - else { - zero_v4(pt->vert_color); - } + ED_gpencil_point_vertex_color_set(ts, brush, pt, tpt); if (gps->dvert != NULL) { MDeformVert *dvert = &gps->dvert[i]; |