diff --git a/interface/src/Application.cpp b/interface/src/Application.cpp index 4a0bce5103..7efa17cb8c 100644 --- a/interface/src/Application.cpp +++ b/interface/src/Application.cpp @@ -867,7 +867,11 @@ bool setupEssentials(int& argc, char** argv, bool runningMarkerExisted) { DependencyManager::set(); DependencyManager::set(); DependencyManager::set(); + +#ifdef HAVE_DDE DependencyManager::set(); +#endif + DependencyManager::set(); DependencyManager::set(); DependencyManager::set(); @@ -3324,7 +3328,9 @@ void Application::onDesktopRootContextCreated(QQmlContext* surfaceContext) { surfaceContext->setContextProperty("AccountServices", AccountServicesScriptingInterface::getInstance()); surfaceContext->setContextProperty("DialogsManager", _dialogsManagerScriptingInterface); +#ifdef HAVE_DDE surfaceContext->setContextProperty("FaceTracker", DependencyManager::get().data()); +#endif surfaceContext->setContextProperty("AvatarManager", DependencyManager::get().data()); surfaceContext->setContextProperty("LODManager", DependencyManager::get().data()); surfaceContext->setContextProperty("HMD", DependencyManager::get().data()); @@ -5176,7 +5182,11 @@ ivec2 Application::getMouse() const { FaceTracker* Application::getActiveFaceTracker() { auto dde = DependencyManager::get(); - return dde->isActive() ? static_cast(dde.data()) : nullptr; + if(dde){ + return dde->isActive() ? static_cast(dde.data()) : nullptr; + }else{ + return nullptr; + } } FaceTracker* Application::getSelectedFaceTracker() { @@ -7010,7 +7020,10 @@ void Application::copyDisplayViewFrustum(ViewFrustum& viewOut) const { // feature. However, we still use this to reset face trackers, eye trackers, audio and to optionally re-load the avatar // rig and animations from scratch. void Application::resetSensors(bool andReload) { +#ifdef HAVE_DDE DependencyManager::get()->reset(); +#endif + DependencyManager::get()->reset(); _overlayConductor.centerUI(); getActiveDisplayPlugin()->resetSensors(); @@ -7402,8 +7415,10 @@ void Application::registerScriptEngineWithApplicationServices(ScriptEnginePointe scriptEngine->registerGlobalObject("AccountServices", AccountServicesScriptingInterface::getInstance()); qScriptRegisterMetaType(scriptEngine.data(), DownloadInfoResultToScriptValue, DownloadInfoResultFromScriptValue); +#ifdef HAVE_DDE scriptEngine->registerGlobalObject("FaceTracker", DependencyManager::get().data()); - +#endif + scriptEngine->registerGlobalObject("AvatarManager", DependencyManager::get().data()); scriptEngine->registerGlobalObject("LODManager", DependencyManager::get().data()); diff --git a/interface/src/devices/DdeFaceTracker.h b/interface/src/devices/DdeFaceTracker.h index 0ad8d85c62..dc451134f0 100644 --- a/interface/src/devices/DdeFaceTracker.h +++ b/interface/src/devices/DdeFaceTracker.h @@ -14,8 +14,9 @@ #include +//Disabling dde due to random crashes with closing the socket on macos. all the accompanying code is wrapped with the ifdef HAVE_DDE. uncomment the define below to enable #if defined(Q_OS_WIN) || defined(Q_OS_OSX) - #define HAVE_DDE + //#define HAVE_DDE #endif #include