[Bf-blender-cvs] [a781b6fc3a0] functions: rename BTreeDataGraph to VTreeDataGraph

Jacques Lucke noreply at git.blender.org
Tue Jul 23 19:17:03 CEST 2019


Commit: a781b6fc3a00d4af2f56fb9e984147e0cba0f3e4
Author: Jacques Lucke
Date:   Tue Jul 23 18:06:41 2019 +0200
Branches: functions
https://developer.blender.org/rBa781b6fc3a00d4af2f56fb9e984147e0cba0f3e4

rename BTreeDataGraph to VTreeDataGraph

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

M	source/blender/functions/frontends/data_flow_nodes/function_generation.cpp
M	source/blender/functions/frontends/data_flow_nodes/graph_generation.cpp
M	source/blender/functions/frontends/data_flow_nodes/graph_generation.hpp
M	source/blender/simulations/bparticles/inserters.cpp
M	source/blender/simulations/bparticles/inserters.hpp

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

diff --git a/source/blender/functions/frontends/data_flow_nodes/function_generation.cpp b/source/blender/functions/frontends/data_flow_nodes/function_generation.cpp
index 3a377af43b7..c46cca39730 100644
--- a/source/blender/functions/frontends/data_flow_nodes/function_generation.cpp
+++ b/source/blender/functions/frontends/data_flow_nodes/function_generation.cpp
@@ -10,7 +10,7 @@ namespace FN {
 namespace DataFlowNodes {
 
 static void find_interface_sockets(VirtualNodeTree &vtree,
-                                   BTreeDataGraph &graph,
+                                   VTreeDataGraph &data_graph,
                                    DFGraphSocketSetVector &r_inputs,
                                    DFGraphSocketSetVector &r_outputs)
 {
@@ -20,26 +20,26 @@ static void find_interface_sockets(VirtualNodeTree &vtree,
   if (input_node != nullptr) {
     for (uint i = 0; i < input_node->outputs().size() - 1; i++) {
       VirtualSocket *vsocket = input_node->output(i);
-      r_inputs.add_new(graph.lookup_socket(vsocket));
+      r_inputs.add_new(data_graph.lookup_socket(vsocket));
     }
   }
 
   if (output_node != nullptr) {
     for (uint i = 0; i < output_node->inputs().size() - 1; i++) {
       VirtualSocket *vsocket = output_node->input(i);
-      r_outputs.add_new(graph.lookup_socket(vsocket));
+      r_outputs.add_new(data_graph.lookup_socket(vsocket));
     }
   }
 }
 
 static Optional<FunctionGraph> generate_function_graph(VirtualNodeTree &vtree)
 {
-  Optional<BTreeDataGraph> data_graph_ = generate_graph(vtree);
+  Optional<VTreeDataGraph> data_graph_ = generate_graph(vtree);
   if (!data_graph_.has_value()) {
     return {};
   }
 
-  BTreeDataGraph &data_graph = data_graph_.value();
+  VTreeDataGraph &data_graph = data_graph_.value();
 
   DFGraphSocketSetVector input_sockets;
   DFGraphSocketSetVector output_sockets;
diff --git a/source/blender/functions/frontends/data_flow_nodes/graph_generation.cpp b/source/blender/functions/frontends/data_flow_nodes/graph_generation.cpp
index 5bd7129e65f..5972afb9f65 100644
--- a/source/blender/functions/frontends/data_flow_nodes/graph_generation.cpp
+++ b/source/blender/functions/frontends/data_flow_nodes/graph_generation.cpp
@@ -119,7 +119,7 @@ class BasicUnlinkedInputsHandler : public UnlinkedInputsHandler {
   }
 };
 
-Optional<BTreeDataGraph> generate_graph(VirtualNodeTree &vtree)
+Optional<VTreeDataGraph> generate_graph(VirtualNodeTree &vtree)
 {
   DataFlowGraphBuilder graph_builder;
   Map<VirtualSocket *, DFGB_Socket> socket_map;
@@ -140,7 +140,7 @@ Optional<BTreeDataGraph> generate_graph(VirtualNodeTree &vtree)
   insert_unlinked_inputs(builder, unlinked_inputs_handler);
 
   auto build_result = DataFlowGraph::FromBuilder(graph_builder);
-  return BTreeDataGraph(std::move(build_result.graph),
+  return VTreeDataGraph(std::move(build_result.graph),
                         build_mapping_for_original_sockets(socket_map, build_result.mapping));
 }
 
diff --git a/source/blender/functions/frontends/data_flow_nodes/graph_generation.hpp b/source/blender/functions/frontends/data_flow_nodes/graph_generation.hpp
index 97c1a5f1504..3cf6f199d77 100644
--- a/source/blender/functions/frontends/data_flow_nodes/graph_generation.hpp
+++ b/source/blender/functions/frontends/data_flow_nodes/graph_generation.hpp
@@ -20,13 +20,13 @@ class UnlinkedInputsHandler {
                       Vector<DFGB_Socket> &r_inserted_data_origins) = 0;
 };
 
-class BTreeDataGraph {
+class VTreeDataGraph {
  private:
   SharedDataFlowGraph m_graph;
   Map<VirtualSocket *, DFGraphSocket> m_mapping;
 
  public:
-  BTreeDataGraph(SharedDataFlowGraph graph, Map<VirtualSocket *, DFGraphSocket> mapping)
+  VTreeDataGraph(SharedDataFlowGraph graph, Map<VirtualSocket *, DFGraphSocket> mapping)
       : m_graph(std::move(graph)), m_mapping(std::move(mapping))
   {
   }
@@ -47,7 +47,7 @@ class BTreeDataGraph {
   }
 };
 
-Optional<BTreeDataGraph> generate_graph(VirtualNodeTree &vtree);
+Optional<VTreeDataGraph> generate_graph(VirtualNodeTree &vtree);
 
 }  // namespace DataFlowNodes
 }  // namespace FN
diff --git a/source/blender/simulations/bparticles/inserters.cpp b/source/blender/simulations/bparticles/inserters.cpp
index e5086d7511e..0b80230c1c1 100644
--- a/source/blender/simulations/bparticles/inserters.cpp
+++ b/source/blender/simulations/bparticles/inserters.cpp
@@ -28,7 +28,7 @@ static bool is_particle_data_input(VirtualNode *vnode)
 }
 
 static Vector<FN::DFGraphSocket> insert_inputs(FN::FunctionBuilder &fn_builder,
-                                               BTreeDataGraph &data_graph,
+                                               VTreeDataGraph &data_graph,
                                                ArrayRef<VirtualSocket *> output_vsockets)
 {
   Set<VirtualSocket *> to_be_checked = output_vsockets;
@@ -71,7 +71,7 @@ static Vector<FN::DFGraphSocket> insert_inputs(FN::FunctionBuilder &fn_builder,
   return inputs;
 }
 
-static SharedFunction create_function(BTreeDataGraph &data_graph,
+static SharedFunction create_function(VTreeDataGraph &data_graph,
                                       ArrayRef<VirtualSocket *> output_vsockets,
                                       StringRef name)
 {
@@ -93,7 +93,7 @@ static SharedFunction create_function(BTreeDataGraph &data_graph,
 }
 
 static SharedFunction create_function_for_data_inputs(VirtualNode *vnode,
-                                                      BTreeDataGraph &data_graph)
+                                                      VTreeDataGraph &data_graph)
 {
   Vector<VirtualSocket *> bsockets_to_compute;
   for (VirtualSocket *vsocket : vnode->inputs()) {
diff --git a/source/blender/simulations/bparticles/inserters.hpp b/source/blender/simulations/bparticles/inserters.hpp
index 20f02f56f0a..68284f81c14 100644
--- a/source/blender/simulations/bparticles/inserters.hpp
+++ b/source/blender/simulations/bparticles/inserters.hpp
@@ -20,10 +20,10 @@ using BKE::VirtualNode;
 using BKE::VirtualNodeTree;
 using BKE::VirtualSocket;
 using BLI::StringMap;
-using FN::DataFlowNodes::BTreeDataGraph;
+using FN::DataFlowNodes::VTreeDataGraph;
 
 struct BuildContext {
-  BTreeDataGraph &data_graph;
+  VTreeDataGraph &data_graph;
   Set<std::string> &particle_type_names;
   WorldState &world_state;



More information about the Bf-blender-cvs mailing list