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:
parent
ec88373eb7
commit
d4c52b599d
@ -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;
|
||||||
|
@ -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;
|
||||||
|
Loading…
Reference in New Issue
Block a user