mirror of
https://github.com/overte-org/overte.git
synced 2025-04-20 11:45:36 +02:00
fix the agent support for scripting models
This commit is contained in:
parent
0a8dc78c96
commit
fa20e8ff95
1 changed files with 6 additions and 0 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue