[Bf-blender-cvs] [8171e086e7b] greasepencil-refactor: GPencil: Fix Vertex and Weight Paint did not use Lock Layer
Antonio Vazquez
noreply at git.blender.org
Wed Jan 22 10:31:51 CET 2020
Commit: 8171e086e7b45e2b70a0cf54d312d3ed15c85854
Author: Antonio Vazquez
Date: Wed Jan 22 10:28:01 2020 +0100
Branches: greasepencil-refactor
https://developer.blender.org/rB8171e086e7b45e2b70a0cf54d312d3ed15c85854
GPencil: Fix Vertex and Weight Paint did not use Lock Layer
===================================================================
M source/blender/editors/gpencil/gpencil_vertex_paint.c
M source/blender/editors/gpencil/gpencil_weight_paint.c
===================================================================
diff --git a/source/blender/editors/gpencil/gpencil_vertex_paint.c b/source/blender/editors/gpencil/gpencil_vertex_paint.c
index 505429b9850..ec3dba22603 100644
--- a/source/blender/editors/gpencil/gpencil_vertex_paint.c
+++ b/source/blender/editors/gpencil/gpencil_vertex_paint.c
@@ -1073,8 +1073,8 @@ static bool gp_vertexpaint_brush_apply_to_layers(bContext *C, tGP_BrushVertexpai
/* Find visible strokes, and perform operations on those if hit */
for (bGPDlayer *gpl = gpd->layers.first; gpl; gpl = gpl->next) {
- /* If no active frame, don't do anything... */
- if (gpl->actframe == NULL) {
+ /* If locked or no active frame, don't do anything. */
+ if ((!gpencil_layer_is_editable(gpl)) || (gpl->actframe == NULL)) {
continue;
}
diff --git a/source/blender/editors/gpencil/gpencil_weight_paint.c b/source/blender/editors/gpencil/gpencil_weight_paint.c
index 05d59c08cc6..37110c9a08a 100644
--- a/source/blender/editors/gpencil/gpencil_weight_paint.c
+++ b/source/blender/editors/gpencil/gpencil_weight_paint.c
@@ -615,8 +615,8 @@ static bool gp_weightpaint_brush_apply_to_layers(bContext *C, tGP_BrushWeightpai
/* Find visible strokes, and perform operations on those if hit */
for (bGPDlayer *gpl = gpd->layers.first; gpl; gpl = gpl->next) {
- /* If no active frame, don't do anything... */
- if (gpl->actframe == NULL) {
+ /* If locked or no active frame, don't do anything. */
+ if ((!gpencil_layer_is_editable(gpl)) || (gpl->actframe == NULL)) {
continue;
}
More information about the Bf-blender-cvs
mailing list