From: frohlich Date: Sun, 12 Apr 2009 09:46:36 +0000 (+0000) Subject: Put some annotations into the loaded models names. X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=c9d0eac739ba7a17ce04efae4f1eebc5116b468b;p=simgear.git Put some annotations into the loaded models names. Modified Files: simgear/scene/model/modellib.cxx --- diff --git a/simgear/scene/model/modellib.cxx b/simgear/scene/model/modellib.cxx index 5cb6965d..17524d6a 100644 --- a/simgear/scene/model/modellib.cxx +++ b/simgear/scene/model/modellib.cxx @@ -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);