diff options
author | Hans Goudey <h.goudey@me.com> | 2022-11-03 19:40:33 +0300 |
---|---|---|
committer | Hans Goudey <h.goudey@me.com> | 2022-11-03 19:40:33 +0300 |
commit | f4e261bfed553c98f6e987dc84591ecc680e1ebb (patch) | |
tree | 4fd7816190c0b3af1c8a25e686d1a17e951fd3ab /source/blender/blenkernel/intern/curve_to_mesh_convert.cc | |
parent | 0c79e9df4b88f6a063e7437943e6560b89fbd749 (diff) | |
parent | 41c692ee2f0f5a92d6162e65652e6f8d399df1a9 (diff) |
Merge branch 'master' into refactor-mesh-position-generic
Diffstat (limited to 'source/blender/blenkernel/intern/curve_to_mesh_convert.cc')
-rw-r--r-- | source/blender/blenkernel/intern/curve_to_mesh_convert.cc | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/source/blender/blenkernel/intern/curve_to_mesh_convert.cc b/source/blender/blenkernel/intern/curve_to_mesh_convert.cc index 960cac26bdf..5c82b9a45cd 100644 --- a/source/blender/blenkernel/intern/curve_to_mesh_convert.cc +++ b/source/blender/blenkernel/intern/curve_to_mesh_convert.cc @@ -329,7 +329,8 @@ static eAttrDomain get_attribute_domain_for_mesh(const AttributeAccessor &mesh_a static bool should_add_attribute_to_mesh(const AttributeAccessor &curve_attributes, const AttributeAccessor &mesh_attributes, - const AttributeIDRef &id) + const AttributeIDRef &id, + const AttributeMetaData &meta_data) { /* The position attribute has special non-generic evaluation. */ @@ -343,6 +344,9 @@ static bool should_add_attribute_to_mesh(const AttributeAccessor &curve_attribut if (!id.should_be_kept()) { return false; } + if (meta_data.data_type == CD_PROP_STRING) { + return false; + } return true; } @@ -711,7 +715,7 @@ Mesh *curve_to_mesh_sweep(const CurvesGeometry &main, MutableAttributeAccessor mesh_attributes = mesh->attributes_for_write(); main_attributes.for_all([&](const AttributeIDRef &id, const AttributeMetaData meta_data) { - if (!should_add_attribute_to_mesh(main_attributes, mesh_attributes, id)) { + if (!should_add_attribute_to_mesh(main_attributes, mesh_attributes, id, meta_data)) { return true; } main_attributes_set.add_new(id); @@ -748,7 +752,7 @@ Mesh *curve_to_mesh_sweep(const CurvesGeometry &main, if (main_attributes.contains(id)) { return true; } - if (!should_add_attribute_to_mesh(profile_attributes, mesh_attributes, id)) { + if (!should_add_attribute_to_mesh(profile_attributes, mesh_attributes, id, meta_data)) { return true; } const eAttrDomain src_domain = meta_data.domain; |