[Bf-blender-cvs] [50fda06ef55] temp-derived-node-tree-refactor: initial xxx node tree

Jacques Lucke noreply at git.blender.org
Wed Mar 3 09:57:02 CET 2021


Commit: 50fda06ef554732a17e14864e478741948f7a85a
Author: Jacques Lucke
Date:   Wed Mar 3 08:13:17 2021 +0100
Branches: temp-derived-node-tree-refactor
https://developer.blender.org/rB50fda06ef554732a17e14864e478741948f7a85a

initial xxx node tree

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

M	source/blender/nodes/CMakeLists.txt
A	source/blender/nodes/NOD_XXX_node_tree.hh
M	source/blender/nodes/NOD_derived_node_tree.hh
M	source/blender/nodes/NOD_node_tree_ref.hh
A	source/blender/nodes/intern/xxx_node_tree.cc

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

diff --git a/source/blender/nodes/CMakeLists.txt b/source/blender/nodes/CMakeLists.txt
index 8c5081555fc..e374f669d86 100644
--- a/source/blender/nodes/CMakeLists.txt
+++ b/source/blender/nodes/CMakeLists.txt
@@ -307,6 +307,7 @@ set(SRC
   intern/node_tree_ref.cc
   intern/node_util.c
   intern/type_callbacks.cc
+  intern/xxx_node_tree.cc
 
   composite/node_composite_util.h
   function/node_function_util.hh
@@ -329,6 +330,7 @@ set(SRC
   NOD_static_types.h
   NOD_texture.h
   NOD_type_callbacks.hh
+  NOD_XXX_node_tree.hh
   intern/node_common.h
   intern/node_exec.h
   intern/node_util.h
diff --git a/source/blender/nodes/NOD_XXX_node_tree.hh b/source/blender/nodes/NOD_XXX_node_tree.hh
new file mode 100644
index 00000000000..162740cb21c
--- /dev/null
+++ b/source/blender/nodes/NOD_XXX_node_tree.hh
@@ -0,0 +1,65 @@
+/*
+ * 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 "NOD_node_tree_ref.hh"
+
+namespace blender::nodes {
+
+class XXXNodeTreeContextInfo {
+ private:
+  XXXNodeTreeContextInfo *parent_;
+  NodeTreeRef *tree_;
+  Map<const NodeRef *, XXXNodeTreeContextInfo *> children_;
+};
+
+class XXXNodeTreeContext {
+ private:
+  XXXNodeTreeContextInfo *context_;
+};
+
+struct XXXNode {
+  XXXNodeTreeContext context;
+  NodeRef *node;
+};
+
+struct XXXSocket {
+  XXXNodeTreeContext context;
+  SocketRef *socket;
+};
+
+struct XXXInputSocket {
+  XXXNodeTreeContext context;
+  InputSocketRef *socket;
+};
+
+struct XXXOutputSocket {
+  XXXNodeTreeContext context;
+  OutputSocketRef *socket;
+};
+
+class XXXNodeTree {
+ private:
+  LinearAllocator<> allocator_;
+  XXXNodeTreeContextInfo *root_context_info_;
+
+ public:
+  XXXNodeTree(bNodeTree *btree, NodeTreeRefMap &node_tree_refs);
+  ~XXXNodeTree();
+};
+
+}  // namespace blender::nodes
diff --git a/source/blender/nodes/NOD_derived_node_tree.hh b/source/blender/nodes/NOD_derived_node_tree.hh
index 62affe43895..ea67f23eade 100644
--- a/source/blender/nodes/NOD_derived_node_tree.hh
+++ b/source/blender/nodes/NOD_derived_node_tree.hh
@@ -174,8 +174,6 @@ class DParentNode : NonCopyable, NonMovable {
   int id() const;
 };
 
-using NodeTreeRefMap = Map<bNodeTree *, std::unique_ptr<const NodeTreeRef>>;
-
 class DerivedNodeTree : NonCopyable, NonMovable {
  private:
   LinearAllocator<> allocator_;
diff --git a/source/blender/nodes/NOD_node_tree_ref.hh b/source/blender/nodes/NOD_node_tree_ref.hh
index c1ff7bfe5e0..5bc09993a51 100644
--- a/source/blender/nodes/NOD_node_tree_ref.hh
+++ b/source/blender/nodes/NOD_node_tree_ref.hh
@@ -217,6 +217,8 @@ class NodeTreeRef : NonCopyable, NonMovable {
   void find_targets_skipping_reroutes(OutputSocketRef &socket_ref, Vector<SocketRef *> &r_targets);
 };
 
+using NodeTreeRefMap = Map<bNodeTree *, std::unique_ptr<const NodeTreeRef>>;
+
 /* --------------------------------------------------------------------
  * SocketRef inline methods.
  */
diff --git a/source/blender/nodes/intern/xxx_node_tree.cc b/source/blender/nodes/intern/xxx_node_tree.cc
new file mode 100644
index 00000000000..fe0d95e1848
--- /dev/null
+++ b/source/blender/nodes/intern/xxx_node_tree.cc
@@ -0,0 +1,29 @@
+/*
+ * 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_XXX_node_tree.hh"
+
+namespace blender::nodes {
+
+XXXNodeTree::XXXNodeTree(bNodeTree *btree, NodeTreeRefMap &node_tree_refs)
+{
+}
+
+XXXNodeTree::~XXXNodeTree()
+{
+}
+
+}  // namespace blender::nodes



More information about the Bf-blender-cvs mailing list