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:
Diffstat (limited to 'source/blender/blenkernel/intern/gpencil.c')
-rw-r--r--source/blender/blenkernel/intern/gpencil.c21
1 files changed, 12 insertions, 9 deletions
diff --git a/source/blender/blenkernel/intern/gpencil.c b/source/blender/blenkernel/intern/gpencil.c
index 16d43d40c50..92ed273cac8 100644
--- a/source/blender/blenkernel/intern/gpencil.c
+++ b/source/blender/blenkernel/intern/gpencil.c
@@ -2568,11 +2568,13 @@ void BKE_gpencil_visible_stroke_advanced_iter(ViewLayer *view_layer,
layer_cb(gpl, gpf, NULL, thunk);
}
- LISTBASE_FOREACH (bGPDstroke *, gps, &gpf->strokes) {
- if (gps->totpoints == 0) {
- continue;
+ if (stroke_cb) {
+ LISTBASE_FOREACH (bGPDstroke *, gps, &gpf->strokes) {
+ if (gps->totpoints == 0) {
+ continue;
+ }
+ stroke_cb(gpl, gpf, gps, thunk);
}
- stroke_cb(gpl, gpf, gps, thunk);
}
}
/* Draw Active frame on top. */
@@ -2590,12 +2592,13 @@ void BKE_gpencil_visible_stroke_advanced_iter(ViewLayer *view_layer,
gpl->opacity = prev_opacity;
continue;
}
-
- LISTBASE_FOREACH (bGPDstroke *, gps, &act_gpf->strokes) {
- if (gps->totpoints == 0) {
- continue;
+ if (stroke_cb) {
+ LISTBASE_FOREACH (bGPDstroke *, gps, &act_gpf->strokes) {
+ if (gps->totpoints == 0) {
+ continue;
+ }
+ stroke_cb(gpl, act_gpf, gps, thunk);
}
- stroke_cb(gpl, act_gpf, gps, thunk);
}
}