Avoid failure of file writing if face colors or face normals are requested for PLY files. We just skip these options at this point.

git-svn-id: http://www.openmesh.org/svnrepo/OpenMesh/trunk@347 fdac6126-5c0c-442c-9429-916003d36597
This commit is contained in:
Mike Kremer
2010-11-23 17:36:12 +00:00
parent 87706c6665
commit a14aa7a2de

View File

@@ -86,8 +86,21 @@ write(const std::string& _filename, BaseExporter& _be, Options _opt) const
// check writer features // check writer features
if ( _opt.check(Options::FaceNormal) || _opt.check(Options::FaceColor) ) // not supported yet if ( _opt.check(Options::FaceNormal) ) {
return false; // Face normals are not supported
// Uncheck these options and output message that
// they are not written out even though they were requested
_opt.unset(Options::FaceNormal);
omerr() << "[PLYWriter] : Warning: Face normals are not supported and thus not exported! " << std::endl;
}
if ( _opt.check(Options::FaceColor) ) {
// Face normals are not supported
// Uncheck these options and output message that
// they are not written out even though they were requested
_opt.unset(Options::FaceColor);
omerr() << "[PLYWriter] : Warning: Face colors are not supported and thus not exported! " << std::endl;
}
options_ = _opt; options_ = _opt;