Browse Source

FIX: ObjLoader reads opacity now.

git-svn-id: https://assimp.svn.sourceforge.net/svnroot/assimp/trunk@419 67173fc5-114c-0410-ac8e-9d2fd5bffc1f
aramis_acg 16 years ago
parent
commit
13804abf2e
2 changed files with 2 additions and 1 deletions
  1. 1 0
      code/ObjFileImporter.cpp
  2. 1 1
      code/ObjFileMtlImporter.cpp

+ 1 - 0
code/ObjFileImporter.cpp

@@ -448,6 +448,7 @@ void ObjFileImporter::createMaterial(const ObjFile::Model* pModel, const ObjFile
 		mat->AddProperty( &pCurrentMaterial->diffuse, 1, AI_MATKEY_COLOR_DIFFUSE );
 		mat->AddProperty( &pCurrentMaterial->specular, 1, AI_MATKEY_COLOR_SPECULAR );
 		mat->AddProperty( &pCurrentMaterial->shineness, 1, AI_MATKEY_SHININESS );
+		mat->AddProperty( &pCurrentMaterial->alpha, 1, AI_MATKEY_OPACITY );
 
 		// Adding refraction index
 		mat->AddProperty( &pCurrentMaterial->ior, 1, AI_MATKEY_REFRACTI );

+ 1 - 1
code/ObjFileMtlImporter.cpp

@@ -284,7 +284,7 @@ void ObjFileMtlImporter::getTexture()
 	}
 
 	std::string strTexture;
-	getName<DataArrayIt>( m_DataIt, m_DataItEnd, strTexture );
+	m_DataIt = getName<DataArrayIt>( m_DataIt, m_DataItEnd, strTexture );
 	out->Set( strTexture );
 }