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.
This commit is contained in:
Antonio Vazquez 2021-03-11 17:22:57 +01:00
parent 9dfc81ccf1
commit a1b01edf45
1 changed files with 11 additions and 0 deletions

View File

@ -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);