Pārlūkot izejas kodu

Merge pull request #1447 from Matter-and-Form/gltf1-color-import-fix

[gltf1] Don’t ignore rgba(1,1,1,1) color properties
Kim Kulling 8 gadi atpakaļ
vecāks
revīzija
5c44776532
1 mainītis faili ar 2 papildinājumiem un 4 dzēšanām
  1. 2 4
      code/glTFImporter.cpp

+ 2 - 4
code/glTFImporter.cpp

@@ -174,9 +174,7 @@ 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);
-        }
+        mat->AddProperty(&col, 1, pKey, type, idx);
     }
 }
 
@@ -672,7 +670,7 @@ void glTFImporter::InternReadFile(const std::string& pFile, aiScene* pScene, IOS
     //pScene->mFlags |= AI_SCENE_FLAGS_NON_VERBOSE_FORMAT;
 	MakeVerboseFormatProcess process;
     process.Execute(pScene);
-    
+
 
     if (pScene->mNumMeshes == 0) {
         pScene->mFlags |= AI_SCENE_FLAGS_INCOMPLETE;