Depsgraph: Remove scene from refresh API
authorSergey Sharybin <sergey.vfx@gmail.com>
Tue, 24 Oct 2017 13:29:43 +0000 (15:29 +0200)
committerSergey Sharybin <sergey.vfx@gmail.com>
Tue, 24 Oct 2017 14:04:11 +0000 (16:04 +0200)
Scene is already stored in the graph.

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

index 4662612cc241a5423c16bfa3aa57d6e2b3a84b89..5477ab97201a2ce076c38866a9836cd96138f463 100644 (file)
@@ -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);
index 6391cb7186622e048bffc6828630187aee4ce636..c47ddb711a6af446267f7cd997fd3c8b13c2bca8 100644 (file)
@@ -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);
 
index 03c2f0742fc7f64bee22382d4d9addffed9c4c93..176466fe0583ec411b937a6b9950fdefb91dec81 100644 (file)
@@ -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);
 }