diff --git a/code/LWOLoader.cpp b/code/LWOLoader.cpp index feb8ee8df..5ec07800d 100644 --- a/code/LWOLoader.cpp +++ b/code/LWOLoader.cpp @@ -67,7 +67,7 @@ static const aiImporterDesc desc = { "LightWave/Modo Object Importer", "", "", - "http://www.newtek.com/lightwave.html\nhttp://www.luxology.com/modo/", + "https://www.lightwave3d.com/lightwave_sdk/", aiImporterFlags_SupportTextFlavour, 0, 0, diff --git a/code/ObjExporter.cpp b/code/ObjExporter.cpp index 564de1c12..d51097699 100644 --- a/code/ObjExporter.cpp +++ b/code/ObjExporter.cpp @@ -122,14 +122,17 @@ std::string ObjExporter :: GetMaterialLibName() } // ------------------------------------------------------------------------------------------------ -std::string ObjExporter :: GetMaterialLibFileName() -{ +std::string ObjExporter::GetMaterialLibFileName() { + // Remove existing .obj file extention so that the final material file name will be fileName.mtl and not fileName.obj.mtl + size_t lastdot = filename.find_last_of('.'); + if (lastdot != std::string::npos) + filename = filename.substr(0, lastdot); + return filename + MaterialExt; } // ------------------------------------------------------------------------------------------------ -void ObjExporter :: WriteHeader(std::ostringstream& out) -{ +void ObjExporter :: WriteHeader(std::ostringstream& out) { out << "# File produced by Open Asset Import Library (http://www.assimp.sf.net)" << endl; out << "# (assimp v" << aiGetVersionMajor() << '.' << aiGetVersionMinor() << '.' << aiGetVersionRevision() << ")" << endl << endl; } diff --git a/code/ObjExporter.h b/code/ObjExporter.h index e31bf07b7..754202d7b 100644 --- a/code/ObjExporter.h +++ b/code/ObjExporter.h @@ -105,7 +105,7 @@ private: void AddNode(const aiNode* nd, const aiMatrix4x4& mParent); private: - const std::string filename; + std::string filename; const aiScene* const pScene; std::vector vp, vn, vt;