[Bf-blender-cvs] [3f9f9f03483] temp-geometry-nodes-evaluator-refactor: cleanup

Jacques Lucke noreply at git.blender.org
Thu Sep 8 17:22:31 CEST 2022


Commit: 3f9f9f03483ea244eeb277c3adde0b71053b3865
Author: Jacques Lucke
Date:   Thu Sep 8 12:39:06 2022 +0200
Branches: temp-geometry-nodes-evaluator-refactor
https://developer.blender.org/rB3f9f9f03483ea244eeb277c3adde0b71053b3865

cleanup

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

M	source/blender/editors/space_spreadsheet/spreadsheet_data_source_geometry.cc
M	source/blender/modifiers/intern/MOD_nodes.cc

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

diff --git a/source/blender/editors/space_spreadsheet/spreadsheet_data_source_geometry.cc b/source/blender/editors/space_spreadsheet/spreadsheet_data_source_geometry.cc
index 1c2d288630b..a7645a2bc67 100644
--- a/source/blender/editors/space_spreadsheet/spreadsheet_data_source_geometry.cc
+++ b/source/blender/editors/space_spreadsheet/spreadsheet_data_source_geometry.cc
@@ -425,8 +425,8 @@ GeometrySet spreadsheet_get_display_geometry_set(const SpaceSpreadsheet *sspread
         BMEditMesh *em = mesh->edit_mesh;
         if (em != nullptr) {
           Mesh *new_mesh = (Mesh *)BKE_id_new_nomain(ID_ME, nullptr);
-          /* This is a potentially heavy operation to do on every redraw. The best solution here
-           * is to display the data directly from the bmesh without a conversion, which can be
+          /* This is a potentially heavy operation to do on every redraw. The best solution here is
+           * to display the data directly from the bmesh without a conversion, which can be
            * implemented a bit later. */
           BM_mesh_bm_to_me_for_eval(em->bm, new_mesh, nullptr);
           mesh_component.replace(new_mesh, GeometryOwnershipType::Owned);
@@ -523,8 +523,8 @@ class GeometryComponentCacheKey : public SpreadsheetCache::Key {
 
 class GeometryComponentCacheValue : public SpreadsheetCache::Value {
  public:
-  /* Stores the result of fields evaluated on a geometry component. Without this, fields would
-   * have to be reevaluated on every redraw. */
+  /* Stores the result of fields evaluated on a geometry component. Without this, fields would have
+   * to be reevaluated on every redraw. */
   Map<std::pair<eAttrDomain, GField>, GArray<>> arrays;
 };
 
diff --git a/source/blender/modifiers/intern/MOD_nodes.cc b/source/blender/modifiers/intern/MOD_nodes.cc
index c979ce381c9..8396aff1156 100644
--- a/source/blender/modifiers/intern/MOD_nodes.cc
+++ b/source/blender/modifiers/intern/MOD_nodes.cc
@@ -923,6 +923,8 @@ static void find_side_effect_nodes_for_spreadsheet(
     return;
   }
 
+  /* Not only mark the viewer node as having side effects, but also all group nodes it is contained
+   * in. */
   r_side_effect_nodes.add(compute_context_builder.hash(),
                           &find_viewer_lf_node(*found_viewer_node));
   compute_context_builder.pop();
@@ -1125,8 +1127,6 @@ static GeometrySet compute_geometry(const bNodeTree &btree,
 
   const blender::nodes::GeometryNodesLazyFunctionGraphInfo &lf_graph_info =
       blender::nodes::ensure_geometry_nodes_lazy_function_graph(btree);
-  // std::cout << graph.to_dot() << "\n";
-
   const blender::nodes::GeometryNodeLazyFunctionMapping &mapping = lf_graph_info.mapping;
 
   Vector<const lf::OutputSocket *> graph_inputs;
@@ -1168,7 +1168,6 @@ static GeometrySet compute_geometry(const bNodeTree &btree,
   user_data.compute_context = &modifier_compute_context;
 
   blender::LinearAllocator<> allocator;
-
   Vector<GMutablePointer> inputs_to_destruct;
 
   int input_index;
@@ -1196,15 +1195,13 @@ static GeometrySet compute_geometry(const bNodeTree &btree,
   lf::Context lf_context;
   lf_context.storage = graph_executor.init_storage(allocator);
   lf_context.user_data = &user_data;
-
-  lf::BasicParams params{graph_executor,
-                         param_inputs,
-                         param_outputs,
-                         param_input_usages,
-                         param_output_usages,
-                         param_set_outputs};
-  graph_executor.execute(params, lf_context);
-
+  lf::BasicParams lf_params{graph_executor,
+                            param_inputs,
+                            param_outputs,
+                            param_input_usages,
+                            param_output_usages,
+                            param_set_outputs};
+  graph_executor.execute(lf_params, lf_context);
   graph_executor.destruct_storage(lf_context.storage);
 
   for (GMutablePointer &ptr : inputs_to_destruct) {



More information about the Bf-blender-cvs mailing list