mirror of
https://github.com/blender/blender
synced 2026-09-29 04:37:17 +03:00
GPencil: Fix unreported Fill when use boundary and Visble layers
The new option to filter the layers used by the Fill tool was not using the boundary strokes. The problem was the layers were skipped and any boundary stroke was not used. Now, the layer is not skipped, but the strokes that are not boundary are skipped.
This commit is contained in:
parent
4975aa410c
commit
bee5921e82
1 changed files with 13 additions and 6 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue