X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=simgear%2Fscene%2Fmodel%2Fmodellib.cxx;h=4b457f5e48bc2aeece69d10e7e44acbfb07bd882;hb=d04cf4d8978866eb80a1639b6d4ddfe387338c77;hp=6a13c516fdfbe5a10a15f870665d823a6be70535;hpb=430c60ed1ac8d1c1ee79cdd45f6540d6dc8a5996;p=simgear.git diff --git a/simgear/scene/model/modellib.cxx b/simgear/scene/model/modellib.cxx index 6a13c516..4b457f5e 100644 --- a/simgear/scene/model/modellib.cxx +++ b/simgear/scene/model/modellib.cxx @@ -71,8 +71,12 @@ osg::Node* loadFile(const string& path, osgDB::ReaderWriter::Options* options) ref_ptr model = readRefNodeFile(path, options); if (!model) return 0; - if (boost::iends_with(path, ".ac")) - model = instantiateEffects(model.get(), options); + if (boost::iends_with(path, ".ac")) { + ref_ptr sgOptions; + if (options) + sgOptions = new SGReaderWriterXMLOptions(*options); + model = instantiateEffects(model.get(), sgOptions.get()); + } return model.release(); } }