Utility: Fix MD5/MTL/OBJ file parsing
This commit is contained in:
parent
52f80a68cb
commit
7244f1681c
|
|
@ -250,6 +250,9 @@ namespace Nz
|
||||||
m_lineCount++;
|
m_lineCount++;
|
||||||
|
|
||||||
m_currentLine = m_stream.ReadLine();
|
m_currentLine = m_stream.ReadLine();
|
||||||
|
if (m_currentLine.IsEmpty())
|
||||||
|
continue;
|
||||||
|
|
||||||
m_currentLine = m_currentLine.SubStringTo("//"); // On ignore les commentaires
|
m_currentLine = m_currentLine.SubStringTo("//"); // On ignore les commentaires
|
||||||
m_currentLine.Simplify(); // Pour un traitement plus simple
|
m_currentLine.Simplify(); // Pour un traitement plus simple
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -182,6 +182,9 @@ namespace Nz
|
||||||
m_lineCount++;
|
m_lineCount++;
|
||||||
|
|
||||||
m_currentLine = m_stream.ReadLine();
|
m_currentLine = m_stream.ReadLine();
|
||||||
|
if (m_currentLine.IsEmpty())
|
||||||
|
continue;
|
||||||
|
|
||||||
m_currentLine = m_currentLine.SubStringTo("//"); // On ignore les commentaires
|
m_currentLine = m_currentLine.SubStringTo("//"); // On ignore les commentaires
|
||||||
m_currentLine.Simplify(); // Pour un traitement plus simple
|
m_currentLine.Simplify(); // Pour un traitement plus simple
|
||||||
m_currentLine.Trim();
|
m_currentLine.Trim();
|
||||||
|
|
|
||||||
|
|
@ -450,6 +450,9 @@ namespace Nz
|
||||||
m_lineCount++;
|
m_lineCount++;
|
||||||
|
|
||||||
m_currentLine = m_currentStream->ReadLine();
|
m_currentLine = m_currentStream->ReadLine();
|
||||||
|
if (m_currentLine.IsEmpty())
|
||||||
|
continue;
|
||||||
|
|
||||||
m_currentLine = m_currentLine.SubStringTo("#"); // On ignore les commentaires
|
m_currentLine = m_currentLine.SubStringTo("#"); // On ignore les commentaires
|
||||||
m_currentLine.Simplify(); // Pour un traitement plus simple
|
m_currentLine.Simplify(); // Pour un traitement plus simple
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -617,6 +617,9 @@ namespace Nz
|
||||||
m_lineCount++;
|
m_lineCount++;
|
||||||
|
|
||||||
m_currentLine = m_currentStream->ReadLine();
|
m_currentLine = m_currentStream->ReadLine();
|
||||||
|
if (m_currentLine.IsEmpty())
|
||||||
|
continue;
|
||||||
|
|
||||||
m_currentLine.Simplify(); // Simplify lines (convert multiple blanks into a single space and trims)
|
m_currentLine.Simplify(); // Simplify lines (convert multiple blanks into a single space and trims)
|
||||||
}
|
}
|
||||||
while (m_currentLine.IsEmpty());
|
while (m_currentLine.IsEmpty());
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue