diff options
author | Kévin Dietrich <kevin.dietrich@mailoo.org> | 2016-10-20 20:43:22 +0300 |
---|---|---|
committer | Kévin Dietrich <kevin.dietrich@mailoo.org> | 2016-10-20 20:43:22 +0300 |
commit | 0c4d949effa88f2ad54297a865fb2763f61c61aa (patch) | |
tree | 5aa1c1e147dc80bf33d59d310652d3522ed07517 /source/blender/alembic | |
parent | 32c2cba4ef1c940dab559cdc47b886c60cc9f2e1 (diff) |
Alembic: only export custom data (UVs, VCols) once, on the first frame.
This would cause Alembic to throw an exception and fail exporting
animations because it was trying to recreate and overwrite the
attributes for each frame.
Diffstat (limited to 'source/blender/alembic')
-rw-r--r-- | source/blender/alembic/intern/abc_mesh.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/alembic/intern/abc_mesh.cc b/source/blender/alembic/intern/abc_mesh.cc index 84b89d9ab9e..bb5d5ce3566 100644 --- a/source/blender/alembic/intern/abc_mesh.cc +++ b/source/blender/alembic/intern/abc_mesh.cc @@ -401,7 +401,7 @@ void AbcMeshWriter::writeMesh(DerivedMesh *dm) Int32ArraySample(loop_counts)); UVSample sample; - if (m_settings.export_uvs) { + if (m_first_frame && m_settings.export_uvs) { const char *name = get_uv_sample(sample, m_custom_data_config, &dm->loopData); if (!sample.indices.empty() && !sample.uvs.empty()) { @@ -470,7 +470,7 @@ void AbcMeshWriter::writeSubD(DerivedMesh *dm) Int32ArraySample(loop_counts)); UVSample sample; - if (m_settings.export_uvs) { + if (m_first_frame && m_settings.export_uvs) { const char *name = get_uv_sample(sample, m_custom_data_config, &dm->loopData); if (!sample.indices.empty() && !sample.uvs.empty()) { @@ -565,7 +565,7 @@ void AbcMeshWriter::writeArbGeoParams(DerivedMesh *dm) return; } - if (m_settings.export_vcols) { + if (m_first_frame && m_settings.export_vcols) { if (m_subdiv_schema.valid()) { write_custom_data(m_subdiv_schema.getArbGeomParams(), m_custom_data_config, &dm->loopData, CD_MLOOPCOL); } |