[Bf-blender-cvs] [7f76f6f] master: Fix export image generated by export UV layout

Sergey Sharybin noreply at git.blender.org
Mon Sep 26 16:46:11 CEST 2016


Commit: 7f76f6f2490a4375dc4c5e0f61de7daa7a75a9c2
Author: Sergey Sharybin
Date:   Mon Sep 26 16:43:06 2016 +0200
Branches: master
https://developer.blender.org/rB7f76f6f2490a4375dc4c5e0f61de7daa7a75a9c2

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.

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

M	source/blender/depsgraph/intern/depsgraph_eval.cc

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

diff --git a/source/blender/depsgraph/intern/depsgraph_eval.cc b/source/blender/depsgraph/intern/depsgraph_eval.cc
index a0435c3..c41f28b 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. */




More information about the Bf-blender-cvs mailing list