#include <Main/globals.hxx>
#include <Scenery/scenery.hxx>
-#include <Scripting/NasalSys.hxx>
#include "AIBase.hxx"
#include "AIModelData.hxx"
#include <sys/types.h>
#include <sys/stat.h>
#include <fstream>
+#include <sstream>
#include <plib/ul.h>
// destructor the <unload> script. The latter happens when the model branch
// is removed from the scene graph.
+unsigned int FGNasalModelData::_module_id = 0;
+
void FGNasalModelData::modelLoaded(const string& path, SGPropertyNode *prop,
osg::Node *)
{
if(!load && !_unload)
return;
- _module = path;
- if(_props)
- _module += ':' + _props->getPath();
+ std::stringstream m;
+ m << "__model" << _module_id++;
+ _module = m.str();
+
const char *s = load ? load->getStringValue() : "";
naRef arg[2];
void modelLoaded(const string& path, SGPropertyNode *prop, osg::Node *);
private:
+ static unsigned int _module_id;
string _module;
SGPropertyNode_ptr _root;
SGConstPropertyNode_ptr _unload;