diff options
author | Jacques Lucke <jacques@blender.org> | 2022-07-14 12:49:28 +0300 |
---|---|---|
committer | Jacques Lucke <jacques@blender.org> | 2022-07-14 12:49:28 +0300 |
commit | 96cc6030375b9173ae6b234a12d3af25bfbc0aa6 (patch) | |
tree | 3e705224ca5aa3479b58c01ba00f0b52a864abf5 /source/blender/geometry | |
parent | c8a07ef66311a31cc45901717845139ae0682f2f (diff) |
Geometry Nodes: update curve type counts after realizing instances
The type counts have to be updated eagerly. This was missing from
the realize-instances code before, leading to bugs further down
the line.
Diffstat (limited to 'source/blender/geometry')
-rw-r--r-- | source/blender/geometry/intern/realize_instances.cc | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/source/blender/geometry/intern/realize_instances.cc b/source/blender/geometry/intern/realize_instances.cc index 25bf00c5783..66b856ee0c4 100644 --- a/source/blender/geometry/intern/realize_instances.cc +++ b/source/blender/geometry/intern/realize_instances.cc @@ -1295,6 +1295,15 @@ static void execute_realize_curve_tasks(const RealizeInstancesOptions &options, } }); + /* Type counts have to be updated eagerly. */ + dst_curves.runtime->type_counts.fill(0); + for (const RealizeCurveTask &task : tasks) { + for (const int i : IndexRange(CURVE_TYPES_NUM)) { + dst_curves.runtime->type_counts[i] += + task.curve_info->curves->geometry.runtime->type_counts[i]; + } + } + /* Tag modified attributes. */ for (GSpanAttributeWriter &dst_attribute : dst_attribute_writers) { dst_attribute.finish(); |