fix the agent support for scripting models

This commit is contained in:
ZappoMan 2014-05-14 13:17:10 -07:00
parent 0a8dc78c96
commit fa20e8ff95

View file

@ -250,6 +250,12 @@ void Agent::run() {
_particleViewer.init();
_scriptEngine.getParticlesScriptingInterface()->setParticleTree(_particleViewer.getTree());
_scriptEngine.registerGlobalObject("ModelViewer", &_modelViewer);
JurisdictionListener* modelJL = _scriptEngine.getModelsScriptingInterface()->getJurisdictionListener();
_modelViewer.setJurisdictionListener(modelJL);
_modelViewer.init();
_scriptEngine.getModelsScriptingInterface()->setModelTree(_modelViewer.getTree());
_scriptEngine.setScriptContents(scriptContents);
_scriptEngine.run();
setFinished(true);