diff options
author | Hans Goudey <h.goudey@me.com> | 2022-09-08 05:41:39 +0300 |
---|---|---|
committer | Hans Goudey <h.goudey@me.com> | 2022-09-08 05:41:39 +0300 |
commit | d5934974219135102f364f57c45a8b1465e2b8d9 (patch) | |
tree | 415beea6d138085505b74d52301ff913781203dd /source/blender/blenkernel/intern/mesh_validate.cc | |
parent | 17bc29253070f1707acd40c75e4a0e5c53704b24 (diff) |
Cleanup: Use C++ methods to retrieve attribute accessors
Replace `mesh_attributes`, `mesh_attributes_for_write` and the point
cloud versions with methods on the `Mesh` and `PointCloud` types.
This makes them friendlier to use and improves readability.
Differential Revision: https://developer.blender.org/D15907
Diffstat (limited to 'source/blender/blenkernel/intern/mesh_validate.cc')
-rw-r--r-- | source/blender/blenkernel/intern/mesh_validate.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/blenkernel/intern/mesh_validate.cc b/source/blender/blenkernel/intern/mesh_validate.cc index 50577969a83..47de7245ccc 100644 --- a/source/blender/blenkernel/intern/mesh_validate.cc +++ b/source/blender/blenkernel/intern/mesh_validate.cc @@ -243,7 +243,7 @@ bool BKE_mesh_validate_arrays(Mesh *mesh, (void)0 blender::bke::AttributeWriter<int> material_indices = - blender::bke::mesh_attributes_for_write(*mesh).lookup_for_write<int>("material_index"); + mesh->attributes_for_write().lookup_for_write<int>("material_index"); blender::MutableVArraySpan<int> material_indices_span(material_indices.varray); MVert *mv = mverts; @@ -1152,7 +1152,7 @@ bool BKE_mesh_validate_material_indices(Mesh *me) bool is_valid = true; blender::bke::AttributeWriter<int> material_indices = - blender::bke::mesh_attributes_for_write(*me).lookup_for_write<int>("material_index"); + me->attributes_for_write().lookup_for_write<int>("material_index"); blender::MutableVArraySpan<int> material_indices_span(material_indices.varray); for (const int i : material_indices_span.index_range()) { if (material_indices_span[i] < 0 || material_indices_span[i] > mat_nr_max) { |