Преглед на файлове

Added parsing of Collada mesh names.

Sherief Farouk преди 12 години
родител
ревизия
a540c6255c
променени са 1 файла, в които са добавени 7 реда и са изтрити 0 реда
  1. 7 0
      code/ColladaParser.cpp

+ 7 - 0
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);