diff options
author | Antonio Vazquez <blendergit@gmail.com> | 2022-09-28 18:38:23 +0300 |
---|---|---|
committer | Antonio Vazquez <blendergit@gmail.com> | 2022-09-28 18:42:32 +0300 |
commit | 8c95ab235fad748ba6f18b04a6d5cd17df9f0108 (patch) | |
tree | 98a333750509bfa3241a2c86fb3623fb9addb90a | |
parent | 1f493125e30d29f3bc0a295d667c770de2a0f2f5 (diff) |
GPencil: Fix unreported bug for fill closing strokes
The extend lines were included in render by error
when the only collide option was ON.
-rw-r--r-- | source/blender/editors/gpencil/gpencil_fill.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/source/blender/editors/gpencil/gpencil_fill.c b/source/blender/editors/gpencil/gpencil_fill.c index b99274d66e5..60665898ffe 100644 --- a/source/blender/editors/gpencil/gpencil_fill.c +++ b/source/blender/editors/gpencil/gpencil_fill.c @@ -874,22 +874,22 @@ static void gpencil_update_extend(tGPDfill *tgpf) static bool gpencil_stroke_is_drawable(tGPDfill *tgpf, bGPDstroke *gps) { - if (tgpf->is_render) { - return true; - } - const bool show_help = (tgpf->flag & GP_BRUSH_FILL_SHOW_HELPLINES) != 0; const bool show_extend = (tgpf->flag & GP_BRUSH_FILL_SHOW_EXTENDLINES) != 0; const bool is_extend = (gps->flag & GP_STROKE_NOFILL) && (gps->flag & GP_STROKE_TAG); const bool is_extend_help = (gps->flag & GP_STROKE_NOFILL) && (gps->flag & GP_STROKE_HELP); const bool is_line_mode = (tgpf->fill_extend_mode == GP_FILL_EMODE_EXTEND); const bool only_collide = (tgpf->flag & GP_BRUSH_FILL_COLLIDE_ONLY) != 0; - const bool is_collide = (gps->flag & GP_STROKE_COLLIDE) != 0; + const bool stroke_collide = (gps->flag & GP_STROKE_COLLIDE) != 0; - if (is_line_mode && only_collide && tgpf->is_render && !is_collide) { + if (is_extend && is_line_mode && only_collide && tgpf->is_render && !stroke_collide) { return false; } + if (tgpf->is_render) { + return true; + } + if ((!show_help) && (show_extend)) { if (!is_extend && !is_extend_help) { return false; |