Depsgraph: Remove scene from refresh API

Scene is already stored in the graph.
This commit is contained in:
2017-10-24 15:29:43 +02:00
parent 11d8c939cd
commit 97b2483a7a
3 changed files with 4 additions and 6 deletions

View 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);

View 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);

View 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);
}