- blend: patch for material importer, read emissive color. Thanks to Laurent Belcour for the patch!

git-svn-id: https://assimp.svn.sourceforge.net/svnroot/assimp/trunk@1269 67173fc5-114c-0410-ac8e-9d2fd5bffc1f
This commit is contained in:
aramis_acg
2012-06-26 19:16:09 +00:00
parent 4413006cbf
commit 79711b018a

View File

@@ -568,6 +568,11 @@ void BlenderImporter::BuildMaterials(ConversionData& conv_data)
// Usually, zero diffuse color means no diffuse color at all in the equation.
// So we omit this member to express this intent.
mout->AddProperty(&col,1,AI_MATKEY_COLOR_DIFFUSE);
if (mat->emit) {
aiColor3D emit_col(mat->emit * mat->r, mat->emit * mat->g, mat->emit * mat->b) ;
mout->AddProperty(&emit_col, 1, AI_MATKEY_COLOR_EMISSIVE) ;
}
}
col = aiColor3D(mat->specr,mat->specg,mat->specb);