diff options
author | Sybren A. Stüvel <sybren@blender.org> | 2019-07-10 11:35:39 +0300 |
---|---|---|
committer | Sybren A. Stüvel <sybren@blender.org> | 2019-07-30 17:59:10 +0300 |
commit | dde978d1491b1ff5a5c01eb29eb6cf46446738f8 (patch) | |
tree | 8de2ab044dc62a95d7b11726fa2c2d5822053e5b /source/blender/alembic | |
parent | e74847e6bb5cea24def9e544a3fb2bc90150aeaf (diff) |
Cleanup: Alembic: renamed 'smooth_normals' to 'export_loop_normals'
The name now indicates what happens when the variable is set to true.
No functional changes.
Diffstat (limited to 'source/blender/alembic')
-rw-r--r-- | source/blender/alembic/intern/abc_mesh.cc | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/source/blender/alembic/intern/abc_mesh.cc b/source/blender/alembic/intern/abc_mesh.cc index 13cc670b7dc..e4431bde2f6 100644 --- a/source/blender/alembic/intern/abc_mesh.cc +++ b/source/blender/alembic/intern/abc_mesh.cc @@ -122,7 +122,7 @@ static void get_vertices(struct Mesh *mesh, std::vector<Imath::V3f> &points) static void get_topology(struct Mesh *mesh, std::vector<int32_t> &poly_verts, std::vector<int32_t> &loop_counts, - bool &r_smooth_normal) + bool &r_export_loop_normals) { const int num_poly = mesh->totpoly; const int num_loops = mesh->totloop; @@ -139,7 +139,7 @@ static void get_topology(struct Mesh *mesh, MPoly &poly = mpoly[i]; loop_counts.push_back(poly.totloop); - r_smooth_normal |= ((poly.flag & ME_SMOOTH) != 0); + r_export_loop_normals |= (poly.flag & ME_SMOOTH) != 0; MLoop *loop = mloop + poly.loopstart + (poly.totloop - 1); @@ -411,10 +411,10 @@ void AbcGenericMeshWriter::writeMesh(struct Mesh *mesh) std::vector<int32_t> poly_verts, loop_counts; std::vector<Imath::V3f> velocities; - bool smooth_normal = false; + bool export_loop_normals = false; get_vertices(mesh, points); - get_topology(mesh, poly_verts, loop_counts, smooth_normal); + get_topology(mesh, poly_verts, loop_counts, export_loop_normals); if (m_first_frame && m_settings.export_face_sets) { writeFaceSets(mesh, m_mesh_schema); @@ -442,7 +442,7 @@ void AbcGenericMeshWriter::writeMesh(struct Mesh *mesh) } if (m_settings.export_normals) { - if (smooth_normal) { + if (export_loop_normals) { get_loop_normals(mesh, normals); } else { @@ -451,7 +451,7 @@ void AbcGenericMeshWriter::writeMesh(struct Mesh *mesh) ON3fGeomParam::Sample normals_sample; if (!normals.empty()) { - normals_sample.setScope((smooth_normal) ? kFacevaryingScope : kVertexScope); + normals_sample.setScope(export_loop_normals ? kFacevaryingScope : kVertexScope); normals_sample.setVals(V3fArraySample(normals)); } @@ -477,10 +477,10 @@ void AbcGenericMeshWriter::writeSubD(struct Mesh *mesh) std::vector<int32_t> poly_verts, loop_counts; std::vector<int32_t> crease_indices, crease_lengths; - bool smooth_normal = false; + bool export_loop_normals = false; get_vertices(mesh, points); - get_topology(mesh, poly_verts, loop_counts, smooth_normal); + get_topology(mesh, poly_verts, loop_counts, export_loop_normals); get_creases(mesh, crease_indices, crease_lengths, crease_sharpness); if (m_first_frame && m_settings.export_face_sets) { |