Showing the changes to interface/src/Application.cpp (1 of 93 files). Show all
Unified · Split
| @@ -61,7 +61,7 @@ · 60 unmodified lines | |||
| 61 | #include <CursorManager.h> | 61 | #include <CursorManager.h> |
| 62 | #include <DebugDraw.h> | 62 | #include <DebugDraw.h> |
| 63 | #include <DeferredLightingEffect.h> | 63 | #include <DeferredLightingEffect.h> |
| 64 | #include <display-plugins/DisplayPlugin.h> | 64 | #include <EntityScriptClient.h> |
| 65 | #include <EntityScriptingInterface.h> | 65 | #include <EntityScriptingInterface.h> |
| 66 | #include <ErrorDialog.h> | 66 | #include <ErrorDialog.h> |
| 67 | #include <FileScriptingInterface.h> | 67 | #include <FileScriptingInterface.h> |
| @@ -173,6 +173,7 @@ · 105 unmodified lines | |||
| 173 | #include "FrameTimingsScriptingInterface.h" | 173 | #include "FrameTimingsScriptingInterface.h" |
| 174 | #include <GPUIdent.h> | 174 | #include <GPUIdent.h> |
| 175 | #include <gl/GLHelpers.h> | 175 | #include <gl/GLHelpers.h> |
| 176 | #include <EntityScriptClient.h> | ||
| 176 | 177 | ||
| 177 | // On Windows PC, NVidia Optimus laptop, we want to enable NVIDIA GPU | 178 | // On Windows PC, NVidia Optimus laptop, we want to enable NVIDIA GPU |
| 178 | // FIXME seems to be broken. | 179 | // FIXME seems to be broken. |
| @@ -458,7 +459,7 @@ bool setupEssentials(int& argc, char** argv) { · 279 unmodified lines | |||
| 458 | // Set dependencies | 459 | // Set dependencies |
| 459 | DependencyManager::set<AccountManager>(std::bind(&Application::getUserAgent, qApp)); | 460 | DependencyManager::set<AccountManager>(std::bind(&Application::getUserAgent, qApp)); |
| 460 | DependencyManager::set<StatTracker>(); | 461 | DependencyManager::set<StatTracker>(); |
| 461 | DependencyManager::set<ScriptEngines>(); | 462 | DependencyManager::set<ScriptEngines>(ScriptEngine::CLIENT_SCRIPT); |
| 462 | DependencyManager::set<Preferences>(); | 463 | DependencyManager::set<Preferences>(); |
| 463 | DependencyManager::set<recording::Deck>(); | 464 | DependencyManager::set<recording::Deck>(); |
| 464 | DependencyManager::set<recording::Recorder>(); | 465 | DependencyManager::set<recording::Recorder>(); |
| @@ -514,6 +515,7 @@ bool setupEssentials(int& argc, char** argv) { · 49 unmodified lines | |||
| 514 | DependencyManager::set<EntityTreeRenderer>(true, qApp, qApp); | 515 | DependencyManager::set<EntityTreeRenderer>(true, qApp, qApp); |
| 515 | DependencyManager::set<CompositorHelper>(); | 516 | DependencyManager::set<CompositorHelper>(); |
| 516 | DependencyManager::set<OffscreenQmlSurfaceCache>(); | 517 | DependencyManager::set<OffscreenQmlSurfaceCache>(); |
| 518 | DependencyManager::set<EntityScriptClient>(); | ||
| 517 | return previousSessionCrashed; | 519 | return previousSessionCrashed; |
| 518 | } | 520 | } |
| 519 | 521 | ||
| @@ -852,7 +854,7 @@ Application::Application(int& argc, char** argv, QElapsedTimer& startupTimer, bo · 332 unmodified lines | |||
| 852 | 854 | ||
| 853 | // tell the NodeList instance who to tell the domain server we care about | 855 | // tell the NodeList instance who to tell the domain server we care about |
| 854 | nodeList->addSetOfNodeTypesToNodeInterestSet(NodeSet() << NodeType::AudioMixer << NodeType::AvatarMixer | 856 | nodeList->addSetOfNodeTypesToNodeInterestSet(NodeSet() << NodeType::AudioMixer << NodeType::AvatarMixer |
| 855 | << NodeType::EntityServer << NodeType::AssetServer << NodeType::MessagesMixer); | 857 | << NodeType::EntityServer << NodeType::AssetServer << NodeType::MessagesMixer << NodeType::EntityScriptServer); |
| 856 | 858 | ||
| 857 | // connect to the packet sent signal of the _entityEditSender | 859 | // connect to the packet sent signal of the _entityEditSender |
| 858 | connect(&_entityEditSender, &EntityEditPacketSender::packetSent, this, &Application::packetSent); | 860 | connect(&_entityEditSender, &EntityEditPacketSender::packetSent, this, &Application::packetSent); |
| @@ -5494,6 +5496,9 @@ void Application::registerScriptEngineWithApplicationServices(ScriptEngine* scri · 4635 unmodified lines | |||
| 5494 | scriptEngine->registerGlobalObject("Controller", scriptingInterface.data()); | 5496 | scriptEngine->registerGlobalObject("Controller", scriptingInterface.data()); |
| 5495 | UserInputMapper::registerControllerTypes(scriptEngine); | 5497 | UserInputMapper::registerControllerTypes(scriptEngine); |
| 5496 | 5498 | ||
| 5499 | auto recordingInterface = DependencyManager::get<RecordingScriptingInterface>(); | ||
| 5500 | scriptEngine->registerGlobalObject("Recording", recordingInterface.data()); | ||
| 5501 | |||
| 5497 | // connect this script engines printedMessage signal to the global ScriptEngines these various messages | 5502 | // connect this script engines printedMessage signal to the global ScriptEngines these various messages |
| 5498 | connect(scriptEngine, &ScriptEngine::printedMessage, DependencyManager::get<ScriptEngines>().data(), &ScriptEngines::onPrintedMessage); | 5503 | connect(scriptEngine, &ScriptEngine::printedMessage, DependencyManager::get<ScriptEngines>().data(), &ScriptEngines::onPrintedMessage); |
| 5499 | connect(scriptEngine, &ScriptEngine::errorMessage, DependencyManager::get<ScriptEngines>().data(), &ScriptEngines::onErrorMessage); | 5504 | connect(scriptEngine, &ScriptEngine::errorMessage, DependencyManager::get<ScriptEngines>().data(), &ScriptEngines::onErrorMessage); |