diff options
author | Jacques Lucke <jacques@blender.org> | 2021-11-25 12:36:30 +0300 |
---|---|---|
committer | Jacques Lucke <jacques@blender.org> | 2021-11-25 12:36:30 +0300 |
commit | 1e2376f41f5a9f63d97b9d60092d0da3146b4c71 (patch) | |
tree | 3f7531f5c50f839787efebaf212a4a0ea6f4eba3 /source/blender | |
parent | 5ffb9b6dc45f58cf2b880230d912496fed0dd9ed (diff) | |
parent | 82808e18e6562e9c06626a4e938cb2ad4fa34a0f (diff) |
Merge branch 'blender-v3.0-release'
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/nodes/geometry/nodes/node_geo_curve_fillet.cc | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/source/blender/nodes/geometry/nodes/node_geo_curve_fillet.cc b/source/blender/nodes/geometry/nodes/node_geo_curve_fillet.cc index ed5c9e1bc98..b279ad23ff7 100644 --- a/source/blender/nodes/geometry/nodes/node_geo_curve_fillet.cc +++ b/source/blender/nodes/geometry/nodes/node_geo_curve_fillet.cc @@ -332,14 +332,17 @@ static void copy_common_attributes_by_mapping(const Spline &src, copy_attribute_by_mapping(src.radii(), dst.radii(), mapping); copy_attribute_by_mapping(src.tilts(), dst.tilts(), mapping); - dst.attributes.reallocate(1); src.attributes.foreach_attribute( [&](const AttributeIDRef &attribute_id, const AttributeMetaData &meta_data) { std::optional<GSpan> src_attribute = src.attributes.get_for_read(attribute_id); if (dst.attributes.create(attribute_id, meta_data.data_type)) { std::optional<GMutableSpan> dst_attribute = dst.attributes.get_for_write(attribute_id); if (dst_attribute) { - src_attribute->type().copy_assign(src_attribute->data(), dst_attribute->data()); + attribute_math::convert_to_static_type(dst_attribute->type(), [&](auto dummy) { + using T = decltype(dummy); + copy_attribute_by_mapping( + src_attribute->typed<T>(), dst_attribute->typed<T>(), mapping); + }); return true; } } |