From a14aa7a2dee4e736cd3d239dcdc29b26ad098378 Mon Sep 17 00:00:00 2001 From: Mike Kremer Date: Tue, 23 Nov 2010 17:36:12 +0000 Subject: [PATCH] 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 --- src/OpenMesh/Core/IO/writer/PLYWriter.cc | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/src/OpenMesh/Core/IO/writer/PLYWriter.cc b/src/OpenMesh/Core/IO/writer/PLYWriter.cc index 953bf427..a497739a 100644 --- a/src/OpenMesh/Core/IO/writer/PLYWriter.cc +++ b/src/OpenMesh/Core/IO/writer/PLYWriter.cc @@ -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; -- GitLab