[Bf-blender-cvs] [9f60c850f99] master: Depsgraph: initialize EvaluationContext even if nothing to update

Dalai Felinto noreply at git.blender.org
Thu Mar 29 15:34:42 CEST 2018


Commit: 9f60c850f999591a0f4a5bb32622dee1e36adfbe
Author: Dalai Felinto
Date:   Thu Mar 29 09:56:06 2018 -0300
Branches: master
https://developer.blender.org/rB9f60c850f999591a0f4a5bb32622dee1e36adfbe

Depsgraph: initialize EvaluationContext even if nothing to update

This is required to T54437 (sequencer preview uses last updated scene).
Although the fix itself needs to be in 2.8, for the 2.8 specific
initialization code.

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

M	source/blender/depsgraph/intern/eval/deg_eval.cc

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

diff --git a/source/blender/depsgraph/intern/eval/deg_eval.cc b/source/blender/depsgraph/intern/eval/deg_eval.cc
index 92518ba73e4..fc71b5ccb7b 100644
--- a/source/blender/depsgraph/intern/eval/deg_eval.cc
+++ b/source/blender/depsgraph/intern/eval/deg_eval.cc
@@ -252,6 +252,9 @@ void deg_evaluate_on_refresh(EvaluationContext *eval_ctx,
                              Depsgraph *graph,
                              const unsigned int layers)
 {
+	/* Set time for the current graph evaluation context. */
+	TimeSourceDepsNode *time_src = graph->find_time_source();
+	eval_ctx->ctime = time_src->cfra;
 	/* Nothing to update, early out. */
 	if (BLI_gset_len(graph->entry_tags) == 0) {
 		return;
@@ -262,9 +265,6 @@ void deg_evaluate_on_refresh(EvaluationContext *eval_ctx,
 	                 graph->layers);
 	const bool do_time_debug = ((G.debug & G_DEBUG_DEPSGRAPH_TIME) != 0);
 	const double start_time = do_time_debug ? PIL_check_seconds_timer() : 0;
-	/* Set time for the current graph evaluation context. */
-	TimeSourceDepsNode *time_src = graph->find_time_source();
-	eval_ctx->ctime = time_src->cfra;
 	/* Set up evaluation context for depsgraph itself. */
 	DepsgraphEvalState state;
 	state.eval_ctx = eval_ctx;



More information about the Bf-blender-cvs mailing list