From d4c52b599dbd2b458709f05df2f7616a4025f59a Mon Sep 17 00:00:00 2001 From: frohlich Date: Sun, 7 Jun 2009 11:30:12 +0000 Subject: [PATCH] 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 --- simgear/scene/model/SGPagedLOD.cxx | 2 +- simgear/scene/model/modellib.cxx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/simgear/scene/model/SGPagedLOD.cxx b/simgear/scene/model/SGPagedLOD.cxx index 96a0656d..545aadb7 100644 --- a/simgear/scene/model/SGPagedLOD.cxx +++ b/simgear/scene/model/SGPagedLOD.cxx @@ -56,7 +56,7 @@ bool SGPagedLOD::addChild(osg::Node *child) { osg::ref_ptr d = opts->getModelData(); if(d.valid()) - d->modelLoaded(getFileName(getNumChildren()-1), 0, + d->modelLoaded(getFileName(getNumChildren()-1), opts->getPropRoot(), this); } return true; diff --git a/simgear/scene/model/modellib.cxx b/simgear/scene/model/modellib.cxx index 95644351..3fbced89 100644 --- a/simgear/scene/model/modellib.cxx +++ b/simgear/scene/model/modellib.cxx @@ -67,7 +67,7 @@ SGModelLib::loadModel(const string &path, opt->setModelData(data); osg::Node *n = readNodeFile(path, opt.get()); if(data) - data->modelLoaded(path, 0, n); + data->modelLoaded(path, prop_root, n); if (n && n->getName().empty()) n->setName("Direct loaded model \"" + path + "\""); return n; -- 2.39.5