diff options
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/alembic/intern/abc_mesh.cc | 10 | ||||
-rw-r--r-- | source/blender/alembic/intern/abc_points.cc | 4 |
2 files changed, 10 insertions, 4 deletions
diff --git a/source/blender/alembic/intern/abc_mesh.cc b/source/blender/alembic/intern/abc_mesh.cc index cdb9312b3db..2472fe1945f 100644 --- a/source/blender/alembic/intern/abc_mesh.cc +++ b/source/blender/alembic/intern/abc_mesh.cc @@ -1019,7 +1019,7 @@ CDStreamConfig get_config(Mesh *mesh) { CDStreamConfig config; - BLI_assert(mesh->mvert); + BLI_assert(mesh->mvert || mesh->totvert == 0); config.user_data = mesh; config.mvert = mesh->mvert; @@ -1059,7 +1059,9 @@ void AbcMeshReader::readObjectData(Main *bmain, const Alembic::Abc::ISampleSelec m_object->data = mesh; Mesh *read_mesh = this->read_mesh(mesh, sample_sel, MOD_MESHSEQ_READ_ALL, NULL); - BKE_mesh_nomain_to_mesh(read_mesh, mesh, m_object, &CD_MASK_MESH, true); + if (read_mesh != mesh) { + BKE_mesh_nomain_to_mesh(read_mesh, mesh, m_object, &CD_MASK_MESH, true); + } if (m_settings->validate_meshes) { BKE_mesh_validate(mesh, false, false); @@ -1342,7 +1344,9 @@ void AbcSubDReader::readObjectData(Main *bmain, const Alembic::Abc::ISampleSelec m_object->data = mesh; Mesh *read_mesh = this->read_mesh(mesh, sample_sel, MOD_MESHSEQ_READ_ALL, NULL); - BKE_mesh_nomain_to_mesh(read_mesh, mesh, m_object, &CD_MASK_MESH, true); + if (read_mesh != mesh) { + BKE_mesh_nomain_to_mesh(read_mesh, mesh, m_object, &CD_MASK_MESH, true); + } ISubDSchema::Sample sample; try { diff --git a/source/blender/alembic/intern/abc_points.cc b/source/blender/alembic/intern/abc_points.cc index 88154dabeed..bc8c1e2debb 100644 --- a/source/blender/alembic/intern/abc_points.cc +++ b/source/blender/alembic/intern/abc_points.cc @@ -174,7 +174,9 @@ void AbcPointsReader::readObjectData(Main *bmain, const Alembic::Abc::ISampleSel Mesh *mesh = BKE_mesh_add(bmain, m_data_name.c_str()); Mesh *read_mesh = this->read_mesh(mesh, sample_sel, 0, NULL); - BKE_mesh_nomain_to_mesh(read_mesh, mesh, m_object, &CD_MASK_MESH, true); + if (read_mesh != mesh) { + BKE_mesh_nomain_to_mesh(read_mesh, mesh, m_object, &CD_MASK_MESH, true); + } if (m_settings->validate_meshes) { BKE_mesh_validate(mesh, false, false); |