Commit a14aa7a2 authored by Mike Kremer's avatar Mike Kremer

Avoid failure of file writing if face colors or face normals are requested for...

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
parent 87706c66
......@@ -86,8 +86,21 @@ write(const std::string& _filename, BaseExporter& _be, Options _opt) const
// check writer features
if ( _opt.check(Options::FaceNormal) || _opt.check(Options::FaceColor) ) // not supported yet
return false;
if ( _opt.check(Options::FaceNormal) ) {
// 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;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment