diff options
Diffstat (limited to 'source/blender/depsgraph/intern/depsgraph_eval.cc')
-rw-r--r-- | source/blender/depsgraph/intern/depsgraph_eval.cc | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/source/blender/depsgraph/intern/depsgraph_eval.cc b/source/blender/depsgraph/intern/depsgraph_eval.cc index b6c6129e9ba..8a641f23a42 100644 --- a/source/blender/depsgraph/intern/depsgraph_eval.cc +++ b/source/blender/depsgraph/intern/depsgraph_eval.cc @@ -45,44 +45,46 @@ #include "intern/depsgraph.h" +namespace deg = blender::deg; + /* Evaluate all nodes tagged for updating. */ void DEG_evaluate_on_refresh(Main *bmain, Depsgraph *graph) { - DEG::Depsgraph *deg_graph = reinterpret_cast<DEG::Depsgraph *>(graph); + deg::Depsgraph *deg_graph = reinterpret_cast<deg::Depsgraph *>(graph); deg_graph->ctime = BKE_scene_frame_get(deg_graph->scene); /* Update time on primary timesource. */ - DEG::TimeSourceNode *tsrc = deg_graph->find_time_source(); + deg::TimeSourceNode *tsrc = deg_graph->find_time_source(); tsrc->cfra = deg_graph->ctime; /* Update time in scene. */ if (deg_graph->scene_cow) { BKE_scene_frame_set(deg_graph->scene_cow, deg_graph->ctime); } - DEG::deg_graph_flush_updates(bmain, deg_graph); - DEG::deg_evaluate_on_refresh(deg_graph); + deg::deg_graph_flush_updates(bmain, deg_graph); + deg::deg_evaluate_on_refresh(deg_graph); deg_graph->need_update_time = false; } /* Frame-change happened for root scene that graph belongs to. */ void DEG_evaluate_on_framechange(Main *bmain, Depsgraph *graph, float ctime) { - DEG::Depsgraph *deg_graph = reinterpret_cast<DEG::Depsgraph *>(graph); + deg::Depsgraph *deg_graph = reinterpret_cast<deg::Depsgraph *>(graph); deg_graph->ctime = ctime; /* Update time on primary timesource. */ - DEG::TimeSourceNode *tsrc = deg_graph->find_time_source(); + deg::TimeSourceNode *tsrc = deg_graph->find_time_source(); tsrc->cfra = ctime; deg_graph->need_update_time = true; - DEG::deg_graph_flush_updates(bmain, deg_graph); + deg::deg_graph_flush_updates(bmain, deg_graph); /* Update time in scene. */ if (deg_graph->scene_cow) { BKE_scene_frame_set(deg_graph->scene_cow, deg_graph->ctime); } /* Perform recalculation updates. */ - DEG::deg_evaluate_on_refresh(deg_graph); + deg::deg_evaluate_on_refresh(deg_graph); deg_graph->need_update_time = false; } bool DEG_needs_eval(Depsgraph *graph) { - DEG::Depsgraph *deg_graph = reinterpret_cast<DEG::Depsgraph *>(graph); + deg::Depsgraph *deg_graph = reinterpret_cast<deg::Depsgraph *>(graph); return !deg_graph->entry_tags.is_empty() || deg_graph->need_update_time; } |