[Bf-blender-cvs] [fedb3e95a4d] temp-gpencil-fill: GPencil: Fix bug of remaining extend strokes

Antonio Vazquez noreply at git.blender.org
Wed Feb 3 21:38:00 CET 2021


Commit: fedb3e95a4d784dc0aeaba70e89d918a87b04e46
Author: Antonio Vazquez
Date:   Wed Feb 3 21:37:57 2021 +0100
Branches: temp-gpencil-fill
https://developer.blender.org/rBfedb3e95a4d784dc0aeaba70e89d918a87b04e46

GPencil: Fix bug of remaining extend strokes

The strokes were not deleted.

===================================================================

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 aec9822ce74..87103ae92c2 100644
--- a/source/blender/editors/gpencil/gpencil_fill.c
+++ b/source/blender/editors/gpencil/gpencil_fill.c
@@ -197,7 +197,11 @@ static void gpencil_draw_boundary_lines(const struct bContext *UNUSED(C), struct
 /* Delete any temporary stroke. */
 static void gpencil_delete_temp_stroke_extension(tGPDfill *tgpf, const bool all_frames)
 {
-  CTX_DATA_BEGIN (tgpf->C, bGPDlayer *, gpl, editable_gpencil_layers) {
+  LISTBASE_FOREACH (bGPDlayer *, gpl, &tgpf->gpd->layers) {
+    if (gpl->flag & GP_LAYER_HIDE) {
+      continue;
+    }
+
     bGPDframe *init_gpf = (all_frames) ? gpl->frames.first :
                                          BKE_gpencil_layer_frame_get(
                                              gpl, tgpf->active_cfra, GP_GETFRAME_USE_PREV);
@@ -217,7 +221,6 @@ static void gpencil_delete_temp_stroke_extension(tGPDfill *tgpf, const bool all_
       }
     }
   }
-  CTX_DATA_END;
 }
 
 static void extrapolate_points_by_length(bGPDspoint *a,



More information about the Bf-blender-cvs mailing list