]> git.mxchange.org Git - simgear.git/commitdiff
Put some annotations into the loaded models names.
authorfrohlich <frohlich>
Sun, 12 Apr 2009 09:46:36 +0000 (09:46 +0000)
committerTim Moore <timoore@redhat.com>
Wed, 15 Apr 2009 21:03:07 +0000 (23:03 +0200)
Modified Files:
simgear/scene/model/modellib.cxx

simgear/scene/model/modellib.cxx

index 5cb6965d08df3dac6e8179f2641f4308e9aadc17..17524d6a0efb596978a62960c6b06a4c73d84bc9 100644 (file)
@@ -32,7 +32,6 @@
 #include "SGReaderWriterXML.hxx"
 #include "SGReaderWriterXMLOptions.hxx"
 
-//#include "model.hxx"
 #include "modellib.hxx"
 
 
@@ -69,6 +68,8 @@ SGModelLib::loadModel(const string &path,
     osg::Node *n = readNodeFile(path, opt.get());
     if(data)
         data->modelLoaded(path, data->getProperties(), n);
+    if (n->getName().empty())
+        n->setName("Direct loaded model \"" + path + "\"");
     return n;
 
 }
@@ -90,6 +91,7 @@ SGModelLib::loadPagedModel(const string &path,
                            SGModelData *data)
 {
     SGPagedLOD *plod = new SGPagedLOD;
+    plod->setName("Paged LOD for \"" + path + "\"");
     plod->setFileName(0, path);
     plod->setRange(0, 0.0, 50.0*SG_NM_TO_METER);