From 2026c665b2ee01925badcee1d290c4cb455c43c2 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Cl=C3=A9ment=20de=20l=27Hamaide?= Date: Sun, 21 Sep 2014 22:05:45 +0200 Subject: [PATCH] Improve the tag feature Do not load the if tag is found as child. Instead the load is triggered later by FlightGear --- simgear/scene/model/SGReaderWriterXML.cxx | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/simgear/scene/model/SGReaderWriterXML.cxx b/simgear/scene/model/SGReaderWriterXML.cxx index 83d6d36d..744c5dfd 100644 --- a/simgear/scene/model/SGReaderWriterXML.cxx +++ b/simgear/scene/model/SGReaderWriterXML.cxx @@ -409,6 +409,15 @@ sgLoad3DModel_internal(const SGPath& path, continue; } + if(sub_props->hasChild("usage")){ /* We don't want load this file and its content now */ + bool isInterior = (std::string(sub_props->getStringValue("usage")) == "interior"); + bool isAI = (std::string(prop_root->getStringValue("type")) == "AI"); + if(isInterior && isAI){ + props->addChild("interior-path")->setStringValue(submodelPath.str()); + continue; + } + } + try { submodel = sgLoad3DModel_internal(submodelPath, options.get(), sub_props->getNode("overlay")); -- 2.39.5