From 79711b018ab02ebf9a5e74678cce0b006254d596 Mon Sep 17 00:00:00 2001 From: aramis_acg Date: Tue, 26 Jun 2012 19:16:09 +0000 Subject: [PATCH] - 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 --- code/BlenderLoader.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/code/BlenderLoader.cpp b/code/BlenderLoader.cpp index 4e15727bc..fa9ca6e70 100644 --- a/code/BlenderLoader.cpp +++ b/code/BlenderLoader.cpp @@ -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);