Fix #115526: missing normals on first chunk of array modifier #115612
|
@ -599,7 +599,9 @@ static Mesh *arrayModifier_doArray(ArrayModifierData *amd,
|
|||
Vector<float3> dst_vert_normals;
|
||||
if (!use_recalc_normals) {
|
||||
src_vert_normals = mesh->vert_normals();
|
||||
dst_vert_normals.reinitialize(result->totvert);
|
||||
dst_vert_normals.as_mutable_span()
|
||||
|
||||
.take_front(src_vert_normals.size())
|
||||
.copy_from(src_vert_normals);
|
||||
}
|
||||
|
||||
for (c = 1; c < count; c++) {
|
||||
|
|
Loading…
Reference in New Issue
Better to call
dst_vert_normals.as_mutable_span().take_front(src_vert_normals.size()).copy_from(src_vert_normals);
Maybe broken up into two lines or so though.
This way the vector doesn't need to be allocated twice with different sizes.