fix relative paths

This commit is contained in:
David Back 2017-12-28 16:39:02 -08:00
parent dee06e72f6
commit a855916eb8

View file

@ -297,7 +297,7 @@ void OBJReader::parseMaterialLibrary(QIODevice* device) {
} else if (token == "Ks") {
currentMaterial.specularColor = tokenizer.getVec3();
} else if ((token == "map_Kd") || (token == "map_Ke") || (token == "map_Ks")) {
QByteArray filename = QUrl(tokenizer.getLineAsDatum()).fileName().toUtf8();
QByteArray filename = QString(tokenizer.getLineAsDatum()).toUtf8();
if (filename.endsWith(".tga")) {
#ifdef WANT_DEBUG
qCDebug(modelformat) << "OBJ Reader WARNING: currently ignoring tga texture " << filename << " in " << _url;