From 423fd4e8426c7aa7ec807d886f9699f1e93ed087 Mon Sep 17 00:00:00 2001 From: James Turner Date: Fri, 9 Sep 2022 12:17:11 +0100 Subject: [PATCH] Model XML: pass the model path to osgDB::Options To allow giving better error feedback in the AC3D loader, pass the file path explicitly as a plugin data string, so we can report it. --- simgear/scene/model/SGReaderWriterXML.cxx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/simgear/scene/model/SGReaderWriterXML.cxx b/simgear/scene/model/SGReaderWriterXML.cxx index af1e6f7b..e317aa63 100644 --- a/simgear/scene/model/SGReaderWriterXML.cxx +++ b/simgear/scene/model/SGReaderWriterXML.cxx @@ -592,6 +592,8 @@ sgLoad3DModel_internal(const SGPath& path, texturepath = texturepath.dir(); options->setDatabasePath(texturepath.utf8Str()); + options->setPluginStringData("filePath", modelpath.utf8Str()); + osgDB::ReaderWriter::ReadResult modelResult; modelResult = osgDB::readRefNodeFile(modelpath.utf8Str(), options.get());