From 7f76f6f2490a4375dc4c5e0f61de7daa7a75a9c2 Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Mon, 26 Sep 2016 16:43:06 +0200 Subject: [PATCH] Fix export image generated by export UV layout Was only happening with new dependency graph. The issue here is that scene's depsgraph layers will be 0 unless it was ever visible. Worked around by checking for 0 layer in the update_tagged of new depsgraph. This currently kind of following logic of visible_layers, but is weak. Committing so studio is unlocked here, will re-evaluate this layer. --- source/blender/depsgraph/intern/depsgraph_eval.cc | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/source/blender/depsgraph/intern/depsgraph_eval.cc b/source/blender/depsgraph/intern/depsgraph_eval.cc index a0435c318f0..c41f28b07e8 100644 --- a/source/blender/depsgraph/intern/depsgraph_eval.cc +++ b/source/blender/depsgraph/intern/depsgraph_eval.cc @@ -33,6 +33,8 @@ #include "MEM_guardedalloc.h" extern "C" { +#include "DNA_scene_types.h" + #include "BLI_utildefines.h" #include "BLI_ghash.h" @@ -125,7 +127,14 @@ void DEG_evaluate_on_refresh(EvaluationContext *eval_ctx, /* Update time on primary timesource. */ DEG::TimeSourceDepsNode *tsrc = deg_graph->find_time_source(); tsrc->cfra = BKE_scene_frame_get(scene); - DEG::deg_evaluate_on_refresh(eval_ctx, deg_graph, deg_graph->layers); + unsigned int layers = deg_graph->layers; + /* XXX(sergey): This works around missing updates in temp scenes used + * by various scripts, but is weak and needs closer investigation. + */ + if (layers == 0) { + layers = scene->lay; + } + DEG::deg_evaluate_on_refresh(eval_ctx, deg_graph, layers); } /* Frame-change happened for root scene that graph belongs to. */