This commit is contained in:
David Back 2017-12-27 16:55:45 -08:00
parent c3801fee7e
commit 5e45ee456c
2 changed files with 5 additions and 0 deletions

Binary file not shown.

View file

@ -277,7 +277,9 @@ void OBJReader::parseMaterialLibrary(QIODevice* device) {
#ifdef WANT_DEBUG
qCDebug(modelformat) << "OBJ Reader Starting new material definition " << matName;
#endif
//currentMaterial.emissiveTextureFilename = "";
currentMaterial.diffuseTextureFilename = "";
//currentMaterial.specularTextureFilename = "";
} else if (token == "Ns") {
currentMaterial.shininess = tokenizer.getFloat();
} else if ((token == "d") || (token == "Tr")) {
@ -745,6 +747,9 @@ FBXGeometry* OBJReader::readOBJ(QByteArray& model, const QVariantHash& mapping,
if (!objMaterial.specularTextureFilename.isEmpty()) {
fbxMaterial.specularTexture.filename = objMaterial.specularTextureFilename;
}
if (!objMaterial.emissiveTextureFilename.isEmpty()) {
fbxMaterial.emissiveTexture.filename = objMaterial.emissiveTextureFilename;
}
modelMaterial->setEmissive(fbxMaterial.emissiveColor);
modelMaterial->setAlbedo(fbxMaterial.diffuseColor);