Showing the changes to interface/src/Application.cpp (1 of 22 files). Show all
Unified · Split
| @@ -535,6 +535,7 @@ bool setupEssentials(int& argc, char** argv) { · 534 unmodified lines | ||
| 535 | 535 | DependencyManager::set<OctreeStatsProvider>(nullptr, qApp->getOcteeSceneStats()); |
| 536 | 536 | DependencyManager::set<AvatarBookmarks>(); |
| 537 | 537 | DependencyManager::set<LocationBookmarks>(); |
| 538 | + DependencyManager::set<Snapshot>(); | |
| 538 | 539 | |
| 539 | 540 | return previousSessionCrashed; |
| 540 | 541 | } |
| @@ -2052,6 +2053,7 @@ void Application::initializeUi() { · 1511 unmodified lines | ||
| 2052 | 2053 | rootContext->setContextProperty("Scene", DependencyManager::get<SceneScriptingInterface>().data()); |
| 2053 | 2054 | rootContext->setContextProperty("Render", _renderEngine->getConfiguration().get()); |
| 2054 | 2055 | rootContext->setContextProperty("Reticle", getApplicationCompositor().getReticleInterface()); |
| 2056 | + rootContext->setContextProperty("Snapshot", DependencyManager::get<Snapshot>().data()); | |
| 2055 | 2057 | |
| 2056 | 2058 | rootContext->setContextProperty("ApplicationCompositor", &getApplicationCompositor()); |
| 2057 | 2059 | |
| @@ -5517,6 +5519,7 @@ void Application::registerScriptEngineWithApplicationServices(ScriptEngine* scri · 3459 unmodified lines | ||
| 5517 | 5519 | scriptEngine->registerGlobalObject("Menu", MenuScriptingInterface::getInstance()); |
| 5518 | 5520 | scriptEngine->registerGlobalObject("Stats", Stats::getInstance()); |
| 5519 | 5521 | scriptEngine->registerGlobalObject("Settings", SettingsScriptingInterface::getInstance()); |
| 5522 | + scriptEngine->registerGlobalObject("Snapshot", DependencyManager::get<Snapshot>().data()); | |
| 5520 | 5523 | scriptEngine->registerGlobalObject("AudioDevice", AudioDeviceScriptingInterface::getInstance()); |
| 5521 | 5524 | scriptEngine->registerGlobalObject("AudioStats", DependencyManager::get<AudioClient>()->getStats().data()); |
| 5522 | 5525 | scriptEngine->registerGlobalObject("AudioScope", DependencyManager::get<AudioScope>().data()); |
| @@ -6461,7 +6464,7 @@ void Application::takeSnapshot(bool notify, bool includeAnimated, float aspectRa · 938 unmodified lines | ||
| 6461 | 6464 | // Get a screenshot and save it |
| 6462 | 6465 | QString path = Snapshot::saveSnapshot(getActiveDisplayPlugin()->getScreenshot(aspectRatio)); |
| 6463 | 6466 | // If we're not doing an animated snapshot as well... |
| 6464 | − if (!includeAnimated || !(SnapshotAnimated::alsoTakeAnimatedSnapshot.get())) { | |
| 6467 | + if (!includeAnimated) { | |
| 6465 | 6468 | // Tell the dependency manager that the capture of the still snapshot has taken place. |
| 6466 | 6469 | emit DependencyManager::get<WindowScriptingInterface>()->stillSnapshotTaken(path, notify); |
| 6467 | 6470 | } else { |