From e148873f3f73f7499a022615336bad47d959774b Mon Sep 17 00:00:00 2001 From: Antonio Vazquez Date: Mon, 26 Aug 2019 21:00:20 +0200 Subject: GPencil: Temporary fix to keep running Cycles + GPencil object in background. This is a temporary solution to keep the render running. --- source/blender/draw/engines/gpencil/gpencil_draw_utils.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'source') diff --git a/source/blender/draw/engines/gpencil/gpencil_draw_utils.c b/source/blender/draw/engines/gpencil/gpencil_draw_utils.c index 93040afe2c7..f4b390fb4a4 100644 --- a/source/blender/draw/engines/gpencil/gpencil_draw_utils.c +++ b/source/blender/draw/engines/gpencil/gpencil_draw_utils.c @@ -1873,6 +1873,14 @@ void gpencil_populate_datablock(GPENCIL_e_data *e_data, const ViewLayer *view_layer = DEG_get_evaluated_view_layer(draw_ctx->depsgraph); Scene *scene = draw_ctx->scene; + /* TODO: Review why is needed this recalc when render cycles + GP object in background. + * We need these lines to keep running the background render, but asap we get an alternative + * solution, we must remove it and keep all logic inside gpencil_modifier module. (antoniov) + */ + if (ob->runtime.gpencil_tot_layers == 0) { + BKE_gpencil_modifiers_calc(draw_ctx->depsgraph, draw_ctx->scene, ob); + } + /* Use original data to shared in edit/transform operators */ bGPdata *gpd_eval = (bGPdata *)ob->data; bGPdata *gpd = (bGPdata *)DEG_get_original_id(&gpd_eval->id); -- cgit v1.2.3