Changeset View
Changeset View
Standalone View
Standalone View
source/blender/alembic/intern/abc_mesh.cc
| Show First 20 Lines • Show All 1,099 Lines • ▼ Show 20 Lines | Mesh *AbcMeshReader::read_mesh(Mesh *existing_mesh, | ||||
| } | } | ||||
| catch(Alembic::Util::Exception &ex) { | catch(Alembic::Util::Exception &ex) { | ||||
| *err_str = "Error reading mesh sample; more detail on the console"; | *err_str = "Error reading mesh sample; more detail on the console"; | ||||
| printf("Alembic: error reading mesh sample for '%s/%s' at time %f: %s\n", | printf("Alembic: error reading mesh sample for '%s/%s' at time %f: %s\n", | ||||
| m_iobject.getFullName().c_str(), | m_iobject.getFullName().c_str(), | ||||
| m_schema.getName().c_str(), | m_schema.getName().c_str(), | ||||
| sample_sel.getRequestedTime(), | sample_sel.getRequestedTime(), | ||||
| ex.what()); | ex.what()); | ||||
| return existing_mesh; | return existing_mesh; | ||||
brecht: The same bug will happen in this code path. | |||||
| } | } | ||||
| const P3fArraySamplePtr &positions = sample.getPositions(); | const P3fArraySamplePtr &positions = sample.getPositions(); | ||||
| const Alembic::Abc::Int32ArraySamplePtr &face_indices = sample.getFaceIndices(); | const Alembic::Abc::Int32ArraySamplePtr &face_indices = sample.getFaceIndices(); | ||||
| const Alembic::Abc::Int32ArraySamplePtr &face_counts = sample.getFaceCounts(); | const Alembic::Abc::Int32ArraySamplePtr &face_counts = sample.getFaceCounts(); | ||||
| if (positions->size() == 0) { | |||||
| BLI_assert(face_indices->size() == 0); | |||||
| BLI_assert(face_counts->size() == 0); | |||||
| return BKE_mesh_new_nomain_from_template(existing_mesh, 0, 0, 0, 0, 0); | |||||
| } | |||||
| Mesh *new_mesh = NULL; | Mesh *new_mesh = NULL; | ||||
| /* Only read point data when streaming meshes, unless we need to create new ones. */ | /* Only read point data when streaming meshes, unless we need to create new ones. */ | ||||
| ImportSettings settings; | ImportSettings settings; | ||||
| settings.read_flag |= read_flag; | settings.read_flag |= read_flag; | ||||
| bool topology_changed = positions->size() != existing_mesh->totvert || | bool topology_changed = positions->size() != existing_mesh->totvert || | ||||
| face_counts->size() != existing_mesh->totpoly || | face_counts->size() != existing_mesh->totpoly || | ||||
| ▲ Show 20 Lines • Show All 340 Lines • Show Last 20 Lines | |||||
The same bug will happen in this code path.