diff --git a/wrap/io_trimesh/io_ply.h b/wrap/io_trimesh/io_ply.h index df722c05..b376ee86 100644 --- a/wrap/io_trimesh/io_ply.h +++ b/wrap/io_trimesh/io_ply.h @@ -109,9 +109,12 @@ public: for(int i=0;i<3;++i) { htt[i] = vcg::tri::Allocator:: template GetPerVertexAttribute (m,std::string(attrxyz[i])); - ForEachVertex (m, [&](typename MeshType::VertexType &v) { - htt[i][v] = ht[v][i]; - }); +// ForEachVertex (m, [&](typename MeshType::VertexType &v) { +// htt[i][v] = ht[v][i]; +// }); + for(auto vi=m.vert.begin();vi!=m.vert.end();++vi) + if(!vi->IsD()) + htt[i][vi] = ht[vi][i]; AddPerVertexFloatAttribute(attrxyz[i]); } }