Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAntonio Vazquez <blendergit@gmail.com>2021-03-11 19:22:57 +0300
committerAntonio Vazquez <blendergit@gmail.com>2021-03-11 19:23:04 +0300
commita1b01edf459e8c656174fab9e63e4d9b64a29388 (patch)
treec307400decc90f77b29a5d41c6ce52d3b289c837 /source/blender/editors
parent9dfc81ccf10153385e8ff744ab2a9e2a25ce6606 (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/editors')
-rw-r--r--source/blender/editors/gpencil/gpencil_fill.c11
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);