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/draw')
-rw-r--r--source/blender/draw/engines/gpencil/gpencil_engine.c4
-rw-r--r--source/blender/draw/engines/gpencil/gpencil_engine.h2
2 files changed, 5 insertions, 1 deletions
diff --git a/source/blender/draw/engines/gpencil/gpencil_engine.c b/source/blender/draw/engines/gpencil/gpencil_engine.c
index 20044fbe3ce..b6f0817adb3 100644
--- a/source/blender/draw/engines/gpencil/gpencil_engine.c
+++ b/source/blender/draw/engines/gpencil/gpencil_engine.c
@@ -214,6 +214,7 @@ void GPENCIL_cache_init(void *ved)
NULL :
false;
pd->do_onion = show_onion && !hide_overlay && !playing;
+ pd->playing = playing;
/* Save simplify flags (can change while drawing, so it's better to save). */
Scene *scene = draw_ctx->scene;
pd->simplify_fill = GPENCIL_SIMPLIFY_FILL(scene, playing);
@@ -241,6 +242,7 @@ void GPENCIL_cache_init(void *ved)
pd->simplify_fill = false;
pd->simplify_fx = false;
pd->fade_layer_opacity = -1.0f;
+ pd->playing = false;
}
{
@@ -617,7 +619,7 @@ void GPENCIL_cache_populate(void *ved, Object *ob)
/* Special case for rendering onion skin. */
bGPdata *gpd = (bGPdata *)ob->data;
bool do_onion = (!pd->is_render) ? pd->do_onion : (gpd->onion_flag & GP_ONION_GHOST_ALWAYS);
-
+ gpd->runtime.playing = (short)pd->playing;
BKE_gpencil_visible_stroke_iter(is_final_render ? pd->view_layer : NULL,
ob,
gpencil_layer_cache_populate,
diff --git a/source/blender/draw/engines/gpencil/gpencil_engine.h b/source/blender/draw/engines/gpencil/gpencil_engine.h
index d0bd56b42dd..2b07ea53187 100644
--- a/source/blender/draw/engines/gpencil/gpencil_engine.h
+++ b/source/blender/draw/engines/gpencil/gpencil_engine.h
@@ -342,6 +342,8 @@ typedef struct GPENCIL_PrivateData {
/* Display onion skinning */
bool do_onion;
+ /* Playing animation */
+ bool playing;
/* simplify settings */
bool simplify_fill;
bool simplify_fx;