Commit 9cf65cf2 authored by Jan Möbius's avatar Jan Möbius
Browse files

Don't try to add information when faces are not added

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@12673 383ad7c9-94d9-4d36-a494-682f7c89f535
parent bc0161ac
...@@ -446,7 +446,10 @@ void OBJImporter::addFace(const VHandles& _indices, const std::vector<int>& _fac ...@@ -446,7 +446,10 @@ void OBJImporter::addFace(const VHandles& _indices, const std::vector<int>& _fac
if(!fh.is_valid()) { if(!fh.is_valid()) {
// Store non-manifold face // Store non-manifold face
invalidFaces_.push_back(vertices); invalidFaces_.push_back(vertices);
}
std::cerr << "Error: Unable to add face " << std::endl;
} else {
// Store recently added face // Store recently added face
for( size_t i=0; i < currentTriMesh()->n_faces()-n_faces; ++i ) for( size_t i=0; i < currentTriMesh()->n_faces()-n_faces; ++i )
...@@ -479,6 +482,8 @@ void OBJImporter::addFace(const VHandles& _indices, const std::vector<int>& _fac ...@@ -479,6 +482,8 @@ void OBJImporter::addFace(const VHandles& _indices, const std::vector<int>& _fac
std::cerr << "Error: cannot set texture coordinates. undefined index." << std::endl; std::cerr << "Error: cannot set texture coordinates. undefined index." << std::endl;
} }
}
} else if ( isPolyMesh( currentObject() ) ){ } else if ( isPolyMesh( currentObject() ) ){
...@@ -505,7 +510,7 @@ void OBJImporter::addFace(const VHandles& _indices, const std::vector<int>& _fac ...@@ -505,7 +510,7 @@ void OBJImporter::addFace(const VHandles& _indices, const std::vector<int>& _fac
if(!fh.is_valid()) { if(!fh.is_valid()) {
// Store non-manifold face // Store non-manifold face
invalidFaces_.push_back(vertices); invalidFaces_.push_back(vertices);
} } else {
addedFacePoly_ = fh; addedFacePoly_ = fh;
...@@ -538,6 +543,7 @@ void OBJImporter::addFace(const VHandles& _indices, const std::vector<int>& _fac ...@@ -538,6 +543,7 @@ void OBJImporter::addFace(const VHandles& _indices, const std::vector<int>& _fac
} }
} }
} }
}
} }
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
......
Supports Markdown
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