diff options
author | Jacques Lucke <jacques@blender.org> | 2021-05-20 15:41:07 +0300 |
---|---|---|
committer | Jacques Lucke <jacques@blender.org> | 2021-05-20 15:41:07 +0300 |
commit | 1895205be3308ef7d0c2553519c1433e9117dc33 (patch) | |
tree | fe4146e10a6ded237e65dedba18a885cebb3c6f4 /source/blender/io/alembic/exporter/abc_writer_mesh.cc | |
parent | 619b015a46786a4f4057b0dd4d20d27b61d13c0f (diff) | |
parent | 933999db752681ce881760e75befccd17e706f41 (diff) |
Merge branch 'master' into profiler-editorprofiler-editor
Diffstat (limited to 'source/blender/io/alembic/exporter/abc_writer_mesh.cc')
-rw-r--r-- | source/blender/io/alembic/exporter/abc_writer_mesh.cc | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/source/blender/io/alembic/exporter/abc_writer_mesh.cc b/source/blender/io/alembic/exporter/abc_writer_mesh.cc index c00e57c8edc..fd7db005dd2 100644 --- a/source/blender/io/alembic/exporter/abc_writer_mesh.cc +++ b/source/blender/io/alembic/exporter/abc_writer_mesh.cc @@ -200,6 +200,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->mpoly; m_custom_data_config.mloop = mesh->mloop; m_custom_data_config.totpoly = mesh->totpoly; @@ -250,7 +251,7 @@ void ABCGenericMeshWriter::write_mesh(HierarchyContext &context, Mesh *mesh) UVSample uvs_and_indices; - if (!frame_has_been_written_ && args_.export_params->uvs) { + if (args_.export_params->uvs) { const char *name = get_uv_sample(uvs_and_indices, m_custom_data_config, &mesh->ldata); if (!uvs_and_indices.indices.empty() && !uvs_and_indices.uvs.empty()) { @@ -279,6 +280,10 @@ void ABCGenericMeshWriter::write_mesh(HierarchyContext &context, Mesh *mesh) mesh_sample.setNormals(normals_sample); } + if (args_.export_params->orcos) { + write_generated_coordinates(abc_poly_mesh_schema_.getArbGeomParams(), m_custom_data_config); + } + if (liquid_sim_modifier_ != nullptr) { get_velocities(mesh, velocities); mesh_sample.setVelocities(V3fArraySample(velocities)); @@ -312,7 +317,7 @@ void ABCGenericMeshWriter::write_subd(HierarchyContext &context, struct Mesh *me V3fArraySample(points), Int32ArraySample(poly_verts), Int32ArraySample(loop_counts)); UVSample sample; - if (!frame_has_been_written_ && args_.export_params->uvs) { + if (args_.export_params->uvs) { const char *name = get_uv_sample(sample, m_custom_data_config, &mesh->ldata); if (!sample.indices.empty() && !sample.uvs.empty()) { @@ -329,6 +334,10 @@ void ABCGenericMeshWriter::write_subd(HierarchyContext &context, struct Mesh *me abc_subdiv_schema_.getArbGeomParams(), m_custom_data_config, &mesh->ldata, CD_MLOOPUV); } + if (args_.export_params->orcos) { + write_generated_coordinates(abc_poly_mesh_schema_.getArbGeomParams(), m_custom_data_config); + } + if (!crease_indices.empty()) { subdiv_sample.setCreaseIndices(Int32ArraySample(crease_indices)); subdiv_sample.setCreaseLengths(Int32ArraySample(crease_lengths)); |