[Bf-blender-cvs] [1ba264d5f0b] geometry-nodes-simulation: Be more forgiving when simulation nodes lost their storage

Hans Goudey noreply at git.blender.org
Fri Dec 2 23:13:29 CET 2022


Commit: 1ba264d5f0b7b22ca458eb8b3d7ac6d6f4595cc9
Author: Hans Goudey
Date:   Fri Dec 2 16:06:03 2022 -0600
Branches: geometry-nodes-simulation
https://developer.blender.org/rB1ba264d5f0b7b22ca458eb8b3d7ac6d6f4595cc9

Be more forgiving when simulation nodes lost their storage

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

M	source/blender/nodes/geometry/nodes/node_geo_simulation_input.cc

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

diff --git a/source/blender/nodes/geometry/nodes/node_geo_simulation_input.cc b/source/blender/nodes/geometry/nodes/node_geo_simulation_input.cc
index 0a199ddf91d..3e9be29050c 100644
--- a/source/blender/nodes/geometry/nodes/node_geo_simulation_input.cc
+++ b/source/blender/nodes/geometry/nodes/node_geo_simulation_input.cc
@@ -41,7 +41,8 @@ static void node_init(bNodeTree *tree, bNode *node)
   VectorSet<int32_t> sim_output_ids;
   Set<int32_t> sim_input_output_ids;
   for (bNode *other_node : tree->all_nodes()) {
-    if (other_node->type == GEO_NODE_SIMULATION_INPUT && other_node != node) {
+    if (other_node->type == GEO_NODE_SIMULATION_INPUT && other_node != node &&
+        other_node->storage) {
       const NodeGeometrySimulationInput &storage = node_storage(*other_node);
       sim_input_output_ids.add_new(storage.output_node_id);
     }



More information about the Bf-blender-cvs mailing list