Quellcode durchsuchen

- 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
aramis_acg vor 13 Jahren
Ursprung
Commit
79711b018a
1 geänderte Dateien mit 5 neuen und 0 gelöschten Zeilen
  1. 5 0
      code/BlenderLoader.cpp

+ 5 - 0
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);