[Bf-blender-cvs] [7ed83e0bee3] functions: Move inlined node tree to functions folder

Jacques Lucke noreply at git.blender.org
Thu Jan 2 16:37:32 CET 2020


Commit: 7ed83e0bee3899a74d14eafeb30cd4c0e7f08a83
Author: Jacques Lucke
Date:   Tue Dec 31 13:53:48 2019 +0100
Branches: functions
https://developer.blender.org/rB7ed83e0bee3899a74d14eafeb30cd4c0e7f08a83

Move inlined node tree to functions folder

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

M	source/blender/blenkernel/CMakeLists.txt
M	source/blender/functions/CMakeLists.txt
M	source/blender/functions/FN_inlined_tree_multi_function_network.h
M	source/blender/functions/FN_multi_function_dependencies.h
R097	source/blender/blenkernel/BKE_inlined_node_tree.h	source/blender/functions/FN_node_tree.h
M	source/blender/functions/intern/inlined_tree_multi_function_network/builder.h
M	source/blender/functions/intern/inlined_tree_multi_function_network/generate.cc
M	source/blender/functions/intern/inlined_tree_multi_function_network/mappings_nodes.cc
R099	source/blender/blenkernel/intern/inlined_node_tree.cc	source/blender/functions/intern/node_tree.cc
M	source/blender/modifiers/intern/MOD_functiondeform_cxx.cc
M	source/blender/modifiers/intern/MOD_functionpoints_cxx.cc
M	source/blender/simulations/bparticles/c_wrapper.cpp
M	source/blender/simulations/bparticles/node_frontend.cpp
M	source/blender/simulations/bparticles/node_frontend.hpp

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

