Fix #132242: Assert in UV seam layer name versioning
Only attribute custom property names are expected to be unique. But also, it isn't worth asserting over this here, so just use the regular "add" method instead of "add_new". Pull Request: https://projects.blender.org/blender/blender/pulls/132277
This commit is contained in:
@@ -3316,16 +3316,24 @@ static void rename_mesh_uv_seam_attribute(Mesh &mesh)
|
||||
}
|
||||
Set<StringRef> names;
|
||||
for (const CustomDataLayer &layer : Span(mesh.vert_data.layers, mesh.vert_data.totlayer)) {
|
||||
names.add_new(layer.name);
|
||||
if (layer.type & CD_MASK_PROP_ALL) {
|
||||
names.add(layer.name);
|
||||
}
|
||||
}
|
||||
for (const CustomDataLayer &layer : Span(mesh.edge_data.layers, mesh.edge_data.totlayer)) {
|
||||
names.add_new(layer.name);
|
||||
if (layer.type & CD_MASK_PROP_ALL) {
|
||||
names.add(layer.name);
|
||||
}
|
||||
}
|
||||
for (const CustomDataLayer &layer : Span(mesh.face_data.layers, mesh.face_data.totlayer)) {
|
||||
names.add_new(layer.name);
|
||||
if (layer.type & CD_MASK_PROP_ALL) {
|
||||
names.add(layer.name);
|
||||
}
|
||||
}
|
||||
for (const CustomDataLayer &layer : Span(mesh.corner_data.layers, mesh.corner_data.totlayer)) {
|
||||
names.add_new(layer.name);
|
||||
if (layer.type & CD_MASK_PROP_ALL) {
|
||||
names.add(layer.name);
|
||||
}
|
||||
}
|
||||
LISTBASE_FOREACH (const bDeformGroup *, vertex_group, &mesh.vertex_group_names) {
|
||||
names.add(vertex_group->name);
|
||||
|
||||
Reference in New Issue
Block a user