History

first cut at client scripts working

ZappoMan committed 12 years ago

Commit dacaade1 parent c2d5acc3 files · +43 −5Browse files

Showing the changes to interface/src/Application.cpp (1 of 3 files). Show all

Unified · Split

interface/src/Application.cpp+12−4
@@ -4426,14 +4426,22 @@ void Application::loadScript() { · 4425 unmodified lines
4426 // start the script on a new thread...4426 // start the script on a new thread...
4427 _scriptEngine = new ScriptEngine(script);4427 _scriptEngine = new ScriptEngine(script);
4428 4428
4429 // setup the packet senders and jurisdiction listeners of the script engine's scripting interfaces so
4430 // we can use the same ones from the application.
4431 _scriptEngine->getVoxelScriptingInterface()->setPacketSender(&_voxelEditSender);
4432 _scriptEngine->getParticleScriptingInterface()->setPacketSender(&_particleEditSender);
4433
4434 //_scriptEngine->getVoxelScriptingInterface()->setJurisdictionListener();
4435 //_scriptEngine->getParticleScriptingInterface()->setJurisdictionListener();
4436
4429 QThread* workerThread = new QThread(this);4437 QThread* workerThread = new QThread(this);
4430 4438
4431 connect(workerThread, SIGNAL(started()), _scriptEngine, SLOT(run()));4439 connect(workerThread, SIGNAL(started()), _scriptEngine, SLOT(run()));
4432 4440
4433 connect(_scriptEngine, SIGNAL(finished()), this, SLOT(assignmentCompleted()));4441 //connect(_scriptEngine, SIGNAL(finished()), this, SLOT(assignmentCompleted()));
4434 connect(_scriptEngine, SIGNAL(finished()), workerThread, SLOT(quit()));4442 //connect(_scriptEngine, SIGNAL(finished()), workerThread, SLOT(quit()));
4435 connect(_scriptEngine, SIGNAL(finished()), _scriptEngine, SLOT(deleteLater()));4443 //connect(_scriptEngine, SIGNAL(finished()), _scriptEngine, SLOT(deleteLater()));
4436 connect(_scriptEngine, SIGNAL(finished()), workerThread, SLOT(deleteLater()));4444 //connect(_scriptEngine, SIGNAL(finished()), workerThread, SLOT(deleteLater()));
4437 4445
4438 _scriptEngine->moveToThread(workerThread);4446 _scriptEngine->moveToThread(workerThread);
4439 4447

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t