diff options
author | Antonio Vazquez <blendergit@gmail.com> | 2021-03-11 19:22:57 +0300 |
---|---|---|
committer | Antonio Vazquez <blendergit@gmail.com> | 2021-03-11 19:23:04 +0300 |
commit | a1b01edf459e8c656174fab9e63e4d9b64a29388 (patch) | |
tree | c307400decc90f77b29a5d41c6ce52d3b289c837 /source/blender | |
parent | 9dfc81ccf10153385e8ff744ab2a9e2a25ce6606 (diff) |
GPencil: Fix unreported Fill fails if the stroke was tagged
In some situations the strokes could be tagged before filling, so it's necessary to reset before.
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/editors/gpencil/gpencil_fill.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/source/blender/editors/gpencil/gpencil_fill.c b/source/blender/editors/gpencil/gpencil_fill.c index 85130e89ad1..a3be475678d 100644 --- a/source/blender/editors/gpencil/gpencil_fill.c +++ b/source/blender/editors/gpencil/gpencil_fill.c @@ -1710,6 +1710,17 @@ static tGPDfill *gpencil_session_init_fill(bContext *C, wmOperator *op) tgpf->mat = ma; + /* Untag strokes to be sure nothing is pending due any canceled process. */ + LISTBASE_FOREACH (bGPDlayer *, gpl, &tgpf->gpd->layers) { + LISTBASE_FOREACH (bGPDframe *, gpf, &gpl->frames) { + LISTBASE_FOREACH (bGPDstroke *, gps, &gpf->strokes) { + if (gps->flag & GP_STROKE_TAG) { + gps->flag &= ~GP_STROKE_TAG; + } + } + } + } + /* check whether the material was newly added */ if (totcol != tgpf->ob->totcol) { WM_event_add_notifier(C, NC_SPACE | ND_SPACE_PROPERTIES, NULL); |