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>2021-03-07 18:08:45 +0300
committerJacques Lucke <jacques@blender.org>2021-03-07 18:08:59 +0300
commita9fc9ce0aec0ab5ea1dc1cee9a5a77cb2ef9052d (patch)
tree60d3978d3a65d871103521c182239a7c666f8883 /source/blender/nodes
parentb30f89918ee16ae3473faa2cfaa5c843b012d878 (diff)
Cleanup: remove dead code
Diffstat (limited to 'source/blender/nodes')
-rw-r--r--source/blender/nodes/CMakeLists.txt2
-rw-r--r--source/blender/nodes/NOD_node_tree_dependencies.hh76
-rw-r--r--source/blender/nodes/intern/node_tree_dependencies.cc57
3 files changed, 0 insertions, 135 deletions
diff --git a/source/blender/nodes/CMakeLists.txt b/source/blender/nodes/CMakeLists.txt
index e21959d839c..9386f686c73 100644
--- a/source/blender/nodes/CMakeLists.txt
+++ b/source/blender/nodes/CMakeLists.txt
@@ -302,7 +302,6 @@ set(SRC
intern/node_exec.c
intern/node_geometry_exec.cc
intern/node_socket.cc
- intern/node_tree_dependencies.cc
intern/node_tree_multi_function.cc
intern/node_tree_ref.cc
intern/node_util.c
@@ -321,7 +320,6 @@ set(SRC
NOD_geometry.h
NOD_geometry_exec.hh
NOD_math_functions.hh
- NOD_node_tree_dependencies.hh
NOD_node_tree_multi_function.hh
NOD_node_tree_ref.hh
NOD_shader.h
diff --git a/source/blender/nodes/NOD_node_tree_dependencies.hh b/source/blender/nodes/NOD_node_tree_dependencies.hh
deleted file mode 100644
index 13bb2bde2f3..00000000000
--- a/source/blender/nodes/NOD_node_tree_dependencies.hh
+++ /dev/null
@@ -1,76 +0,0 @@
-/*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- */
-
-#pragma once
-
-#include "BLI_vector_set.hh"
-
-#include "DNA_ID.h"
-#include "DNA_object_types.h"
-
-struct bNodeTree;
-
-namespace blender::nodes {
-
-class NodeTreeDependencies {
- private:
- VectorSet<Object *> transform_deps_;
- VectorSet<Object *> geometry_deps_;
- VectorSet<ID *> id_deps_;
-
- public:
- void add_transform_dependency(Object *object)
- {
- if (object == nullptr) {
- return;
- }
- transform_deps_.add(object);
- id_deps_.add(&object->id);
- }
-
- void add_geometry_dependency(Object *object)
- {
- if (object == nullptr) {
- return;
- }
- geometry_deps_.add(object);
- id_deps_.add(&object->id);
- }
-
- bool depends_on(ID *id) const
- {
- return id_deps_.contains(id);
- }
-
- Span<Object *> transform_dependencies()
- {
- return transform_deps_;
- }
-
- Span<Object *> geometry_dependencies()
- {
- return geometry_deps_;
- }
-
- Span<ID *> id_dependencies()
- {
- return id_deps_;
- }
-};
-
-NodeTreeDependencies find_node_tree_dependencies(bNodeTree &ntree);
-
-} // namespace blender::nodes
diff --git a/source/blender/nodes/intern/node_tree_dependencies.cc b/source/blender/nodes/intern/node_tree_dependencies.cc
deleted file mode 100644
index 9d279dd4d75..00000000000
--- a/source/blender/nodes/intern/node_tree_dependencies.cc
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- */
-
-#include "NOD_node_tree_dependencies.hh"
-
-#include "DNA_node_types.h"
-
-#include "BKE_node.h"
-
-namespace blender::nodes {
-
-static void add_dependencies_of_node_tree(bNodeTree &ntree, NodeTreeDependencies &r_dependencies)
-{
- /* TODO: Do a bit more sophisticated parsing to see which dependencies are really required. */
- LISTBASE_FOREACH (bNode *, node, &ntree.nodes) {
- LISTBASE_FOREACH (bNodeSocket *, socket, &node->inputs) {
- if (socket->type == SOCK_OBJECT) {
- Object *object = reinterpret_cast<bNodeSocketValueObject *>(socket->default_value)->value;
- if (object != nullptr) {
- r_dependencies.add_transform_dependency(object);
- if (object->type == OB_MESH) {
- r_dependencies.add_geometry_dependency(object);
- }
- }
- }
- }
-
- if (node->type == NODE_GROUP) {
- bNodeTree *group = reinterpret_cast<bNodeTree *>(node->id);
- if (group != nullptr) {
- add_dependencies_of_node_tree(*group, r_dependencies);
- }
- }
- }
-}
-
-NodeTreeDependencies find_node_tree_dependencies(bNodeTree &ntree)
-{
- NodeTreeDependencies dependencies;
- add_dependencies_of_node_tree(ntree, dependencies);
- return dependencies;
-}
-
-} // namespace blender::nodes