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/alembic | |
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/alembic')
-rw-r--r-- | source/blender/io/alembic/exporter/abc_writer_hair.cc | 4 | ||||
-rw-r--r-- | source/blender/io/alembic/exporter/abc_writer_mesh.cc | 8 | ||||
-rw-r--r-- | source/blender/io/alembic/intern/abc_reader_mesh.cc | 8 |
3 files changed, 10 insertions, 10 deletions
diff --git a/source/blender/io/alembic/exporter/abc_writer_hair.cc b/source/blender/io/alembic/exporter/abc_writer_hair.cc index b06b973f764..4f09aee3ea9 100644 --- a/source/blender/io/alembic/exporter/abc_writer_hair.cc +++ b/source/blender/io/alembic/exporter/abc_writer_hair.cc @@ -122,7 +122,7 @@ void ABCHairWriter::write_hair_sample(const HierarchyContext &context, MTFace *mtface = (MTFace *)CustomData_get_layer(&mesh->fdata, CD_MTFACE); MFace *mface = (MFace *)CustomData_get_layer(&mesh->fdata, CD_MFACE); - const MVert *mverts = BKE_mesh_vertices(mesh); + const MVert *mverts = BKE_mesh_verts(mesh); const float(*vert_normals)[3] = BKE_mesh_vertex_normals_ensure(mesh); if ((!mtface || !mface) && !uv_warning_shown_) { @@ -245,7 +245,7 @@ void ABCHairWriter::write_hair_child_sample(const HierarchyContext &context, MFace *mface = (MFace *)CustomData_get_layer(&mesh->fdata, CD_MFACE); MTFace *mtface = (MTFace *)CustomData_get_layer(&mesh->fdata, CD_MTFACE); - const MVert *mverts = BKE_mesh_vertices(mesh); + const MVert *mverts = BKE_mesh_verts(mesh); const float(*vert_normals)[3] = BKE_mesh_vertex_normals_ensure(mesh); ParticleSystem *psys = context.particle_system; diff --git a/source/blender/io/alembic/exporter/abc_writer_mesh.cc b/source/blender/io/alembic/exporter/abc_writer_mesh.cc index acfa4c1ea08..52c11d32933 100644 --- a/source/blender/io/alembic/exporter/abc_writer_mesh.cc +++ b/source/blender/io/alembic/exporter/abc_writer_mesh.cc @@ -176,7 +176,7 @@ void ABCGenericMeshWriter::do_write(HierarchyContext &context) m_custom_data_config.pack_uvs = args_.export_params->packuv; m_custom_data_config.mesh = mesh; - m_custom_data_config.mpoly = mesh->polygons_for_write().data(); + m_custom_data_config.mpoly = mesh->polys_for_write().data(); m_custom_data_config.mloop = mesh->loops_for_write().data(); m_custom_data_config.totpoly = mesh->totpoly; m_custom_data_config.totloop = mesh->totloop; @@ -436,7 +436,7 @@ static void get_vertices(struct Mesh *mesh, std::vector<Imath::V3f> &points) points.clear(); points.resize(mesh->totvert); - const Span<MVert> verts = mesh->vertices(); + const Span<MVert> verts = mesh->verts(); for (int i = 0, e = mesh->totvert; i < e; i++) { copy_yup_from_zup(points[i].getValue(), verts[i].co); } @@ -447,7 +447,7 @@ static void get_topology(struct Mesh *mesh, std::vector<int32_t> &loop_counts, bool &r_has_flat_shaded_poly) { - const Span<MPoly> polys = mesh->polygons(); + const Span<MPoly> polys = mesh->polys(); const Span<MLoop> loops = mesh->loops(); r_has_flat_shaded_poly = false; @@ -541,7 +541,7 @@ static void get_loop_normals(struct Mesh *mesh, /* NOTE: data needs to be written in the reverse order. */ int abc_index = 0; - const Span<MPoly> polys = mesh->polygons(); + const Span<MPoly> polys = mesh->polys(); for (const int i : polys.index_range()) { const MPoly *mp = &polys[i]; diff --git a/source/blender/io/alembic/intern/abc_reader_mesh.cc b/source/blender/io/alembic/intern/abc_reader_mesh.cc index cb87ee78fcd..c80d580eb32 100644 --- a/source/blender/io/alembic/intern/abc_reader_mesh.cc +++ b/source/blender/io/alembic/intern/abc_reader_mesh.cc @@ -157,7 +157,7 @@ static void read_mverts(CDStreamConfig &config, const AbcMeshData &mesh_data) void read_mverts(Mesh &mesh, const P3fArraySamplePtr positions, const N3fArraySamplePtr normals) { - 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]; Imath::V3f pos_in = (*positions)[i]; @@ -275,7 +275,7 @@ static void process_loop_normals(CDStreamConfig &config, const N3fArraySamplePtr float(*lnors)[3] = static_cast<float(*)[3]>( MEM_malloc_arrayN(loop_count, sizeof(float[3]), "ABC::FaceNormals")); - MPoly *mpoly = mesh->polygons_for_write().data(); + MPoly *mpoly = mesh->polys_for_write().data(); const N3fArraySample &loop_normals = *loop_normals_ptr; int abc_index = 0; for (int i = 0, e = mesh->totpoly; i < e; i++, mpoly++) { @@ -521,9 +521,9 @@ CDStreamConfig get_config(Mesh *mesh, const bool use_vertex_interpolation) { CDStreamConfig config; config.mesh = mesh; - config.mvert = mesh->vertices_for_write().data(); + config.mvert = mesh->verts_for_write().data(); config.mloop = mesh->loops_for_write().data(); - config.mpoly = mesh->polygons_for_write().data(); + config.mpoly = mesh->polys_for_write().data(); config.totvert = mesh->totvert; config.totloop = mesh->totloop; config.totpoly = mesh->totpoly; |