[Bf-blender-cvs] [0373d1b09fc] blender-v2.92-release: GPencil: Fix unreported Vertex Paint masking error

Antonio Vazquez noreply at git.blender.org
Fri Jan 22 11:25:48 CET 2021


Commit: 0373d1b09fc9db2c237a507dc6ef649c5d2b8703
Author: Antonio Vazquez
Date:   Fri Jan 22 11:25:32 2021 +0100
Branches: blender-v2.92-release
https://developer.blender.org/rB0373d1b09fc9db2c237a507dc6ef649c5d2b8703

GPencil: Fix unreported Vertex Paint masking error

The masking was not working as expected and allowed to paint non selected strokes.

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

M	source/blender/editors/gpencil/gpencil_vertex_paint.c

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

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;



More information about the Bf-blender-cvs mailing list