[Bf-blender-cvs] [97b2483a7a7] blender2.8: Depsgraph: Remove scene from refresh API

Sergey Sharybin noreply at git.blender.org
Tue Oct 24 16:04:31 CEST 2017


Commit: 97b2483a7a78253fcbd4dd5d114a1c7a8668c4ef
Author: Sergey Sharybin
Date:   Tue Oct 24 15:29:43 2017 +0200
Branches: blender2.8
https://developer.blender.org/rB97b2483a7a78253fcbd4dd5d114a1c7a8668c4ef

Depsgraph: Remove scene from refresh API

Scene is already stored in the graph.

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

M	source/blender/blenkernel/intern/scene.c
M	source/blender/depsgraph/DEG_depsgraph.h
M	source/blender/depsgraph/intern/depsgraph_eval.cc

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

diff --git a/source/blender/blenkernel/intern/scene.c b/source/blender/blenkernel/intern/scene.c
index 4662612cc24..5477ab97201 100644
--- a/source/blender/blenkernel/intern/scene.c
+++ b/source/blender/blenkernel/intern/scene.c
@@ -1623,7 +1623,7 @@ void BKE_scene_update_tagged(EvaluationContext *eval_ctx, Main *bmain, Scene *sc
 	 *
 	 * in the future this should handle updates for all datablocks, not
 	 * only objects and scenes. - brecht */
-	DEG_evaluate_on_refresh(eval_ctx, scene->depsgraph_legacy, scene);
+	DEG_evaluate_on_refresh(eval_ctx, scene->depsgraph_legacy);
 
 	/* update sound system animation (TODO, move to depsgraph) */
 	BKE_sound_update_scene(bmain, scene);
diff --git a/source/blender/depsgraph/DEG_depsgraph.h b/source/blender/depsgraph/DEG_depsgraph.h
index 6391cb71866..c47ddb711a6 100644
--- a/source/blender/depsgraph/DEG_depsgraph.h
+++ b/source/blender/depsgraph/DEG_depsgraph.h
@@ -228,8 +228,7 @@ void DEG_evaluate_on_framechange(struct EvaluationContext *eval_ctx,
  * < context_type: context to perform evaluation for
  */
 void DEG_evaluate_on_refresh(struct EvaluationContext *eval_ctx,
-                             Depsgraph *graph,
-                             struct Scene *scene);
+                             Depsgraph *graph);
 
 bool DEG_needs_eval(Depsgraph *graph);
 
diff --git a/source/blender/depsgraph/intern/depsgraph_eval.cc b/source/blender/depsgraph/intern/depsgraph_eval.cc
index 03c2f0742fc..176466fe058 100644
--- a/source/blender/depsgraph/intern/depsgraph_eval.cc
+++ b/source/blender/depsgraph/intern/depsgraph_eval.cc
@@ -100,13 +100,12 @@ void DEG_evaluation_context_free(EvaluationContext *eval_ctx)
 
 /* Evaluate all nodes tagged for updating. */
 void DEG_evaluate_on_refresh(EvaluationContext *eval_ctx,
-                             Depsgraph *graph,
-                             Scene *scene)
+                             Depsgraph *graph)
 {
 	DEG::Depsgraph *deg_graph = reinterpret_cast<DEG::Depsgraph *>(graph);
 	/* Update time on primary timesource. */
 	DEG::TimeSourceDepsNode *tsrc = deg_graph->find_time_source();
-	tsrc->cfra = BKE_scene_frame_get(scene);
+	tsrc->cfra = BKE_scene_frame_get(deg_graph->scene);
 	DEG::deg_evaluate_on_refresh(eval_ctx, deg_graph);
 }



More information about the Bf-blender-cvs mailing list