Should make the Nasal code for some xml models work again.
Modified Files:
simgear/scene/model/SGPagedLOD.cxx
simgear/scene/model/SGReaderWriterXML.cxx
simgear/scene/model/modellib.cxx
simgear/scene/model/modellib.hxx
{
osg::ref_ptr<SGModelData> d = opts->getModelData();
if(d.valid())
- d->modelLoaded(getFileName(getNumChildren()-1), opts->getPropRoot(),
- this);
+ d->modelLoaded(getFileName(getNumChildren()-1),
+ d->getConfigProperties(), this);
}
return true;
}
}
if (data) {
+ data->setConfigProperties(props);
options->setModelData(data);
}
opt->setModelData(data);
osg::Node *n = readNodeFile(path, opt.get());
if(data)
- data->modelLoaded(path, prop_root, n);
+ data->modelLoaded(path, data->getConfigProperties(), n);
if (n && n->getName().empty())
n->setName("Direct loaded model \"" + path + "\"");
return n;
virtual ~SGModelData() {}
virtual void modelLoaded(const string& path, SGPropertyNode *prop,
osg::Node* branch) = 0;
+ void setConfigProperties(SGPropertyNode *configProperties)
+ { _configProperties = configProperties; }
+ SGPropertyNode *getConfigProperties()
+ { return _configProperties; }
+
+private:
+ SGSharedPtr<SGPropertyNode> _configProperties;
};
}