GPencil: Make Ignore Transparent option more consistent

The code was doing the oposite of the UI option.

Related to T102625
This commit is contained in:
Antonio Vazquez 2022-11-20 11:22:20 +01:00
parent 0fd94a1f5e
commit d24c0011cf
1 changed files with 2 additions and 1 deletions

View File

@ -968,7 +968,8 @@ static void gpencil_draw_basic_stroke(tGPDfill *tgpf,
for (int i = 0; i < totpoints; i++, pt++) {
if (flag & GP_BRUSH_FILL_HIDE) {
/* This flag is inverted in the UI. */
if ((flag & GP_BRUSH_FILL_HIDE) == 0) {
float alpha = gp_style->stroke_rgba[3] * pt->strength;
CLAMP(alpha, 0.0f, 1.0f);
col[3] = alpha <= thershold ? 0.0f : 1.0f;