Corrected small bug inserted during the add of pervertexradius ply elements

This commit is contained in:
Paolo Cignoni 2009-03-19 10:29:24 +00:00
parent b8fc43e7c6
commit c5ad3694bd
1 changed files with 4 additions and 3 deletions

View File

@ -558,10 +558,11 @@ static int Open( OpenMeshType &m, const char * filename, PlyInfo &pi )
pi.mask |= Mask::IOM_VERTCOLOR;
}
}
if( VertexType::HasRadius() )
if(tri::HasPerVertexRadius(m))
{
pf.AddToRead(VertDesc(15));
pi.mask |= Mask::IOM_VERTRADIUS;
if( pf.AddToRead(VertDesc(15))!=-1 )
pi.mask |= Mask::IOM_VERTRADIUS;
}
// se ci sono i flag per vertice ci devono essere anche i flag per faccia
if( pf.AddToRead(FaceDesc(1))!=-1 )