diff options
author | Antonio Vazquez <blendergit@gmail.com> | 2020-10-27 19:39:59 +0300 |
---|---|---|
committer | Antonio Vazquez <blendergit@gmail.com> | 2020-10-27 19:39:59 +0300 |
commit | 3a7a9365259e30b43bfbbadceb2789b7bcee8dd2 (patch) | |
tree | d87a0f6f2ee1904227ccd01d3311ff0dbcd2b7cc /source/blender/editors | |
parent | 471c0bcd442d059797e7893618828e7386d711b2 (diff) | |
parent | bee5921e82eb32dfc2c64aa063f991bc36faa5c7 (diff) |
Merge branch 'blender-v2.91-release'
Diffstat (limited to 'source/blender/editors')
-rw-r--r-- | source/blender/editors/gpencil/gpencil_fill.c | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/source/blender/editors/gpencil/gpencil_fill.c b/source/blender/editors/gpencil/gpencil_fill.c index a11397bd0bb..3c1f538cb99 100644 --- a/source/blender/editors/gpencil/gpencil_fill.c +++ b/source/blender/editors/gpencil/gpencil_fill.c @@ -269,36 +269,38 @@ static void gpencil_draw_datablock(tGPDfill *tgpf, const float ink[4]) continue; } - /* Decide if layer is included or not depending of the layer mode. */ + /* Decide if the strokes of layers are included or not depending on the layer mode. + * Cannot skip the layer because it can use boundary strokes and must be used. */ + bool skip = false; const int gpl_index = BLI_findindex(&gpd->layers, gpl); switch (brush_settings->fill_layer_mode) { case GP_FILL_GPLMODE_ACTIVE: { if (gpl_index != gpl_active_index) { - continue; + skip = true; } break; } case GP_FILL_GPLMODE_ABOVE: { if (gpl_index != gpl_active_index + 1) { - continue; + skip = true; } break; } case GP_FILL_GPLMODE_BELOW: { if (gpl_index != gpl_active_index - 1) { - continue; + skip = true; } break; } case GP_FILL_GPLMODE_ALL_ABOVE: { if (gpl_index <= gpl_active_index) { - continue; + skip = true; } break; } case GP_FILL_GPLMODE_ALL_BELOW: { if (gpl_index >= gpl_active_index) { - continue; + skip = true; } break; } @@ -338,6 +340,11 @@ static void gpencil_draw_datablock(tGPDfill *tgpf, const float ink[4]) continue; } + /* If the layer must be skipped, but the stroke is not boundary, skip stroke. */ + if ((skip) && ((gps->flag & GP_STROKE_NOFILL) == 0)) { + continue; + } + tgpw.gps = gps; tgpw.gpl = gpl; tgpw.gpf = gpf; |