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/io/wavefront_obj/importer | |
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/io/wavefront_obj/importer')
-rw-r--r-- | source/blender/io/wavefront_obj/importer/obj_import_mesh.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/io/wavefront_obj/importer/obj_import_mesh.cc b/source/blender/io/wavefront_obj/importer/obj_import_mesh.cc index 84f1c6dd6b0..b1a2c7834f4 100644 --- a/source/blender/io/wavefront_obj/importer/obj_import_mesh.cc +++ b/source/blender/io/wavefront_obj/importer/obj_import_mesh.cc @@ -188,8 +188,8 @@ void MeshFromGeometry::create_polys_loops(Mesh *mesh, bool use_vertex_groups) MutableSpan<MPoly> polys = mesh->polys_for_write(); MutableSpan<MLoop> loops = mesh->loops_for_write(); bke::SpanAttributeWriter<int> material_indices = - bke::mesh_attributes_for_write(*mesh).lookup_or_add_for_write_only_span<int>( - "material_index", ATTR_DOMAIN_FACE); + mesh->attributes_for_write().lookup_or_add_for_write_only_span<int>("material_index", + ATTR_DOMAIN_FACE); const int64_t tot_face_elems{mesh->totpoly}; int tot_loop_idx = 0; |