mirror of
https://github.com/overte-org/overte.git
synced 2025-08-04 00:03:39 +02:00
Merge pull request #2901 from polac/19671_proposal
Initialise lisencing manager after we have enabled Visage.
This commit is contained in:
commit
5964cb9c96
1 changed files with 15 additions and 8 deletions
|
@ -41,14 +41,8 @@ Visage::Visage() :
|
|||
_headOrigin(DEFAULT_HEAD_ORIGIN) {
|
||||
|
||||
#ifdef HAVE_VISAGE
|
||||
#ifdef WIN32
|
||||
QByteArray licensePath = Application::resourcesPath().toLatin1() + "visage";
|
||||
#else
|
||||
QByteArray licensePath = Application::resourcesPath().toLatin1() + "visage/license.vlc";
|
||||
#endif
|
||||
initializeLicenseManager(licensePath.data());
|
||||
_tracker = new VisageTracker2(Application::resourcesPath().toLatin1() + "visage/tracker.cfg");
|
||||
_data = new FaceData();
|
||||
_tracker = NULL;
|
||||
_data = NULL;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -179,6 +173,19 @@ void Visage::setEnabled(bool enabled) {
|
|||
return;
|
||||
}
|
||||
if ((_enabled = enabled)) {
|
||||
if(_tracker == NULL && _data == NULL){
|
||||
|
||||
#ifdef WIN32
|
||||
QByteArray licensePath = Application::resourcesPath().toLatin1() + "visage";
|
||||
#else
|
||||
QByteArray licensePath = Application::resourcesPath().toLatin1() + "visage/license.vlc";
|
||||
#endif
|
||||
|
||||
initializeLicenseManager(licensePath.data());
|
||||
_tracker = new VisageTracker2(Application::resourcesPath().toLatin1() + "visage/tracker.cfg");
|
||||
_data = new FaceData();
|
||||
}
|
||||
|
||||
_tracker->trackFromCam();
|
||||
} else {
|
||||
_tracker->stop();
|
||||
|
|
Loading…
Reference in a new issue