[Bf-blender-cvs] [79ec9180e6e] functions: rename GeneratedGraph to BTreeDataGraph

Jacques Lucke noreply at git.blender.org
Thu Jul 11 17:15:29 CEST 2019


Commit: 79ec9180e6e36cc2d24c47cb65d4ca407951240e
Author: Jacques Lucke
Date:   Thu Jul 11 13:37:43 2019 +0200
Branches: functions
https://developer.blender.org/rB79ec9180e6e36cc2d24c47cb65d4ca407951240e

rename GeneratedGraph to BTreeDataGraph

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

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/graph_generation.cpp b/source/blender/functions/frontends/data_flow_nodes/graph_generation.cpp
index 2e7db3c2d58..132fed03859 100644
--- a/source/blender/functions/frontends/data_flow_nodes/graph_generation.cpp
+++ b/source/blender/functions/frontends/data_flow_nodes/graph_generation.cpp
@@ -89,7 +89,7 @@ static void insert_unlinked_inputs(BTreeGraphBuilder &builder,
 }
 
 static void find_interface_sockets(IndexedNodeTree &indexed_btree,
-                                   GeneratedGraph &graph,
+                                   BTreeDataGraph &graph,
                                    DFGraphSocketSetVector &r_inputs,
                                    DFGraphSocketSetVector &r_outputs)
 {
@@ -143,7 +143,7 @@ class BasicUnlinkedInputsHandler : public UnlinkedInputsHandler {
   }
 };
 
-Optional<GeneratedGraph> generate_graph(IndexedNodeTree &indexed_btree)
+Optional<BTreeDataGraph> generate_graph(IndexedNodeTree &indexed_btree)
 {
   DataFlowGraphBuilder graph_builder;
   SmallMap<bNodeSocket *, DFGB_Socket> socket_map;
@@ -164,24 +164,24 @@ Optional<GeneratedGraph> generate_graph(IndexedNodeTree &indexed_btree)
   insert_unlinked_inputs(builder, unlinked_inputs_handler);
 
   auto build_result = DataFlowGraph::FromBuilder(graph_builder);
-  return GeneratedGraph(std::move(build_result.graph),
+  return BTreeDataGraph(std::move(build_result.graph),
                         build_mapping_for_original_sockets(socket_map, build_result.mapping));
 }
 
 Optional<FunctionGraph> generate_function_graph(IndexedNodeTree &indexed_btree)
 {
-  Optional<GeneratedGraph> generated_graph_ = generate_graph(indexed_btree);
-  if (!generated_graph_.has_value()) {
+  Optional<BTreeDataGraph> data_graph_ = generate_graph(indexed_btree);
+  if (!data_graph_.has_value()) {
     return {};
   }
 
-  GeneratedGraph &generated_graph = generated_graph_.value();
+  BTreeDataGraph &data_graph = data_graph_.value();
 
   DFGraphSocketSetVector input_sockets;
   DFGraphSocketSetVector output_sockets;
-  find_interface_sockets(indexed_btree, generated_graph, input_sockets, output_sockets);
+  find_interface_sockets(indexed_btree, data_graph, input_sockets, output_sockets);
 
-  return FunctionGraph(generated_graph.graph(), input_sockets, output_sockets);
+  return FunctionGraph(data_graph.graph(), input_sockets, output_sockets);
 }
 
 }  // namespace DataFlowNodes
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 9d619aaa0d8..d761ddd1a90 100644
--- a/source/blender/functions/frontends/data_flow_nodes/graph_generation.hpp
+++ b/source/blender/functions/frontends/data_flow_nodes/graph_generation.hpp
@@ -19,13 +19,13 @@ class UnlinkedInputsHandler {
                       DFGB_SocketVector &r_inserted_data_origins) = 0;
 };
 
