Fix #118360: Fill mask operator doesn't initialize hidden vertices

If there is no mask attribute yet and hidden vertices, the values for those
vertices wouldn't be initialized. Fix by simply initializing the entire array
when it's allocated.
This commit is contained in:
Hans Goudey
2024-02-16 12:54:27 -05:00
parent 2f1b9432be
commit f909e279e7

View File

@@ -256,7 +256,7 @@ static void fill_mask_mesh(Object &object, const float value, const Span<PBVHNod
}
}
bke::SpanAttributeWriter<float> mask = attributes.lookup_or_add_for_write_only_span<float>(
bke::SpanAttributeWriter<float> mask = attributes.lookup_or_add_for_write_span<float>(
".sculpt_mask", bke::AttrDomain::Point);
threading::EnumerableThreadSpecific<Vector<int>> all_index_data;