diff options
author | Jacques Lucke <jacques@blender.org> | 2021-08-30 17:02:58 +0300 |
---|---|---|
committer | Jacques Lucke <jacques@blender.org> | 2021-08-30 17:02:58 +0300 |
commit | fb0d5124f28c639ebd49deeb461e9bb5fc8accc2 (patch) | |
tree | d48675472c0572b2eba205b2ca7382e71f5b1012 /source/blender/nodes/geometry/nodes/node_geo_curve_resample.cc | |
parent | 6146a679c954b9847e3775add51af4a351bc8aaf (diff) |
support anonymous attributes in foreach_attributetemp-geometry-nodes-fields--anonymous-attributes
Diffstat (limited to 'source/blender/nodes/geometry/nodes/node_geo_curve_resample.cc')
-rw-r--r-- | source/blender/nodes/geometry/nodes/node_geo_curve_resample.cc | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/source/blender/nodes/geometry/nodes/node_geo_curve_resample.cc b/source/blender/nodes/geometry/nodes/node_geo_curve_resample.cc index ad0c453c2af..081839ec903 100644 --- a/source/blender/nodes/geometry/nodes/node_geo_curve_resample.cc +++ b/source/blender/nodes/geometry/nodes/node_geo_curve_resample.cc @@ -88,14 +88,14 @@ static SplinePtr resample_spline(const Spline &input_spline, const int count) input_spline.radii().first()); output_spline->attributes.reallocate(1); input_spline.attributes.foreach_attribute( - [&](StringRefNull name, const AttributeMetaData &meta_data) { - std::optional<GSpan> src = input_spline.attributes.get_for_read(name); + [&](const AttributeIDRef &attribute_id, const AttributeMetaData &meta_data) { + std::optional<GSpan> src = input_spline.attributes.get_for_read(attribute_id); BLI_assert(src); - if (!output_spline->attributes.create(name, meta_data.data_type)) { + if (!output_spline->attributes.create(attribute_id, meta_data.data_type)) { BLI_assert_unreachable(); return false; } - std::optional<GMutableSpan> dst = output_spline->attributes.get_for_write(name); + std::optional<GMutableSpan> dst = output_spline->attributes.get_for_write(attribute_id); if (!dst) { BLI_assert_unreachable(); return false; @@ -126,15 +126,15 @@ static SplinePtr resample_spline(const Spline &input_spline, const int count) output_spline->attributes.reallocate(count); input_spline.attributes.foreach_attribute( - [&](StringRefNull name, const AttributeMetaData &meta_data) { - std::optional<GSpan> input_attribute = input_spline.attributes.get_for_read(name); + [&](const AttributeIDRef &attribute_id, const AttributeMetaData &meta_data) { + std::optional<GSpan> input_attribute = input_spline.attributes.get_for_read(attribute_id); BLI_assert(input_attribute); - if (!output_spline->attributes.create(name, meta_data.data_type)) { + if (!output_spline->attributes.create(attribute_id, meta_data.data_type)) { BLI_assert_unreachable(); return false; } std::optional<GMutableSpan> output_attribute = output_spline->attributes.get_for_write( - name); + attribute_id); if (!output_attribute) { BLI_assert_unreachable(); return false; |