diff options
Diffstat (limited to 'source/blender/blenkernel/intern')
-rw-r--r-- | source/blender/blenkernel/intern/mesh.cc | 4 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/mesh_legacy_convert.cc | 18 |
2 files changed, 11 insertions, 11 deletions
diff --git a/source/blender/blenkernel/intern/mesh.cc b/source/blender/blenkernel/intern/mesh.cc index 8616b056d7f..6bf25da5ae7 100644 --- a/source/blender/blenkernel/intern/mesh.cc +++ b/source/blender/blenkernel/intern/mesh.cc @@ -1612,14 +1612,14 @@ void BKE_mesh_do_versions_cd_flag_init(Mesh *mesh) const Span<MEdge> edges = mesh->edges(); for (const MVert &vert : verts) { - if (vert.bweight != 0) { + if (vert.bweight_legacy != 0) { mesh->cd_flag |= ME_CDFLAG_VERT_BWEIGHT; break; } } for (const MEdge &edge : edges) { - if (edge.bweight != 0) { + if (edge.bweight_legacy != 0) { mesh->cd_flag |= ME_CDFLAG_EDGE_BWEIGHT; if (mesh->cd_flag & ME_CDFLAG_EDGE_CREASE) { break; diff --git a/source/blender/blenkernel/intern/mesh_legacy_convert.cc b/source/blender/blenkernel/intern/mesh_legacy_convert.cc index 10fc8ff3195..627c0057a28 100644 --- a/source/blender/blenkernel/intern/mesh_legacy_convert.cc +++ b/source/blender/blenkernel/intern/mesh_legacy_convert.cc @@ -929,13 +929,13 @@ void BKE_mesh_legacy_bevel_weight_from_layers(Mesh *mesh) CustomData_get_layer(&mesh->vdata, CD_BWEIGHT))) { mesh->cd_flag |= ME_CDFLAG_VERT_BWEIGHT; for (const int i : verts.index_range()) { - verts[i].bweight = std::clamp(weights[i], 0.0f, 1.0f) * 255.0f; + verts[i].bweight_legacy = std::clamp(weights[i], 0.0f, 1.0f) * 255.0f; } } else { mesh->cd_flag &= ~ME_CDFLAG_VERT_BWEIGHT; for (const int i : verts.index_range()) { - verts[i].bweight = 0; + verts[i].bweight_legacy = 0; } } MutableSpan<MEdge> edges = mesh->edges_for_write(); @@ -943,13 +943,13 @@ void BKE_mesh_legacy_bevel_weight_from_layers(Mesh *mesh) CustomData_get_layer(&mesh->edata, CD_BWEIGHT))) { mesh->cd_flag |= ME_CDFLAG_EDGE_BWEIGHT; for (const int i : edges.index_range()) { - edges[i].bweight = std::clamp(weights[i], 0.0f, 1.0f) * 255.0f; + edges[i].bweight_legacy = std::clamp(weights[i], 0.0f, 1.0f) * 255.0f; } } else { mesh->cd_flag &= ~ME_CDFLAG_EDGE_BWEIGHT; for (const int i : edges.index_range()) { - edges[i].bweight = 0; + edges[i].bweight_legacy = 0; } } } @@ -962,7 +962,7 @@ void BKE_mesh_legacy_bevel_weight_to_layers(Mesh *mesh) float *weights = static_cast<float *>( CustomData_add_layer(&mesh->vdata, CD_BWEIGHT, CD_CONSTRUCT, nullptr, verts.size())); for (const int i : verts.index_range()) { - weights[i] = verts[i].bweight / 255.0f; + weights[i] = verts[i].bweight_legacy / 255.0f; } } @@ -971,7 +971,7 @@ void BKE_mesh_legacy_bevel_weight_to_layers(Mesh *mesh) float *weights = static_cast<float *>( CustomData_add_layer(&mesh->edata, CD_BWEIGHT, CD_CONSTRUCT, nullptr, edges.size())); for (const int i : edges.index_range()) { - weights[i] = edges[i].bweight / 255.0f; + weights[i] = edges[i].bweight_legacy / 255.0f; } } } @@ -1077,7 +1077,7 @@ void BKE_mesh_legacy_convert_material_indices_to_mpoly(Mesh *mesh) "material_index", ATTR_DOMAIN_FACE, 0); threading::parallel_for(polys.index_range(), 4096, [&](IndexRange range) { for (const int i : range) { - polys[i].mat_nr = material_indices[i]; + polys[i].mat_nr_legacy = material_indices[i]; } }); } @@ -1089,12 +1089,12 @@ void BKE_mesh_legacy_convert_mpoly_to_material_indices(Mesh *mesh) MutableAttributeAccessor attributes = mesh->attributes_for_write(); const Span<MPoly> polys = mesh->polys(); if (std::any_of( - polys.begin(), polys.end(), [](const MPoly &poly) { return poly.mat_nr != 0; })) { + polys.begin(), polys.end(), [](const MPoly &poly) { return poly.mat_nr_legacy != 0; })) { SpanAttributeWriter<int> material_indices = attributes.lookup_or_add_for_write_only_span<int>( "material_index", ATTR_DOMAIN_FACE); threading::parallel_for(polys.index_range(), 4096, [&](IndexRange range) { for (const int i : range) { - material_indices.span[i] = polys[i].mat_nr; + material_indices.span[i] = polys[i].mat_nr_legacy; } }); material_indices.finish(); |