]> 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 17524d6a0efb596978a62960c6b06a4c73d84bc9..a3a779fdff63c03c1e2291bc2773dc4d70d70052 100644 (file)
@@ -34,6 +34,8 @@
 
 #include "modellib.hxx"
 
+#include <simgear/math/SGMath.hxx>
+
 
 using namespace simgear;
 
@@ -66,9 +68,7 @@ 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->getName().empty())
+    if (n && n->getName().empty())
         n->setName("Direct loaded model \"" + path + "\"");
     return n;