]> git.mxchange.org Git - simgear.git/blobdiff - simgear/scene/model/modellib.cxx
Add writeLocalData functions for internal scenegraph classes
[simgear.git] / simgear / scene / model / modellib.cxx
index 5cb6965d08df3dac6e8179f2641f4308e9aadc17..a3a779fdff63c03c1e2291bc2773dc4d70d70052 100644 (file)
 #include "SGReaderWriterXML.hxx"
 #include "SGReaderWriterXMLOptions.hxx"
 
-//#include "model.hxx"
 #include "modellib.hxx"
 
+#include <simgear/math/SGMath.hxx>
+
 
 using namespace simgear;
 
@@ -67,8 +68,8 @@ SGModelLib::loadModel(const string &path,
     opt->setPropRoot(prop_root);
     opt->setModelData(data);
     osg::Node *n = readNodeFile(path, opt.get());
-    if(data)
-        data->modelLoaded(path, data->getProperties(), n);
+    if (n && 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);