diff --git a/source/blender/blenkernel/CMakeLists.txt b/source/blender/blenkernel/CMakeLists.txt
index 2e49521c97a..2bccd8310fd 100644
--- a/source/blender/blenkernel/CMakeLists.txt
+++ b/source/blender/blenkernel/CMakeLists.txt
@@ -129,7 +129,6 @@ set(SRC
   intern/image.c
   intern/image_gen.c
   intern/image_save.c
-  intern/inlined_node_tree.cc
   intern/ipo.c
   intern/kelvinlet.c
   intern/key.c
@@ -297,7 +296,6 @@ set(SRC
   BKE_id_handle.h
   BKE_image.h
   BKE_image_save.h
-  BKE_inlined_node_tree.h
   BKE_ipo.h
   BKE_kelvinlet.h
   BKE_key.h
diff --git a/source/blender/functions/CMakeLists.txt b/source/blender/functions/CMakeLists.txt
index e321271e4a1..4bd7e4f3c68 100644
--- a/source/blender/functions/CMakeLists.txt
+++ b/source/blender/functions/CMakeLists.txt
@@ -45,6 +45,7 @@ set(SRC
   intern/multi_function_common_contexts.cc
   intern/multi_function_context.cc
   intern/multi_function_network.cc
+  intern/node_tree.cc
 
   FN_attributes_block_container.h
   FN_attributes_ref.h
@@ -65,6 +66,7 @@ set(SRC
   FN_multi_functions.h
   FN_inlined_tree_multi_function_network_generation.h
   FN_inlined_tree_multi_function_network.h
+  FN_node_tree.h
 
   intern/multi_functions/customizable.h
   intern/multi_functions/lists.h
diff --git a/source/blender/functions/FN_inlined_tree_multi_function_network.h b/source/blender/functions/FN_inlined_tree_multi_function_network.h
index 34bb9e23c44..c2fa36ac2b4 100644
--- a/source/blender/functions/FN_inlined_tree_multi_function_network.h
+++ b/source/blender/functions/FN_inlined_tree_multi_function_network.h
@@ -1,7 +1,7 @@
 #ifndef __FN_VTREE_MULTI_FUNCTION_NETWORK_H__
 #define __FN_VTREE_MULTI_FUNCTION_NETWORK_H__
 
-#include "BKE_inlined_node_tree.h"
+#include "FN_node_tree.h"
 
 #include "BLI_multi_map.h"
 
@@ -9,11 +9,6 @@
 
 namespace FN {
 
-using BKE::InlinedNodeTree;
-using BKE::XInputSocket;
-using BKE::XNode;
-using BKE::XOutputSocket;
-using BKE::XSocket;
 using BLI::MultiMap;
 
 #define InlinedTreeMFSocketMap_UNMAPPED UINT_MAX
diff --git a/source/blender/functions/FN_multi_function_dependencies.h b/source/blender/functions/FN_multi_function_dependencies.h
index 2086e33bdc5..f34dc24074b 100644
--- a/source/blender/functions/FN_multi_function_dependencies.h
+++ b/source/blender/functions/FN_multi_function_dependencies.h
@@ -6,13 +6,10 @@
 #include "DNA_object_types.h"
 #include "DNA_image_types.h"
 
-#include "BKE_inlined_node_tree.h"
+#include "FN_node_tree.h"
 
 namespace FN {
 
-using BKE::InlinedNodeTree;
-using BKE::XGroupInput;
-using BKE::XInputSocket;
 using BLI::Set;
 
 inline Set<Object *> get_objects_used_by_sockets(const InlinedNodeTree &inlined_tree)
diff --git a/source/blender/blenkernel/BKE_inlined_node_tree.h b/source/blender/functions/FN_node_tree.h
similarity index 97%
rename from source/blender/blenkernel/BKE_inlined_node_tree.h
rename to source/blender/functions/FN_node_tree.h
index a7dab0d008a..d6018824ce6 100644
--- a/source/blender/blenkernel/BKE_inlined_node_tree.h
+++ b/source/blender/functions/FN_node_tree.h
@@ -6,11 +6,21 @@
 #include "BLI_map.h"
 #include "BLI_multi_map.h"
 
-namespace BKE {
-
+namespace FN {
+
+using BKE::VInputSocket;
+using BKE::VirtualNodeTree;
+using BKE::VNode;
+using BKE::VOutputSocket;
+using BKE::VSocket;
+using BLI::ArrayRef;
 using BLI::Map;
 using BLI::MultiMap;
 using BLI::MutableArrayRef;
+using BLI::StringMap;
+using BLI::StringRef;
+using BLI::StringRefNull;
+using BLI::Vector;
 
 class XNode;
 class XParentNode;
@@ -444,6 +454,6 @@ inline ArrayRef<const XNode *> InlinedNodeTree::nodes_with_idname(StringRef idna
   }
 }
 
-}  // namespace BKE
+}  // namespace FN
 
 #endif /* __BKE_INLINED_NODE_TREE_H__ */
diff --git a/source/blender/functions/intern/inlined_tree_multi_function_network/builder.h b/source/blender/functions/intern/inlined_tree_multi_function_network/builder.h
index 2f6a5ebdfff..934edf8d0f7 100644
--- a/source/blender/functions/intern/inlined_tree_multi_function_network/builder.h
+++ b/source/blender/functions/intern/inlined_tree_multi_function_network/builder.h
@@ -10,7 +10,6 @@
 namespace FN {
 
 using BKE::VSocket;
-using BKE::XGroupInput;
 using BLI::MultiMap;
 
 class PreprocessedVTreeMFData {
diff --git a/source/blender/functions/intern/inlined_tree_multi_function_network/generate.cc b/source/blender/functions/intern/inlined_tree_multi_function_network/generate.cc
index fe7a611f532..a64d7d69354 100644
--- a/source/blender/functions/intern/inlined_tree_multi_function_network/generate.cc
+++ b/source/blender/functions/intern/inlined_tree_multi_function_network/generate.cc
@@ -10,8 +10,6 @@
 
 namespace FN {
 
-using BKE::XGroupInput;
-
 static bool insert_nodes(InlinedTreeMFNetworkBuilder &builder,
                          const VTreeMultiFunctionMappings &mappings)
 {
diff --git a/source/blender/functions/intern/inlined_tree_multi_function_network/mappings_nodes.cc b/source/blender/functions/intern/inlined_tree_multi_function_network/mappings_nodes.cc
index f3b658831b5..32b9879d5b8 100644
--- a/source/blender/functions/intern/inlined_tree_multi_function_network/mappings_nodes.cc
+++ b/source/blender/functions/intern/inlined_tree_multi_function_network/mappings_nodes.cc
@@ -530,7 +530,7 @@ static void INSERT_node_instance_identifier(VNodeMFNetworkBuilder &builder)
 {
   const XNode &xnode = builder.xnode();
   std::string identifier = "";
-  for (const BKE::XParentNode *parent = xnode.parent(); parent; parent = parent->parent()) {
+  for (const FN::XParentNode *parent = xnode.parent(); parent; parent = parent->parent()) {
     identifier = parent->vnode().name() + "/" + identifier;
   }
   identifier = "/nodeid/" + identifier + xnode.name();
diff --git a/source/blender/blenkernel/intern/inlined_node_tree.cc b/source/blender/functions/intern/node_tree.cc
similarity index 99%
rename from source/blender/blenkernel/intern/inlined_node_tree.cc
rename to source/blender/functions/intern/node_tree.cc
index b1f266b3e50..3bce7eeaaf4 100644
--- a/source/blender/blenkernel/intern/inlined_node_tree.cc
+++ b/source/blender/functions/intern/node_tree.cc
@@ -1,4 +1,4 @@
-#include "BKE_inlined_node_tree.h"
+#include "FN_node_tree.h"
 
 #include "BLI_string.h"
 #include "BLI_dot_export.h"
@@ -7,7 +7,7 @@ extern "C" {
 void WM_clipboard_text_set(const char *buf, bool selection);
 }
 
-namespace BKE {
+namespace FN {
 
 static const VirtualNodeTree &get_vtree(BTreeVTreeMap &vtrees, bNodeTree *btree)
 {
@@ -484,4 +484,4 @@ const XInputSocket *XNode::input_with_name_prefix(StringRef name_prefix) const
   return nullptr;
 }
 
-}  // namespace BKE
+}  // namespace FN
diff --git a/source/blender/modifiers/intern/MOD_functiondeform_cxx.cc b/source/blender/modifiers/intern/MOD_functiondeform_cxx.cc
index e9d6d5d56fb..03de3caa92c 100644
--- a/source/blender/modifiers/intern/MOD_functiondeform_cxx.cc
+++ b/source/blender/modifiers/intern/MOD_functiondeform_cxx.cc
@@ -12,13 +12,13 @@
 
 #include "DEG_depsgraph_query.h"
 
-using BKE::InlinedNodeTree;
 using BKE::VNode;
 using BLI::ArrayRef;
 using BLI::float3;
 using BLI::IndexRange;
 using BLI::LargeScopedVector;
 using BLI::Vector;
+using FN::InlinedNodeTree;
 using FN::MFContext;
 using FN::MFContextBuilder;
 using FN::MFInputSocket;
@@ -45,7 +45,7 @@ void MOD_functiondeform_do(FunctionDeformModifierData *fdmd,
 
   bNodeTree *btree = (bNodeTree *)DEG_get_original_id((ID *)fdmd->function_tree);
 
-  BKE::BTreeVTreeMap vtrees;
+  FN::BTreeVTreeMap vtrees;
   InlinedNodeTree inlined_tree(btree, vtrees);
 
   BLI::ResourceCollector resources;
diff --git a/source/blender/modifiers/intern/MOD_functionpoints_cxx.cc b/source/blender/modifiers/intern/MOD_functionpoints_cxx.cc
index 0da552ae03c..03c53bb5866 100644
--- a/source/blender/modifiers/intern/MOD_functionpoints_cxx.cc
+++ b/source/blender/modifiers/intern/MOD_functionpoints_cxx.cc
@@ -16,12 +16,12 @@
 #include "DEG_depsgraph.h"
 #include "DEG_depsgraph_query.h"
 
-using BKE::InlinedNodeTree;
 using BKE::VNode;
 using BLI::ArrayRef;
 using BLI::float3;
 using BLI::IndexRange;
 using BLI::Vector;
+using FN::InlinedNodeTree;
 using FN::MFContext;
 using FN::MFInputSocket;
 using FN::MFOutputSocket;
@@ -41,7 +41,7 @@ Mesh *MOD_functionpoints_do(FunctionPointsModifierData *fpmd,
 
   bNodeTree *btree = (bNodeTree *)DEG_get_original_id((ID *)fpmd->function_tree);
 
-  BKE::BTreeVTreeMap vtrees;
+  FN::BTreeVTreeMap vtrees;
   InlinedNodeTree inlined_tree(btree, vtrees);
 
   BLI::ResourceCollector resources;
diff --git a/source/blender/simulations/bparticles/c_wrapper.cpp b/source/blender/simulations/bparticles/c_wrapper.cpp
index 364aab2cc7f..139d62cea10 100644
--- a/source/blender/simulations/bparticles/c_wrapper.cpp
+++ b/source/blender/simulations/bparticles/c_wrapper.cpp
@@ -9,7 +9,7 @@
 
 #include "BKE_mesh.h"
 #include "BKE_customdata.h"
-#include "BKE_inlined_node_tree.h"
+#include "FN_node_tree.h"
 
 #include "DEG_depsgraph_query.h"
 
diff --git a/source/blender/simulations/bparticles/node_frontend.cpp b/source/blender/simulations/bparticles/node_frontend.cpp
index 76936637054..71c3761e700 100644
--- a/source/blender/simulations/bparticles/node_frontend.cpp
+++ b/source/blender/simulations/bparticles/node_frontend.cpp
@@ -1,4 +1,3 @@
-#include "BKE_inlined_node_tree.h"
 #include "BKE_deform.h"
 #include "BKE_surface_hook.h"
 #include "BKE_id_data_cache.h"
@@ -11,6 +10,7 @@
 #include "BLI_set.h"
 #include "BLI_lazy_init_cxx.h"
 
+#include "FN_node_tree.h"
 #include "FN_multi_functions.h"
 #include "FN_generic_tuple.h"
 #include "FN_inlined_tree_multi_function_network_generation.h"
@@ -29,11 +29,6 @@ namespace BParticles {
 using BKE::IDDataCache;
 using BKE::IDHandleLookup;
 using BKE::ObjectIDHandle;
-using BKE::XGroupInput;
-using BKE::XInputSocket;
-using BKE::XNode;
-using BKE::XOutputSocket;
-using BKE::XSocket;
 using BLI::destruct_ptr;
 using BLI::MultiMap;
 using BLI::ResourceCollector;
@@ -47,6 +42,11 @@ using FN::MFInputSocket;
 using FN::MFOutputSocket;
 using FN::MultiFunction;
 using FN::NamedGenericTupleRef;
+using FN::XGroupInput;
+using FN::XInputSocket;
+using FN::XNode;
+using FN::XOutputSocket;
+using FN::XSocket;
 
 static StringRef particle_system_idname = "fn_ParticleSystemNode";
 static StringRef combine_influen

@@ Diff output truncated at 10240 characters. @@



More information about the Bf-blender-cvs mailing list