diff options
author | Antonio Vazquez <blendergit@gmail.com> | 2021-01-22 13:25:32 +0300 |
---|---|---|
committer | Antonio Vazquez <blendergit@gmail.com> | 2021-01-22 13:25:32 +0300 |
commit | 0373d1b09fc9db2c237a507dc6ef649c5d2b8703 (patch) | |
tree | faaa38c4950c21f7eaec09b46fa05101e486a956 /source/blender/editors/gpencil | |
parent | cdf564277c4d31d98dad78c0d7ad03603896cf4b (diff) |
GPencil: Fix unreported Vertex Paint masking error
The masking was not working as expected and allowed to paint non selected strokes.
Diffstat (limited to 'source/blender/editors/gpencil')
-rw-r--r-- | source/blender/editors/gpencil/gpencil_vertex_paint.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/source/blender/editors/gpencil/gpencil_vertex_paint.c b/source/blender/editors/gpencil/gpencil_vertex_paint.c index 62ddfaab012..e2c81d53fba 100644 --- a/source/blender/editors/gpencil/gpencil_vertex_paint.c +++ b/source/blender/editors/gpencil/gpencil_vertex_paint.c @@ -845,6 +845,13 @@ static bool gpencil_vertexpaint_select_stroke(tGP_BrushVertexpaintData *gso, bool saved = false; + /* Check stroke masking. */ + if (GPENCIL_ANY_VERTEX_MASK(gso->mask)) { + if ((gps->flag & GP_STROKE_SELECT) == 0) { + return false; + } + } + /* Check if the stroke collide with brush. */ if (!ED_gpencil_stroke_check_collision(gsc, gps, gso->mval, radius, diff_mat)) { return false; |