diff options
author | Hans Goudey <h.goudey@me.com> | 2022-07-26 00:06:13 +0300 |
---|---|---|
committer | Hans Goudey <h.goudey@me.com> | 2022-07-26 00:06:28 +0300 |
commit | f76a2c0d1895a43b932eb5e458732e54b6aa17c7 (patch) | |
tree | 4b21cd189dc17201f53b8f31728c43c10cece819 /source/blender/nodes/geometry | |
parent | 462f99bf38648a08226b1fba423315aec2bc577b (diff) |
Fix: Fix attribute writer debug warnings in terminal
Use an imperfect solution, since this code will be replaced soon anyway.
Diffstat (limited to 'source/blender/nodes/geometry')
-rw-r--r-- | source/blender/nodes/geometry/nodes/node_geo_curve_to_points.cc | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/source/blender/nodes/geometry/nodes/node_geo_curve_to_points.cc b/source/blender/nodes/geometry/nodes/node_geo_curve_to_points.cc index fd75855bddb..0ddf06dc8c7 100644 --- a/source/blender/nodes/geometry/nodes/node_geo_curve_to_points.cc +++ b/source/blender/nodes/geometry/nodes/node_geo_curve_to_points.cc @@ -126,18 +126,22 @@ static GMutableSpan ensure_point_attribute(PointCloudComponent &points, const AttributeIDRef &attribute_id, const eCustomDataType data_type) { - return points.attributes_for_write() - ->lookup_or_add_for_write(attribute_id, ATTR_DOMAIN_POINT, data_type) - .varray.get_internal_span(); + GAttributeWriter attribute = points.attributes_for_write()->lookup_or_add_for_write( + attribute_id, ATTR_DOMAIN_POINT, data_type); + GMutableSpan span = attribute.varray.get_internal_span(); + attribute.finish(); + return span; } template<typename T> static MutableSpan<T> ensure_point_attribute(PointCloudComponent &points, const AttributeIDRef &attribute_id) { - return points.attributes_for_write() - ->lookup_or_add_for_write<T>(attribute_id, ATTR_DOMAIN_POINT) - .varray.get_internal_span(); + AttributeWriter<T> attribute = points.attributes_for_write()->lookup_or_add_for_write<T>( + attribute_id, ATTR_DOMAIN_POINT); + MutableSpan<T> span = attribute.varray.get_internal_span(); + attribute.finish(); + return span; } namespace { |