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 | |
parent | f7715b33374ae6be20fcc0b1db789c1b8451ead0 (diff) | |
parent | 94cbfb71bcf4f0499301f7c6f201124d8740cacf (diff) |
Merge remote-tracking branch 'origin/blender-v2.83-release'
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/editors/screen/screen_context.c | 3 | ||||
-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 |
3 files changed, 17 insertions, 1 deletions
diff --git a/source/blender/editors/screen/screen_context.c b/source/blender/editors/screen/screen_context.c index 2ac113d2ba7..b383930ddda 100644 --- a/source/blender/editors/screen/screen_context.c +++ b/source/blender/editors/screen/screen_context.c @@ -514,6 +514,9 @@ int ed_screen_context(const bContext *C, const char *member, bContextDataResult ANIM_animdata_filter(&ac, &anim_data, ANIMFILTER_DATA_VISIBLE, ac.data, ac.datatype); for (ale = anim_data.first; ale; ale = ale->next) { + if (ale->datatype != ALE_NLASTRIP) { + continue; + } NlaTrack *nlt = (NlaTrack *)ale->data; NlaStrip *strip; for (strip = nlt->strips.first; strip; strip = strip->next) { 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()) { |