-class GeneratedGraph {
+class BTreeDataGraph {
  private:
   SharedDataFlowGraph m_graph;
   SmallMap<bNodeSocket *, DFGraphSocket> m_mapping;
 
  public:
-  GeneratedGraph(SharedDataFlowGraph graph, SmallMap<bNodeSocket *, DFGraphSocket> mapping)
+  BTreeDataGraph(SharedDataFlowGraph graph, SmallMap<bNodeSocket *, DFGraphSocket> mapping)
       : m_graph(std::move(graph)), m_mapping(std::move(mapping))
   {
   }
@@ -41,7 +41,7 @@ class GeneratedGraph {
   }
 };
 
-Optional<GeneratedGraph> generate_graph(IndexedNodeTree &indexed_btree);
+Optional<BTreeDataGraph> generate_graph(IndexedNodeTree &indexed_btree);
 
 Optional<FunctionGraph> generate_function_graph(IndexedNodeTree &indexed_btree);
 
diff --git a/source/blender/simulations/bparticles/inserters.cpp b/source/blender/simulations/bparticles/inserters.cpp
index 22de1a4c854..c9bf8114d9f 100644
--- a/source/blender/simulations/bparticles/inserters.cpp
+++ b/source/blender/simulations/bparticles/inserters.cpp
@@ -30,7 +30,7 @@ static bool is_particle_data_input(bNode *bnode)
 
 static SmallVector<FN::DFGraphSocket> insert_inputs(FN::FunctionBuilder &fn_builder,
                                                     IndexedNodeTree &indexed_tree,
-                                                    FN::DataFlowNodes::GeneratedGraph &data_graph,
+                                                    BTreeDataGraph &data_graph,
                                                     ArrayRef<bNodeSocket *> output_sockets)
 {
   SmallSet<bNodeSocket *> to_be_checked = output_sockets;
@@ -74,7 +74,7 @@ static SmallVector<FN::DFGraphSocket> insert_inputs(FN::FunctionBuilder &fn_buil
 }
 
 static SharedFunction create_function(IndexedNodeTree &indexed_tree,
-                                      FN::DataFlowNodes::GeneratedGraph &data_graph,
+                                      BTreeDataGraph &data_graph,
                                       ArrayRef<bNodeSocket *> output_bsockets,
                                       StringRef name)
 {
@@ -96,7 +96,7 @@ static SharedFunction create_function(IndexedNodeTree &indexed_tree,
 
 static std::unique_ptr<Action> build_action(SocketWithNode start,
                                             IndexedNodeTree &indexed_tree,
-                                            FN::DataFlowNodes::GeneratedGraph &data_graph,
+                                            BTreeDataGraph &data_graph,
                                             ModifierStepDescription &step_description);
 
 static std::unique_ptr<Action> BUILD_ACTION_kill()
@@ -106,7 +106,7 @@ static std::unique_ptr<Action> BUILD_ACTION_kill()
 
 static std::unique_ptr<Action> BUILD_ACTION_change_direction(
     IndexedNodeTree &indexed_tree,
-    FN::DataFlowNodes::GeneratedGraph &data_graph,
+    BTreeDataGraph &data_graph,
     bNode *bnode,
     ModifierStepDescription &step_description)
 {
@@ -122,7 +122,7 @@ static std::unique_ptr<Action> BUILD_ACTION_change_direction(
 }
 
 static std::unique_ptr<Action> BUILD_ACTION_explode(IndexedNodeTree &indexed_tree,
-                                                    FN::DataFlowNodes::GeneratedGraph &data_graph,
+                                                    BTreeDataGraph &data_graph,
                                                     bNode *bnode,
                                                     ModifierStepDescription &step_description)
 {
@@ -148,11 +148,10 @@ static std::unique_ptr<Action> BUILD_ACTION_explode(IndexedNodeTree &indexed_tre
   }
 }
 
-static std::unique_ptr<Action> BUILD_ACTION_condition(
-    IndexedNodeTree &indexed_tree,
-    FN::DataFlowNodes::GeneratedGraph &data_graph,
-    bNode *bnode,
-    ModifierStepDescription &step_description)
+static std::unique_ptr<Action> BUILD_ACTION_condition(IndexedNodeTree &indexed_tree,
+                                                      BTreeDataGraph &data_graph,
+                                                      bNode *bnode,
+                                                      ModifierStepDescription &step_description)
 {
   bSocketList node_inputs(bnode->inputs);
   bSocketList node_outputs(bnode->outputs);
@@ -170,7 +169,7 @@ static std::unique_ptr<Action> BUILD_ACTION_condition(
 
 static std::unique_ptr<Action> build_action(SocketWithNode start,
                                             IndexedNodeTree &indexed_tree,
-                                            FN::DataFlowNodes::GeneratedGraph &data_graph,
+                                            BTreeDataGraph &data_graph,
                                             ModifierStepDescription &step_description)
 {
   if (start.socket->in_out == SOCK_OUT) {
diff --git a/source/blender/simulations/bparticles/inserters.hpp b/source/blender/simulations/bparticles/inserters.hpp
index 44ad51a6a97..083f6048b55 100644
--- a/source/blender/simulations/bparticles/inserters.hpp
+++ b/source/blender/simulations/bparticles/inserters.hpp
@@ -13,19 +13,20 @@ namespace BParticles {
 using BKE::bSocketList;
 using BKE::IndexedNodeTree;
 using BKE::SocketWithNode;
+using FN::DataFlowNodes::BTreeDataGraph;
 
 class ProcessNodeInterface {
  private:
   bNode *m_bnode;
   IndexedNodeTree &m_indexed_tree;
-  FN::DataFlowNodes::GeneratedGraph &m_data_graph;
+  BTreeDataGraph &m_data_graph;
   WorldState &m_world_state;
   ModifierStepDescription &m_step_description;
 
  public:
   ProcessNodeInterface(bNode *bnode,
                        IndexedNodeTree &indexed_tree,
-                       FN::DataFlowNodes::GeneratedGraph &data_graph,
+                       BTreeDataGraph &data_graph,
                        WorldState &world_state,
                        ModifierStepDescription &step_description)
       : m_bnode(bnode),
@@ -46,7 +47,7 @@ class ProcessNodeInterface {
     return m_indexed_tree;
   }
 
-  FN::DataFlowNodes::GeneratedGraph &data_graph()
+  FN::DataFlowNodes::BTreeDataGraph &data_graph()
   {
     return m_data_graph;
   }



More information about the Bf-blender-cvs mailing list