From afa2d3da940f4b254d52d21c90a859db1446d1cf Mon Sep 17 00:00:00 2001 From: Robin Date: Wed, 9 Jul 2014 15:37:27 +0200 Subject: [PATCH] Improved texture map data in mtl exporter (in most cases an upper first character is used) --- code/ObjExporter.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/code/ObjExporter.cpp b/code/ObjExporter.cpp index 058133f8e..7ebb55b3e 100644 --- a/code/ObjExporter.cpp +++ b/code/ObjExporter.cpp @@ -145,16 +145,16 @@ void ObjExporter::WriteMaterialFile() aiColor4D c; if(AI_SUCCESS == mat->Get(AI_MATKEY_COLOR_DIFFUSE,c)) { - mOutputMat << "kd " << c.r << " " << c.g << " " << c.b << endl; + mOutputMat << "Kd " << c.r << " " << c.g << " " << c.b << endl; } if(AI_SUCCESS == mat->Get(AI_MATKEY_COLOR_AMBIENT,c)) { - mOutputMat << "ka " << c.r << " " << c.g << " " << c.b << endl; + mOutputMat << "Ka " << c.r << " " << c.g << " " << c.b << endl; } if(AI_SUCCESS == mat->Get(AI_MATKEY_COLOR_SPECULAR,c)) { - mOutputMat << "ks " << c.r << " " << c.g << " " << c.b << endl; + mOutputMat << "Ks " << c.r << " " << c.g << " " << c.b << endl; } if(AI_SUCCESS == mat->Get(AI_MATKEY_COLOR_EMISSIVE,c)) { - mOutputMat << "ke " << c.r << " " << c.g << " " << c.b << endl; + mOutputMat << "Ke " << c.r << " " << c.g << " " << c.b << endl; } float o; @@ -171,16 +171,16 @@ void ObjExporter::WriteMaterialFile() aiString s; if(AI_SUCCESS == mat->Get(AI_MATKEY_TEXTURE_DIFFUSE(0),s)) { - mOutputMat << "map_kd " << s.data << endl; + mOutputMat << "map_Kd " << s.data << endl; } if(AI_SUCCESS == mat->Get(AI_MATKEY_TEXTURE_AMBIENT(0),s)) { - mOutputMat << "map_ka " << s.data << endl; + mOutputMat << "map_Ka " << s.data << endl; } if(AI_SUCCESS == mat->Get(AI_MATKEY_TEXTURE_SPECULAR(0),s)) { - mOutputMat << "map_ks " << s.data << endl; + mOutputMat << "map_Ks " << s.data << endl; } if(AI_SUCCESS == mat->Get(AI_MATKEY_TEXTURE_SHININESS(0),s)) { - mOutputMat << "map_ns " << s.data << endl; + mOutputMat << "map_Ns " << s.data << endl; } if(AI_SUCCESS == mat->Get(AI_MATKEY_TEXTURE_OPACITY(0),s)) { mOutputMat << "map_d " << s.data << endl;