History

Merge pull request #10327 from jherico/face_tracker_refactor

Remove Faceshift

Brad Davis committed 9 years ago

Commit 40e4e2f2 parents 9fab66b 2b43a1931 files · +144 −676Browse files

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

Unified · Split

interface/src/Application.cpp+3−24
@@ -128,6 +128,7 @@ · 127 unmodified lines
128128 #include <QmlWebWindowClass.h>
129129 #include <Preferences.h>
130130 #include <display-plugins/CompositorHelper.h>
131+#include <trackers/EyeTracker.h>
131132
132133
133134 #include "AudioClient.h"
@@ -136,8 +137,6 @@ · 2 unmodified lines
136137 #include "avatar/ScriptAvatar.h"
137138 #include "CrashHandler.h"
138139 #include "devices/DdeFaceTracker.h"
139−#include "devices/EyeTracker.h"
140−#include "devices/Faceshift.h"
141140 #include "devices/Leapmotion.h"
142141 #include "DiscoverabilityManager.h"
143142 #include "GLCanvas.h"
@@ -480,7 +479,6 @@ bool setupEssentials(int& argc, char** argv) { · 336 unmodified lines
480479 DependencyManager::set<ModelCache>();
481480 DependencyManager::set<ScriptCache>();
482481 DependencyManager::set<SoundCache>();
483− DependencyManager::set<Faceshift>();
484482 DependencyManager::set<DdeFaceTracker>();
485483 DependencyManager::set<EyeTracker>();
486484 DependencyManager::set<AudioClient>();
@@ -1210,10 +1208,6 @@ Application::Application(int& argc, char** argv, QElapsedTimer& startupTimer, bo · 723 unmodified lines
12101208
12111209 this->installEventFilter(this);
12121210
1213− // initialize our face trackers after loading the menu settings
1214− auto faceshiftTracker = DependencyManager::get<Faceshift>();
1215− faceshiftTracker->init();
1216− connect(faceshiftTracker.data(), &FaceTracker::muteToggled, this, &Application::faceTrackerMuteToggled);
12171211 #ifdef HAVE_DDE
12181212 auto ddeTracker = DependencyManager::get<DdeFaceTracker>();
12191213 ddeTracker->init();
@@ -3626,20 +3620,13 @@ ivec2 Application::getMouse() const { · 2406 unmodified lines
36263620 }
36273621
36283622 FaceTracker* Application::getActiveFaceTracker() {
3629− auto faceshift = DependencyManager::get<Faceshift>();
36303623 auto dde = DependencyManager::get<DdeFaceTracker>();
36313624
3632− return (dde->isActive() ? static_cast<FaceTracker*>(dde.data()) :
3633− (faceshift->isActive() ? static_cast<FaceTracker*>(faceshift.data()) : nullptr));
3625+ return dde->isActive() ? static_cast<FaceTracker*>(dde.data()) : nullptr;
36343626 }
36353627
36363628 FaceTracker* Application::getSelectedFaceTracker() {
36373629 FaceTracker* faceTracker = nullptr;
3638−#ifdef HAVE_FACESHIFT
3639− if (Menu::getInstance()->isOptionChecked(MenuOption::Faceshift)) {
3640− faceTracker = DependencyManager::get<Faceshift>().data();
3641− }
3642−#endif
36433630 #ifdef HAVE_DDE
36443631 if (Menu::getInstance()->isOptionChecked(MenuOption::UseCamera)) {
36453632 faceTracker = DependencyManager::get<DdeFaceTracker>().data();
@@ -3649,15 +3636,8 @@ FaceTracker* Application::getSelectedFaceTracker() { · 3 unmodified lines
36493636 }
36503637
36513638 void Application::setActiveFaceTracker() const {
3652−#if defined(HAVE_FACESHIFT) || defined(HAVE_DDE)
3653− bool isMuted = Menu::getInstance()->isOptionChecked(MenuOption::MuteFaceTracking);
3654−#endif
3655−#ifdef HAVE_FACESHIFT
3656− auto faceshiftTracker = DependencyManager::get<Faceshift>();
3657− faceshiftTracker->setIsMuted(isMuted);
3658− faceshiftTracker->setEnabled(Menu::getInstance()->isOptionChecked(MenuOption::Faceshift) && !isMuted);
3659−#endif
36603639 #ifdef HAVE_DDE
3640+ bool isMuted = Menu::getInstance()->isOptionChecked(MenuOption::MuteFaceTracking);
36613641 bool isUsingDDE = Menu::getInstance()->isOptionChecked(MenuOption::UseCamera);
36623642 Menu::getInstance()->getActionForOption(MenuOption::BinaryEyelidControl)->setVisible(isUsingDDE);
36633643 Menu::getInstance()->getActionForOption(MenuOption::CoupleEyelids)->setVisible(isUsingDDE);
@@ -5133,7 +5113,6 @@ void Application::displaySide(RenderArgs* renderArgs, Camera& theCamera, bool se · 1469 unmodified lines
51335113 }
51345114
51355115 void Application::resetSensors(bool andReload) {
5136− DependencyManager::get<Faceshift>()->reset();
51375116 DependencyManager::get<DdeFaceTracker>()->reset();
51385117 DependencyManager::get<EyeTracker>()->reset();
51395118 getActiveDisplayPlugin()->resetSensors();