Alembic import: fix incorrect 'topology changed' error
authorSybren A. Stüvel <sybren@blender.org>
Tue, 5 Nov 2019 16:44:37 +0000 (17:44 +0100)
committerSybren A. Stüvel <sybren@blender.org>
Tue, 5 Nov 2019 16:44:37 +0000 (17:44 +0100)
When importing subdivision surfaces a 'Topology Changed' error was shown
even though the topology didn't change at all. The code was comparing to
`totpoly` where `totloop` should have been used.

source/blender/alembic/intern/abc_mesh.cc

index 651f32e6ab0ea2970fd11ea1f53aa06e6df40350..61e8771e8456ad7be5664995261f4493c6ad0692 100644 (file)
@@ -1495,7 +1495,7 @@ Mesh *AbcSubDReader::read_mesh(Mesh *existing_mesh,
      * This prevents crash from T49813.
      * TODO(kevin): perhaps find a better way to do this? */
     if (face_counts->size() != existing_mesh->totpoly ||
-        face_indices->size() != existing_mesh->totpoly) {
+        face_indices->size() != existing_mesh->totloop) {
       settings.read_flag = MOD_MESHSEQ_READ_VERT;
 
       if (err_str) {