[Bf-blender-cvs] [e43e278b38c] master: Cleanup: Remove unused depsgraph function

Sergey Sharybin noreply at git.blender.org
Thu Jun 20 10:37:05 CEST 2019


Commit: e43e278b38c87945322195757947ce22b3cc4c64
Author: Sergey Sharybin
Date:   Thu Jun 20 10:31:05 2019 +0200
Branches: master
https://developer.blender.org/rBe43e278b38c87945322195757947ce22b3cc4c64

Cleanup: Remove unused depsgraph function

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

M	source/blender/depsgraph/DEG_depsgraph_query.h
M	source/blender/depsgraph/intern/depsgraph_query.cc

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

diff --git a/source/blender/depsgraph/DEG_depsgraph_query.h b/source/blender/depsgraph/DEG_depsgraph_query.h
index 00bb02d7205..4148529d3f8 100644
--- a/source/blender/depsgraph/DEG_depsgraph_query.h
+++ b/source/blender/depsgraph/DEG_depsgraph_query.h
@@ -85,16 +85,6 @@ void DEG_get_customdata_mask_for_object(const struct Depsgraph *graph,
  * one. Assert will happen if it's not. */
 struct Scene *DEG_get_evaluated_scene(const struct Depsgraph *graph);
 
-/* Similar to DEG_get_evaluated_scene(), but allows to access non-fully evaluated pointer without
- * causing asserts or crashes. Works the following way:
- *  - If the scene was never evaluated NULL returned.
- *  - Otherwise the last known state of the scene is returned.
- *
- * Use in exceptional case if it's absolutely must to.
- *
- * Allows to pass depsgraph == NULL, will return NULL in that case. */
-struct Scene *DEG_get_evaluated_scene_if_exists(const struct Depsgraph *graph);
-
 /* Get view layer at its evaluated state.
  * This is a shortcut for accessing active view layer from evaluated scene. */
 struct ViewLayer *DEG_get_evaluated_view_layer(const struct Depsgraph *graph);
diff --git a/source/blender/depsgraph/intern/depsgraph_query.cc b/source/blender/depsgraph/intern/depsgraph_query.cc
index 48dbd4b0945..f821af8cdc7 100644
--- a/source/blender/depsgraph/intern/depsgraph_query.cc
+++ b/source/blender/depsgraph/intern/depsgraph_query.cc
@@ -160,19 +160,6 @@ Scene *DEG_get_evaluated_scene(const Depsgraph *graph)
   return scene_cow;
 }
 
-Scene *DEG_get_evaluated_scene_if_exists(const Depsgraph *graph)
-{
-  if (graph == NULL) {
-    return NULL;
-  }
-  const DEG::Depsgraph *deg_graph = reinterpret_cast<const DEG::Depsgraph *>(graph);
-  Scene *scene_cow = deg_graph->scene_cow;
-  if (scene_cow == NULL || !DEG::deg_copy_on_write_is_expanded(&scene_cow->id)) {
-    return NULL;
-  }
-  return scene_cow;
-}
-
 ViewLayer *DEG_get_evaluated_view_layer(const Depsgraph *graph)
 {
   const DEG::Depsgraph *deg_graph = reinterpret_cast<const DEG::Depsgraph *>(graph);



More information about the Bf-blender-cvs mailing list