Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2021-11-08 08:54:20 +0300
committerCampbell Barton <ideasman42@gmail.com>2021-11-08 09:00:36 +0300
commitc3f5fca8a2b8438d9342c3efef83a940dd9c83b1 (patch)
tree919ce60b550534b1a9b0c2d20ef034acd0f4277b /source/blender/io/alembic/exporter/abc_writer_mesh.cc
parentde581a2302297c5e235cd6dfc51760ac7225827c (diff)
Cleanup: avoid error prone struct declarations in C++
Reference struct members by name instead relying on their order. This also simplifies moving back to named members when all compilers we use support them.
Diffstat (limited to 'source/blender/io/alembic/exporter/abc_writer_mesh.cc')
-rw-r--r--source/blender/io/alembic/exporter/abc_writer_mesh.cc7
1 files changed, 4 insertions, 3 deletions
diff --git a/source/blender/io/alembic/exporter/abc_writer_mesh.cc b/source/blender/io/alembic/exporter/abc_writer_mesh.cc
index 8f410978211..442ab6afcd0 100644
--- a/source/blender/io/alembic/exporter/abc_writer_mesh.cc
+++ b/source/blender/io/alembic/exporter/abc_writer_mesh.cc
@@ -166,9 +166,10 @@ void ABCGenericMeshWriter::do_write(HierarchyContext &context)
const int quad_method = args_.export_params->quad_method;
const int ngon_method = args_.export_params->ngon_method;
- struct BMeshCreateParams bmcp = {false};
- struct BMeshFromMeshParams bmfmp = {true, false, false, 0};
- BMesh *bm = BKE_mesh_to_bmesh_ex(mesh, &bmcp, &bmfmp);
+ BMeshCreateParams bmesh_create_params{};
+ BMeshFromMeshParams bmesh_from_mesh_params{};
+ bmesh_from_mesh_params.calc_face_normal = true;
+ BMesh *bm = BKE_mesh_to_bmesh_ex(mesh, &bmesh_create_params, &bmesh_from_mesh_params);
BM_mesh_triangulate(bm, quad_method, ngon_method, 4, tag_only, nullptr, nullptr, nullptr);