Commit bcccd464 authored by Martin Schultz's avatar Martin Schultz

added changes from pre submodule mergerequest

don't emit an OM error message for every face that could not be added
parent abf39fa4
......@@ -754,6 +754,10 @@ bool FileOFFPlugin::parseASCII(std::istream& _in, OFFImporter& _importer, DataTy
break;
}
const bool omerr_enabled = omerr().is_enabled();
if (omerr_enabled)
omerr().disable();
// faces
// #N <v1> <v2> .. <v(n-1)> [color spec]
for (uint i=0; i<nF; ++i)
......@@ -860,6 +864,9 @@ bool FileOFFPlugin::parseASCII(std::istream& _in, OFFImporter& _importer, DataTy
}
}
if (omerr_enabled)
omerr().enable();
// File was successfully parsed.
return true;
}
......@@ -970,6 +977,10 @@ bool FileOFFPlugin::parseBinary(std::istream& _in, OFFImporter& _importer, DataT
// Reserve memory
_importer.reserve(nV, nF * _importer.maxFaceValence() /*Upper bound*/, nF);
const bool omerr_enabled = omerr().is_enabled();
if (omerr_enabled)
omerr().disable();
// read vertices: coord [hcoord] [normal] [color] [texcoord]
for (uint i=0; i<nV && !_in.eof(); ++i)
{
......@@ -1141,6 +1152,9 @@ bool FileOFFPlugin::parseBinary(std::istream& _in, OFFImporter& _importer, DataT
}
}
if (omerr_enabled)
omerr().enable();
// File was successfully parsed.
return true;
}
......
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