[Bf-blender-cvs] [79db55c] depsgraph_refactor: Some tweaks to managing sce->depsgraph to make sure it stays in sync with the current sce->theDag.
Lukas Tönne
noreply at git.blender.org
Fri May 30 18:14:28 CEST 2014
Commit: 79db55cde5630c8cf2a0765bdbe2413a5fa02132
Author: Lukas Tönne
Date: Fri May 30 18:06:50 2014 +0200
https://developer.blender.org/rB79db55cde5630c8cf2a0765bdbe2413a5fa02132
Some tweaks to managing sce->depsgraph to make sure it stays in sync
with the current sce->theDag.
Eventually depsgraph should be moved out of the Scene DNA, but until
then it's useful to have it there for testing.
===================================================================
M source/blender/blenkernel/intern/depsgraph.c
===================================================================
diff --git a/source/blender/blenkernel/intern/depsgraph.c b/source/blender/blenkernel/intern/depsgraph.c
index 8ca0225..f56018d 100644
--- a/source/blender/blenkernel/intern/depsgraph.c
+++ b/source/blender/blenkernel/intern/depsgraph.c
@@ -85,6 +85,7 @@
#pragma message("DEPSGRAPH PORTING XXX: only needed to hijack existing tagging functions until new depsgraph API is stabilized")
#include "DEG_depsgraph.h"
+#include "DEG_depsgraph_build.h"
static SpinLock threaded_update_lock;
@@ -891,12 +892,6 @@ DagForest *build_dag(Main *bmain, Scene *sce, short mask)
DagForest *dag;
DagAdjList *itA;
- /********* new depsgraph *********/
- if (sce->depsgraph)
- DEG_graph_free(sce->depsgraph);
- sce->depsgraph = DEG_graph_new();
- /******************/
-
dag = sce->theDag;
if (dag)
free_forest(dag);
@@ -957,6 +952,13 @@ DagForest *build_dag(Main *bmain, Scene *sce, short mask)
/* cycle detection and solving */
// solve_cycles(dag);
+ /********* new depsgraph *********/
+ if (sce->depsgraph)
+ DEG_graph_free(sce->depsgraph);
+ sce->depsgraph = DEG_graph_new();
+ DEG_graph_build_from_scene(sce->depsgraph, bmain, sce);
+ /******************/
+
return dag;
}
@@ -1632,6 +1634,13 @@ void DAG_scene_free(Scene *sce)
MEM_freeN(sce->theDag);
sce->theDag = NULL;
}
+
+ /********* new depsgraph *********/
+ if (sce->depsgraph) {
+ DEG_graph_free(sce->depsgraph);
+ sce->depsgraph = NULL;
+ }
+ /******************/
}
static void lib_id_recalc_tag(Main *bmain, ID *id)
More information about the Bf-blender-cvs
mailing list