Provide something more sensible for the properties root

for the modelLoaded call. MAy be this needs to be revisited, but in any
case better than constant zero.

Modified Files:
 	simgear/scene/model/SGPagedLOD.cxx
	simgear/scene/model/modellib.cxx
This commit is contained in:
frohlich 2009-06-07 11:30:12 +00:00 committed by Tim Moore
parent ec88373eb7
commit d4c52b599d
2 changed files with 2 additions and 2 deletions

View File

@ -56,7 +56,7 @@ bool SGPagedLOD::addChild(osg::Node *child)
{ {
osg::ref_ptr<SGModelData> d = opts->getModelData(); osg::ref_ptr<SGModelData> d = opts->getModelData();
if(d.valid()) if(d.valid())
d->modelLoaded(getFileName(getNumChildren()-1), 0, d->modelLoaded(getFileName(getNumChildren()-1), opts->getPropRoot(),
this); this);
} }
return true; return true;

View File

@ -67,7 +67,7 @@ SGModelLib::loadModel(const string &path,
opt->setModelData(data); opt->setModelData(data);
osg::Node *n = readNodeFile(path, opt.get()); osg::Node *n = readNodeFile(path, opt.get());
if(data) if(data)
data->modelLoaded(path, 0, n); data->modelLoaded(path, prop_root, n);
if (n && n->getName().empty()) if (n && n->getName().empty())
n->setName("Direct loaded model \"" + path + "\""); n->setName("Direct loaded model \"" + path + "\"");
return n; return n;