Mesh: [skip ci] do not make lower case read lines of OBJ file as otherwise it may fail to load the MTL file

This commit is contained in:
wmayer
2021-03-20 19:19:30 +01:00
parent 3a656d8597
commit 182952a881

View File

@@ -341,11 +341,6 @@ bool MeshInput::LoadOBJ (std::istream &rstrIn)
unsigned long countMaterialFacets = 0;
while (std::getline(rstrIn, line)) {
// when a group name comes don't make it lower case
if (!line.empty() && line[0] != 'g') {
for (std::string::iterator it = line.begin(); it != line.end(); ++it)
*it = tolower(*it);
}
if (boost::regex_match(line.c_str(), what, rx_p)) {
fX = (float)std::atof(what[1].first);
fY = (float)std::atof(what[4].first);
@@ -1285,8 +1280,7 @@ bool MeshInput::LoadMeshNode (std::istream &rstrIn)
return false;
while (std::getline(rstrIn, line)) {
for (std::string::iterator it = line.begin(); it != line.end(); ++it)
*it = tolower(*it);
boost::algorithm::to_lower(line);
if (boost::regex_match(line.c_str(), what, rx_p)) {
fX = (float)std::atof(what[1].first);
fY = (float)std::atof(what[4].first);