Fix #105089: Curves sculpt add creates invalid resolution #105094

Merged
Hans Goudey merged 2 commits from HooglyBoogly/blender:fix-curves-sculpt-add-resolution into blender-v3.5-release 2023-02-23 13:46:51 +01:00
1 changed files with 8 additions and 1 deletions
Showing only changes of commit c209e618db - Show all commits

View File

@ -380,8 +380,15 @@ AddCurvesOnMeshOutputs add_curves_on_mesh(CurvesGeometry &curves,
bke::MutableAttributeAccessor attributes = curves.attributes_for_write();
if (bke::SpanAttributeWriter<int> resolution = attributes.lookup_for_write_span<int>(
"resulution")) {
HooglyBoogly marked this conversation as resolved
Review

typo

typo
resolution.span.take_back(new_curves_num).fill(12);
resolution.finish();
}
/* Explicitly set all other attributes besides those processed above to default values. */
Set<std::string> attributes_to_skip{{"position", "curve_type", "surface_uv_coordinate"}};
Set<std::string> attributes_to_skip{
{"position", "curve_type", "surface_uv_coordinate", "resolution"}};
attributes.for_all(
[&](const bke::AttributeIDRef &id, const bke::AttributeMetaData /*meta_data*/) {
if (attributes_to_skip.contains(id.name())) {