[Bf-blender-cvs] [86faf8ac844] blender2.8: Depsgraph: Remove shortcut of freeing scene's depsgraph

Sergey Sharybin noreply at git.blender.org
Tue Oct 24 16:04:33 CEST 2017


Commit: 86faf8ac844f8d227a4c4fada7d5eb28a93ee6a7
Author: Sergey Sharybin
Date:   Tue Oct 24 15:32:30 2017 +0200
Branches: blender2.8
https://developer.blender.org/rB86faf8ac844f8d227a4c4fada7d5eb28a93ee6a7

Depsgraph: Remove shortcut of freeing scene's depsgraph

It will not be possible to do that after depsgraph becomes more context
oriented. Which means, all code will need to explicitly tell which graph
to free,

===================================================================

M	source/blender/blenkernel/intern/scene.c
M	source/blender/depsgraph/DEG_depsgraph_build.h
M	source/blender/depsgraph/intern/depsgraph_build.cc

===================================================================

diff --git a/source/blender/blenkernel/intern/scene.c b/source/blender/blenkernel/intern/scene.c
index 5477ab97201..7370bd8a47e 100644
--- a/source/blender/blenkernel/intern/scene.c
+++ b/source/blender/blenkernel/intern/scene.c
@@ -2457,7 +2457,7 @@ void BKE_scene_ensure_depsgraph_hash(Scene *scene)
 void BKE_scene_free_depsgraph_hash(Scene *scene)
 {
 	/* TODO(sergey): Keep this for until we get rid of depsgraph_legacy. */
-	DEG_scene_graph_free(scene);
+	DEG_graph_free(scene->depsgraph_legacy);
 	if (scene->depsgraph_hash == NULL) {
 		return;
 	}
diff --git a/source/blender/depsgraph/DEG_depsgraph_build.h b/source/blender/depsgraph/DEG_depsgraph_build.h
index 0e29f24f454..067bd5ba8e9 100644
--- a/source/blender/depsgraph/DEG_depsgraph_build.h
+++ b/source/blender/depsgraph/DEG_depsgraph_build.h
@@ -77,9 +77,6 @@ void DEG_scene_relations_update(struct Main *bmain, struct Scene *scene);
 void DEG_scene_relations_rebuild(struct Main *bmain,
                                  struct Scene *scene);
 
-/* Delete scene graph. */
-void DEG_scene_graph_free(struct Scene *scene);
-
 /* Add Dependencies  ----------------------------- */
 
 /* Handle for components to define their dependencies from callbacks.
diff --git a/source/blender/depsgraph/intern/depsgraph_build.cc b/source/blender/depsgraph/intern/depsgraph_build.cc
index 42ccd806dc8..87dcde045a6 100644
--- a/source/blender/depsgraph/intern/depsgraph_build.cc
+++ b/source/blender/depsgraph/intern/depsgraph_build.cc
@@ -304,14 +304,6 @@ void DEG_scene_relations_rebuild(Main *bmain, Scene *scene)
 	DEG_scene_relations_update(bmain, scene);
 }
 
-void DEG_scene_graph_free(Scene *scene)
-{
-	if (scene->depsgraph_legacy) {
-		DEG_graph_free(scene->depsgraph_legacy);
-		scene->depsgraph_legacy = NULL;
-	}
-}
-
 void DEG_add_collision_relations(DepsNodeHandle *handle,
                                  Scene *scene,
                                  Object *ob,



More information about the Bf-blender-cvs mailing list