diff options
author | Hans Goudey <h.goudey@me.com> | 2022-09-07 08:06:31 +0300 |
---|---|---|
committer | Hans Goudey <h.goudey@me.com> | 2022-09-07 08:06:31 +0300 |
commit | be038b844cb53bc228d3e98bfe09071560930cde (patch) | |
tree | 13de4a3fc3b49a8b2075a0413dc8261603fbc718 /source/blender/io/usd/intern/usd_reader_mesh.cc | |
parent | 20daaeffce4cf9bfe48ab7c84cb9e2b1d71d2c91 (diff) |
Cleanup: Tweak naming for recently added mesh accessors
Use `verts` instead of `vertices` and `polys` instead of `polygons`
in the API added in 05952aa94d33eeb50. This aligns better with
existing naming where the shorter names are much more common.
Diffstat (limited to 'source/blender/io/usd/intern/usd_reader_mesh.cc')
-rw-r--r-- | source/blender/io/usd/intern/usd_reader_mesh.cc | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/source/blender/io/usd/intern/usd_reader_mesh.cc b/source/blender/io/usd/intern/usd_reader_mesh.cc index cde7ab5b628..259b52ed435 100644 --- a/source/blender/io/usd/intern/usd_reader_mesh.cc +++ b/source/blender/io/usd/intern/usd_reader_mesh.cc @@ -312,7 +312,7 @@ bool USDMeshReader::topology_changed(const Mesh *existing_mesh, const double mot void USDMeshReader::read_mpolys(Mesh *mesh) { - MutableSpan<MPoly> polys = mesh->polygons_for_write(); + MutableSpan<MPoly> polys = mesh->polys_for_write(); MutableSpan<MLoop> loops = mesh->loops_for_write(); int loop_index = 0; @@ -516,7 +516,7 @@ void USDMeshReader::read_colors(Mesh *mesh, const double motionSampleTime) MLoopCol *colors = static_cast<MLoopCol *>(cd_ptr); - const Span<MPoly> polys = mesh->polygons(); + const Span<MPoly> polys = mesh->polys(); const Span<MLoop> loops = mesh->loops(); for (const int i : polys.index_range()) { const MPoly &poly = polys[i]; @@ -630,7 +630,7 @@ void USDMeshReader::process_normals_face_varying(Mesh *mesh) float(*lnors)[3] = static_cast<float(*)[3]>( MEM_malloc_arrayN(loop_count, sizeof(float[3]), "USD::FaceNormals")); - const Span<MPoly> polys = mesh->polygons(); + const Span<MPoly> polys = mesh->polys(); for (const int i : polys.index_range()) { const MPoly &poly = polys[i]; for (int j = 0; j < poly.totloop; j++) { @@ -671,7 +671,7 @@ void USDMeshReader::process_normals_uniform(Mesh *mesh) float(*lnors)[3] = static_cast<float(*)[3]>( MEM_malloc_arrayN(mesh->totloop, sizeof(float[3]), "USD::FaceNormals")); - const Span<MPoly> polys = mesh->polygons(); + const Span<MPoly> polys = mesh->polys(); for (const int i : polys.index_range()) { const MPoly &poly = polys[i]; for (int j = 0; j < poly.totloop; j++) { @@ -698,7 +698,7 @@ void USDMeshReader::read_mesh_sample(ImportSettings *settings, * in code that expect this data to be there. */ if (new_mesh || (settings->read_flag & MOD_MESHSEQ_READ_VERT) != 0) { - MutableSpan<MVert> verts = mesh->vertices_for_write(); + MutableSpan<MVert> verts = mesh->verts_for_write(); for (int i = 0; i < positions_.size(); i++) { MVert &mvert = verts[i]; mvert.co[0] = positions_[i][0]; @@ -913,7 +913,7 @@ Mesh *USDMeshReader::read_mesh(Mesh *existing_mesh, /* Here we assume that the number of materials doesn't change, i.e. that * the material slots that were created when the object was loaded from * USD are still valid now. */ - MutableSpan<MPoly> polys = active_mesh->polygons_for_write(); + MutableSpan<MPoly> polys = active_mesh->polys_for_write(); if (!polys.is_empty() && import_params_.import_materials) { std::map<pxr::SdfPath, int> mat_map; bke::MutableAttributeAccessor attributes = bke::mesh_attributes_for_write(*active_mesh); |