Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJacques Lucke <jacques@blender.org>2020-06-29 16:19:56 +0300
committerJacques Lucke <jacques@blender.org>2020-06-29 16:21:30 +0300
commitcb5bfb32ba01705cf88e2c21eb61f7b9b24688da (patch)
treedf4e98581ab00576a8625d5dc3f534bd964b21da /source/blender/depsgraph/intern/depsgraph_eval.cc
parent81fb08ad57d6a71f40fa412ba14961a89cca0278 (diff)
Depsgraph: introduce blender::deg namespace
Reviewers: sergey Differential Revision: https://developer.blender.org/D8150
Diffstat (limited to 'source/blender/depsgraph/intern/depsgraph_eval.cc')
-rw-r--r--source/blender/depsgraph/intern/depsgraph_eval.cc20
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;
}