More checks/error messages for missing files,
checking return value of findDataFile.
This commit is contained in:
parent
eff0c610e2
commit
0b8bfd9ed8
@ -138,6 +138,10 @@ SGMaterial::read_properties(const SGReaderWriterOptions* options,
|
|||||||
tpath = SGPath("Textures");
|
tpath = SGPath("Textures");
|
||||||
tpath.append(tname);
|
tpath.append(tname);
|
||||||
fullTexPath = SGModelLib::findDataFile(tpath.str(), options);
|
fullTexPath = SGModelLib::findDataFile(tpath.str(), options);
|
||||||
|
if (fullTexPath.empty()) {
|
||||||
|
SG_LOG(SG_GENERAL, SG_ALERT, "Cannot find texture \""
|
||||||
|
<< tname << "\" in Textures or Textures.high folders.");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (tpath.lower_extension() == "dds") {
|
if (tpath.lower_extension() == "dds") {
|
||||||
@ -171,6 +175,10 @@ SGMaterial::read_properties(const SGReaderWriterOptions* options,
|
|||||||
tpath = SGPath("Textures");
|
tpath = SGPath("Textures");
|
||||||
tpath.append(tname);
|
tpath.append(tname);
|
||||||
fullTexPath = SGModelLib::findDataFile(tpath.str(), options);
|
fullTexPath = SGModelLib::findDataFile(tpath.str(), options);
|
||||||
|
if (fullTexPath.empty() ) {
|
||||||
|
SG_LOG(SG_GENERAL, SG_ALERT, "Cannot find texture \""
|
||||||
|
<< tname << "\" in Textures or Textures.high folders.");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (j == 0) {
|
if (j == 0) {
|
||||||
@ -214,8 +222,8 @@ SGMaterial::read_properties(const SGReaderWriterOptions* options,
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (fullMaskPath.empty()) {
|
if (fullMaskPath.empty()) {
|
||||||
SG_LOG(SG_GENERAL, SG_ALERT, "Cannot find texture file \""
|
SG_LOG(SG_GENERAL, SG_ALERT, "Cannot find texture \""
|
||||||
<< ompath.str() << "\"");
|
<< omname << "\" in Textures or Textures.high folders.");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user