diff --git a/code/AssimpPCH.cpp b/code/AssimpPCH.cpp index 2ee9e4b95..62df955de 100644 --- a/code/AssimpPCH.cpp +++ b/code/AssimpPCH.cpp @@ -88,8 +88,6 @@ ASSIMP_API aiScene::aiScene() , mNumCameras(0) , mCameras(NULL) , mPrivate(new Assimp::ScenePrivateData()) - , author("Assimp") - , authoringTool("Assimp Importer-Exporter") { } diff --git a/code/ColladaExporter.cpp b/code/ColladaExporter.cpp index e4099b365..963827966 100644 --- a/code/ColladaExporter.cpp +++ b/code/ColladaExporter.cpp @@ -58,7 +58,7 @@ namespace Assimp // ------------------------------------------------------------------------------------------------ // Worker function for exporting a scene to Collada. Prototyped and registered in Exporter.cpp -void ExportSceneCollada(const char* pFile,IOSystem* pIOSystem, const aiScene* pScene) +void ExportSceneCollada(const char* pFile, IOSystem* pIOSystem, const aiScene* pScene) { std::string path = ""; std::string file = pFile; @@ -230,8 +230,22 @@ void ColladaExporter::WriteHeader() PushTag(); mOutput << startstr << "" << endstr; PushTag(); - mOutput << startstr << "" << mScene->author.C_Str() << "" << endstr; - mOutput << startstr << "" << mScene->authoringTool.C_Str() << "" << endstr; + + aiMetadata* meta = mScene->mRootNode->mMetaData; + aiString value; + if (!meta || !meta->Get("Author", value)) + mOutput << startstr << "" << "Assimp" << "" << endstr; + else + mOutput << startstr << "" << value.C_Str() << "" << endstr; + + if (!meta || !meta->Get("AuthoringTool", value)) + mOutput << startstr << "" << "Assimp Exporter" << "" << endstr; + else + mOutput << startstr << "" << value.C_Str() << "" << endstr; + + //mOutput << startstr << "" << mScene->author.C_Str() << "" << endstr; + //mOutput << startstr << "" << mScene->authoringTool.C_Str() << "" << endstr; + PopTag(); mOutput << startstr << "" << endstr; mOutput << startstr << "" << date_str << "" << endstr; diff --git a/code/XFileExporter.cpp b/code/XFileExporter.cpp index e06382bcb..2cd3c4d37 100644 --- a/code/XFileExporter.cpp +++ b/code/XFileExporter.cpp @@ -125,7 +125,7 @@ XFileExporter::~XFileExporter() void XFileExporter::WriteFile() { // note, that all realnumber values must be comma separated in x files - mOutput.setf(_IOSfixed); + mOutput.setf(std::ios::fixed); mOutput.precision(6); // precission for float // entry of writing the file diff --git a/include/assimp/scene.h b/include/assimp/scene.h index f40323126..87f13152f 100644 --- a/include/assimp/scene.h +++ b/include/assimp/scene.h @@ -375,15 +375,6 @@ struct aiScene */ C_STRUCT aiCamera** mCameras; - - /** a string representing the author - */ - aiString author; - - /** a string representing the authoringtool - */ - aiString authoringTool; - #ifdef __cplusplus //! Default constructor - set everything to 0/NULL