From c15f0f60f58b75e443ed3ee4162514a6fe8b8da8 Mon Sep 17 00:00:00 2001 From: Isaak Lim Date: Thu, 16 May 2013 11:11:41 +0000 Subject: [PATCH] - fixed writing face indices in different configurations regarding vertex texture coordinates and vertex normals - adjusted the intial patch provided by Robert Luo refs #1560 git-svn-id: http://www.openmesh.org/svnrepo/OpenMesh/trunk@824 fdac6126-5c0c-442c-9429-916003d36597 --- src/OpenMesh/Core/IO/writer/OBJWriter.cc | 28 ++++++++++++++---------- 1 file changed, 17 insertions(+), 11 deletions(-) diff --git a/src/OpenMesh/Core/IO/writer/OBJWriter.cc b/src/OpenMesh/Core/IO/writer/OBJWriter.cc index 805e48a5..8150af9d 100644 --- a/src/OpenMesh/Core/IO/writer/OBJWriter.cc +++ b/src/OpenMesh/Core/IO/writer/OBJWriter.cc @@ -270,6 +270,10 @@ write(std::ostream& _out, BaseExporter& _be, Options _opt, std::streamsize _prec int lastMat = -1; + // we do not want to write seperators if we only write vertex indices + bool onlyVertices = !_opt.check(Options::VertexTexCoord) + && !_opt.check(Options::VertexNormal); + // faces (indices starting at 1 not 0) for (i=0, nF=_be.n_faces(); i