Don’t ignore rgba(1,1,1,1) color properties

Do not ignore rgba(1,1,1,1) material properties when importing glTF1. While a white diffuse color may be the default value for a default assimp material, `1,1,1,1` is a very explicit color value for ambient/specular/emissive color properties.

Closes #1434
pull/1447/head
Daniel Hritzkiv 2017-09-18 18:16:48 -04:00
parent d473a49456
commit 3e8955faf5
No known key found for this signature in database
GPG Key ID: D1D19875679D5CBF
1 changed files with 2 additions and 4 deletions

View File

@ -174,11 +174,9 @@ inline void SetMaterialColorProperty(std::vector<int>& embeddedTexIdxs, Asset& r
else {
aiColor4D col;
CopyValue(prop.color, col);
if (col.r != 1.f || col.g != 1.f || col.b != 1.f || col.a != 1.f) {
mat->AddProperty(&col, 1, pKey, type, idx);
}
}
}
void glTFImporter::ImportMaterials(glTF::Asset& r)
{