From 13804abf2ef8f65d5017c7a1ebc9312240973f6b Mon Sep 17 00:00:00 2001 From: aramis_acg Date: Sun, 10 May 2009 00:08:06 +0000 Subject: [PATCH] FIX: ObjLoader reads opacity now. git-svn-id: https://assimp.svn.sourceforge.net/svnroot/assimp/trunk@419 67173fc5-114c-0410-ac8e-9d2fd5bffc1f --- code/ObjFileImporter.cpp | 1 + code/ObjFileMtlImporter.cpp | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/code/ObjFileImporter.cpp b/code/ObjFileImporter.cpp index 7237111dd..3c0aa77c6 100644 --- a/code/ObjFileImporter.cpp +++ b/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 ); diff --git a/code/ObjFileMtlImporter.cpp b/code/ObjFileMtlImporter.cpp index bca10076c..bea2c6488 100644 --- a/code/ObjFileMtlImporter.cpp +++ b/code/ObjFileMtlImporter.cpp @@ -284,7 +284,7 @@ void ObjFileMtlImporter::getTexture() } std::string strTexture; - getName( m_DataIt, m_DataItEnd, strTexture ); + m_DataIt = getName( m_DataIt, m_DataItEnd, strTexture ); out->Set( strTexture ); }