[VCS-1030] add log info about .mtl fallback

pull/835/head
Robert Liebo 2016-03-22 18:39:52 +01:00 committed by ViewAR Win32
parent abb3e6b854
commit 124fc9ae27
1 changed files with 2 additions and 1 deletions

View File

@ -576,9 +576,10 @@ void ObjFileParser::getMaterialLib()
if (!pFile ) {
DefaultLogger::get()->error("OBJ: Unable to locate material file " + strMatName);
std::string strMatFallbackName = m_originalObjFileName.substr(0, m_originalObjFileName.length() - 3) + "mtl";
DefaultLogger::get()->info("OBJ: Opening fallback material file " + strMatFallbackName);
pFile = m_pIO->Open(strMatFallbackName);
if (!pFile) {
DefaultLogger::get()->error("OBJ: Unable to locate material fallback file " + strMatName);
DefaultLogger::get()->error("OBJ: Unable to locate fallback material file " + strMatName);
m_DataIt = skipLine<DataArrayIt>(m_DataIt, m_DataItEnd, m_uiLine);
return;
}