From a540c6255c55fd2192367f9408d597d1b0a86dc2 Mon Sep 17 00:00:00 2001 From: Sherief Farouk Date: Thu, 15 Aug 2013 00:12:58 -0400 Subject: [PATCH] Added parsing of Collada mesh names. --- code/ColladaParser.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/code/ColladaParser.cpp b/code/ColladaParser.cpp index 442896a39..767347695 100644 --- a/code/ColladaParser.cpp +++ b/code/ColladaParser.cpp @@ -1492,6 +1492,13 @@ void ColladaParser::ReadGeometryLibrary() // create a mesh and store it in the library under its ID Mesh* mesh = new 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 ReadGeometry( mesh);