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:
Diffstat (limited to 'source/blender/blenkernel/intern/depsgraph.c')
-rw-r--r--source/blender/blenkernel/intern/depsgraph.c20
1 files changed, 18 insertions, 2 deletions
diff --git a/source/blender/blenkernel/intern/depsgraph.c b/source/blender/blenkernel/intern/depsgraph.c
index 62491f1ff6e..1e286b345ca 100644
--- a/source/blender/blenkernel/intern/depsgraph.c
+++ b/source/blender/blenkernel/intern/depsgraph.c
@@ -1349,16 +1349,32 @@ void graph_print_adj_list(DagForest *dag)
* to do their own updates based on changes... */
static void (*EditorsUpdateIDCb)(Main *bmain, ID *id) = NULL;
static void (*EditorsUpdateSceneCb)(Main *bmain, Scene *scene, int updated) = NULL;
+static void (*EditorsUpdateScenePreCb)(Main *bmain, Scene *scene, bool time) = NULL;
-void DAG_editors_update_cb(void (*id_func)(Main *bmain, ID *id), void (*scene_func)(Main *bmain, Scene *scene, int updated))
+void DAG_editors_update_cb(void (*id_func)(Main *bmain, ID *id),
+ void (*scene_func)(Main *bmain, Scene *scene, int updated),
+ void (*scene_pre_func)(Main *bmain, Scene *scene, bool time))
{
if (DEG_depsgraph_use_legacy()) {
EditorsUpdateIDCb = id_func;
EditorsUpdateSceneCb = scene_func;
+ EditorsUpdateScenePreCb = scene_pre_func;
}
else {
/* New dependency graph. */
- DEG_editors_set_update_cb(id_func, scene_func);
+ DEG_editors_set_update_cb(id_func, scene_func, scene_pre_func);
+ }
+}
+
+void DAG_editors_update_pre(Main *bmain, Scene *scene, bool time)
+{
+ if (DEG_depsgraph_use_legacy()) {
+ if (EditorsUpdateScenePreCb != NULL) {
+ EditorsUpdateScenePreCb(bmain, scene, time);
+ }
+ }
+ else {
+ DEG_editors_update_pre(bmain, scene, time);
}
}