Merge branch 'master' of https://github.com/assimp/assimp
commit
912cf63b71
|
@ -875,6 +875,11 @@ void ColladaExporter::WriteGeometry( size_t pIndex)
|
||||||
mOutput << startstr << "<polylist count=\"" << countPoly << "\" material=\"defaultMaterial\">" << endstr;
|
mOutput << startstr << "<polylist count=\"" << countPoly << "\" material=\"defaultMaterial\">" << endstr;
|
||||||
PushTag();
|
PushTag();
|
||||||
mOutput << startstr << "<input offset=\"0\" semantic=\"VERTEX\" source=\"#" << idstrEscaped << "-vertices\" />" << endstr;
|
mOutput << startstr << "<input offset=\"0\" semantic=\"VERTEX\" source=\"#" << idstrEscaped << "-vertices\" />" << endstr;
|
||||||
|
for( size_t a = 0; a < AI_MAX_NUMBER_OF_TEXTURECOORDS; ++a )
|
||||||
|
{
|
||||||
|
if( mesh->HasTextureCoords( a) )
|
||||||
|
mOutput << startstr << "<input offset=\"0\" semantic=\"TEXCOORD\" source=\"#" << idstrEscaped << "-tex" << a << "\" set=\"" << a << "\" />" << endstr;
|
||||||
|
}
|
||||||
|
|
||||||
mOutput << startstr << "<vcount>";
|
mOutput << startstr << "<vcount>";
|
||||||
for( size_t a = 0; a < mesh->mNumFaces; ++a )
|
for( size_t a = 0; a < mesh->mNumFaces; ++a )
|
||||||
|
@ -1070,7 +1075,18 @@ void ColladaExporter::WriteNode(aiNode* pNode)
|
||||||
PushTag();
|
PushTag();
|
||||||
mOutput << startstr << "<technique_common>" << endstr;
|
mOutput << startstr << "<technique_common>" << endstr;
|
||||||
PushTag();
|
PushTag();
|
||||||
mOutput << startstr << "<instance_material symbol=\"defaultMaterial\" target=\"#" << XMLEscape(materials[mesh->mMaterialIndex].name) << "\" />" << endstr;
|
mOutput << startstr << "<instance_material symbol=\"defaultMaterial\" target=\"#" << XMLEscape(materials[mesh->mMaterialIndex].name) << "\">" << endstr;
|
||||||
|
PushTag();
|
||||||
|
for( size_t a = 0; a < AI_MAX_NUMBER_OF_TEXTURECOORDS; ++a )
|
||||||
|
{
|
||||||
|
if( mesh->HasTextureCoords( a) )
|
||||||
|
// semantic as in <texture texcoord=...>
|
||||||
|
// input_semantic as in <input semantic=...>
|
||||||
|
// input_set as in <input set=...>
|
||||||
|
mOutput << startstr << "<bind_vertex_input semantic=\"CHANNEL" << a << "\" input_semantic=\"TEXCOORD\" input_set=\"" << a << "\"/>" << endstr;
|
||||||
|
}
|
||||||
|
PopTag();
|
||||||
|
mOutput << startstr << "</instance_material>" << endstr;
|
||||||
PopTag();
|
PopTag();
|
||||||
mOutput << startstr << "</technique_common>" << endstr;
|
mOutput << startstr << "</technique_common>" << endstr;
|
||||||
PopTag();
|
PopTag();
|
||||||
|
|
|
@ -309,12 +309,12 @@ void XFileExporter::WriteNode( aiNode* pNode)
|
||||||
|
|
||||||
WriteFrameTransform(m);
|
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]]);
|
WriteMesh(mScene->mMeshes[pNode->mMeshes[i]]);
|
||||||
|
|
||||||
// recursive call the Nodes
|
// recursive call the Nodes
|
||||||
for (size_t i = 0; i < pNode->mNumChildren; ++i)
|
for (size_t i = 0; i < pNode->mNumChildren; ++i)
|
||||||
WriteNode( mScene->mRootNode->mChildren[i]);
|
WriteNode(pNode->mChildren[i]);
|
||||||
|
|
||||||
PopTag();
|
PopTag();
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue