GPencil: Add lock icon to Vertex Groups list
[blender.git] / source / blender / editors / gpencil / gpencil_brush.c
index e7e6d7a..8f64ec1 100644 (file)
@@ -929,6 +929,12 @@ static bool gp_brush_weight_apply(
                        gso->vrgroup = 0;
                }
        }
+       else {
+               bDeformGroup *defgroup = BLI_findlink(&gso->object->defbase, gso->vrgroup);
+               if (defgroup->flag & DG_LOCK_WEIGHT) {
+                       return false;
+               }
+       }
        /* get current weight */
        MDeformWeight *dw = defvert_verify_index(dvert, gso->vrgroup);
        float curweight = dw ? dw->weight : 0.0f;