diff --git a/code/ColladaExporter.cpp b/code/ColladaExporter.cpp index 7f5333adc..6bd87e8f0 100644 --- a/code/ColladaExporter.cpp +++ b/code/ColladaExporter.cpp @@ -875,6 +875,11 @@ void ColladaExporter::WriteGeometry( size_t pIndex) mOutput << startstr << "" << endstr; PushTag(); mOutput << startstr << "" << endstr; + for( size_t a = 0; a < AI_MAX_NUMBER_OF_TEXTURECOORDS; ++a ) + { + if( mesh->HasTextureCoords( a) ) + mOutput << startstr << "" << endstr; + } mOutput << startstr << ""; for( size_t a = 0; a < mesh->mNumFaces; ++a ) @@ -1070,8 +1075,19 @@ void ColladaExporter::WriteNode(aiNode* pNode) PushTag(); mOutput << startstr << "" << endstr; PushTag(); - mOutput << startstr << "mMaterialIndex].name) << "\" />" << endstr; - PopTag(); + mOutput << startstr << "mMaterialIndex].name) << "\">" << endstr; + PushTag(); + for( size_t a = 0; a < AI_MAX_NUMBER_OF_TEXTURECOORDS; ++a ) + { + if( mesh->HasTextureCoords( a) ) + // semantic as in + // input_semantic as in + // input_set as in + mOutput << startstr << "" << endstr; + } + PopTag(); + mOutput << startstr << "" << endstr; + PopTag(); mOutput << startstr << "" << endstr; PopTag(); mOutput << startstr << "" << endstr; diff --git a/code/XFileExporter.cpp b/code/XFileExporter.cpp index 55cf95c5d..d0d05fea6 100644 --- a/code/XFileExporter.cpp +++ b/code/XFileExporter.cpp @@ -309,12 +309,12 @@ void XFileExporter::WriteNode( aiNode* pNode) WriteFrameTransform(m); - for (size_t i = 0; i < pNode->mNumMeshes; i++) + for (size_t i = 0; i < pNode->mNumMeshes; ++i) WriteMesh(mScene->mMeshes[pNode->mMeshes[i]]); // recursive call the Nodes for (size_t i = 0; i < pNode->mNumChildren; ++i) - WriteNode( mScene->mRootNode->mChildren[i]); + WriteNode(pNode->mChildren[i]); PopTag();