diff options
author | Sybren A. Stüvel <sybren@blender.org> | 2020-05-12 16:08:03 +0300 |
---|---|---|
committer | Sybren A. Stüvel <sybren@blender.org> | 2020-05-12 16:08:03 +0300 |
commit | 1b289029bb543853ea8e6aa1b0eb35eab6e84440 (patch) | |
tree | 4d1c394185fee39ec64e893dbe50dd3c4199f16f /source/blender/io/alembic | |
parent | f7715b33374ae6be20fcc0b1db789c1b8451ead0 (diff) | |
parent | 94cbfb71bcf4f0499301f7c6f201124d8740cacf (diff) |
Merge remote-tracking branch 'origin/blender-v2.83-release'
Diffstat (limited to 'source/blender/io/alembic')
-rw-r--r-- | source/blender/io/alembic/intern/abc_reader_mesh.cc | 13 | ||||
-rw-r--r-- | source/blender/io/alembic/intern/abc_writer_mesh.cc | 2 |
2 files changed, 14 insertions, 1 deletions
diff --git a/source/blender/io/alembic/intern/abc_reader_mesh.cc b/source/blender/io/alembic/intern/abc_reader_mesh.cc index c85b1c60102..8b79a3a0aa0 100644 --- a/source/blender/io/alembic/intern/abc_reader_mesh.cc +++ b/source/blender/io/alembic/intern/abc_reader_mesh.cc @@ -481,6 +481,19 @@ bool AbcMeshReader::valid() const return m_schema.valid(); } +/* Specialisation of has_animations() as defined in abc_reader_object.h. */ +template<> bool has_animations(Alembic::AbcGeom::IPolyMeshSchema &schema, ImportSettings *settings) +{ + if (settings->is_sequence || !schema.isConstant()) { + return true; + } + + IV2fGeomParam uvsParam = schema.getUVsParam(); + IN3fGeomParam normalsParam = schema.getNormalsParam(); + return (uvsParam.valid() && !uvsParam.isConstant()) || + (normalsParam.valid() && !normalsParam.isConstant()); +} + void AbcMeshReader::readObjectData(Main *bmain, const Alembic::Abc::ISampleSelector &sample_sel) { Mesh *mesh = BKE_mesh_add(bmain, m_data_name.c_str()); diff --git a/source/blender/io/alembic/intern/abc_writer_mesh.cc b/source/blender/io/alembic/intern/abc_writer_mesh.cc index d5ab4e34828..89c37dab468 100644 --- a/source/blender/io/alembic/intern/abc_writer_mesh.cc +++ b/source/blender/io/alembic/intern/abc_writer_mesh.cc @@ -333,7 +333,7 @@ void AbcGenericMeshWriter::writeMesh(struct Mesh *mesh) V3fArraySample(points), Int32ArraySample(poly_verts), Int32ArraySample(loop_counts)); UVSample sample; - if (m_first_frame && m_settings.export_uvs) { + if (m_settings.export_uvs) { const char *name = get_uv_sample(sample, m_custom_data_config, &mesh->ldata); if (!sample.indices.empty() && !sample.uvs.empty()) { |