Added parsing of Collada mesh names.

pull/78/head
Sherief Farouk 2013-08-15 00:12:58 -04:00
parent a6ddce7758
commit a540c6255c
1 changed files with 7 additions and 0 deletions

View File

@ -1492,6 +1492,13 @@ void ColladaParser::ReadGeometryLibrary()
// create a mesh and store it in the library under its ID // create a mesh and store it in the library under its ID
Mesh* mesh = new Mesh; Mesh* mesh = new Mesh;
mMeshLibrary[id] = mesh; mMeshLibrary[id] = mesh;
// read the mesh name if it exists
const int nameIndex = TestAttribute("name");
if(nameIndex != -1)
{
mesh->mName = mReader->getAttributeValue(nameIndex);
}
// read on from there // read on from there
ReadGeometry( mesh); ReadGeometry( mesh);