[Bf-blender-cvs] [a1b01edf459] master: GPencil: Fix unreported Fill fails if the stroke was tagged
Antonio Vazquez
noreply at git.blender.org
Thu Mar 11 17:23:09 CET 2021
Commit: a1b01edf459e8c656174fab9e63e4d9b64a29388
Author: Antonio Vazquez
Date: Thu Mar 11 17:22:57 2021 +0100
Branches: master
https://developer.blender.org/rBa1b01edf459e8c656174fab9e63e4d9b64a29388
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.
===================================================================
M source/blender/editors/gpencil/gpencil_fill.c
===================================================================
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);
More information about the Bf-blender-cvs
mailing list