diff --git a/wrap/io_trimesh/export_ply.h b/wrap/io_trimesh/export_ply.h index af74f0a5..126a7bd4 100644 --- a/wrap/io_trimesh/export_ply.h +++ b/wrap/io_trimesh/export_ply.h @@ -425,7 +425,7 @@ static int Save(SaveMeshType &m, const char * filename, bool binary, PlyInfo &p for(j=0,vi=m.vert.begin();vi!=m.vert.end();++vi){ vp=&(*vi); - indices[j] = j; + indices[vi] = j; if( !m.HasPerVertexFlags() || !vp->IsD() ) {