mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-06-22 05:09:13 +02:00
WIP
This commit is contained in:
parent
f109a86b23
commit
387e474889
2 changed files with 20 additions and 14 deletions
|
@ -510,16 +510,6 @@ void messageHandler(QtMsgType type, const QMessageLogContext& context, const QSt
|
||||||
OutputDebugStringA(logMessage.toLocal8Bit().constData());
|
OutputDebugStringA(logMessage.toLocal8Bit().constData());
|
||||||
OutputDebugStringA("\n");
|
OutputDebugStringA("\n");
|
||||||
#endif
|
#endif
|
||||||
auto avatarManager = DependencyManager::get<AvatarManager>();
|
|
||||||
auto myAvatar = avatarManager ? avatarManager->getMyAvatar() : nullptr;
|
|
||||||
|
|
||||||
if (myAvatar) {
|
|
||||||
QUuid fileLoggerSessionID = myAvatar->getSessionUUID();
|
|
||||||
if (!fileLoggerSessionID.isNull()) {
|
|
||||||
qApp->getLogger()->setSessionID(fileLoggerSessionID);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
qApp->getLogger()->addMessage(qPrintable(logMessage + "\n"));
|
qApp->getLogger()->addMessage(qPrintable(logMessage + "\n"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -798,10 +788,19 @@ Application::Application(int& argc, char** argv, QElapsedTimer& startupTimer, bo
|
||||||
installNativeEventFilter(&MyNativeEventFilter::getInstance());
|
installNativeEventFilter(&MyNativeEventFilter::getInstance());
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
_logger = new FileLogger(this); // After setting organization name in order to get correct directory
|
|
||||||
|
|
||||||
qInstallMessageHandler(messageHandler);
|
qInstallMessageHandler(messageHandler);
|
||||||
|
|
||||||
|
_logger = new FileLogger(this);
|
||||||
|
|
||||||
|
connect(getMyAvatar().get(), &AvatarData::sessionUUIDChanged, _logger, [this] {
|
||||||
|
auto myAvatar = getMyAvatar();
|
||||||
|
if (myAvatar) {
|
||||||
|
_logger->setSessionID(myAvatar->getSessionUUID());
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
QFontDatabase::addApplicationFont(PathUtils::resourcesPath() + "styles/Inconsolata.otf");
|
QFontDatabase::addApplicationFont(PathUtils::resourcesPath() + "styles/Inconsolata.otf");
|
||||||
_window->setWindowTitle("High Fidelity Interface");
|
_window->setWindowTitle("High Fidelity Interface");
|
||||||
|
|
||||||
|
@ -2102,6 +2101,7 @@ Application::~Application() {
|
||||||
_octreeProcessor.terminate();
|
_octreeProcessor.terminate();
|
||||||
_entityEditSender.terminate();
|
_entityEditSender.terminate();
|
||||||
|
|
||||||
|
disconnect(getMyAvatar().get(), &AvatarData::sessionUUIDChanged, _logger, nullptr);
|
||||||
|
|
||||||
DependencyManager::destroy<AvatarManager>();
|
DependencyManager::destroy<AvatarManager>();
|
||||||
DependencyManager::destroy<AnimationCache>();
|
DependencyManager::destroy<AnimationCache>();
|
||||||
|
|
|
@ -381,7 +381,7 @@ class AvatarData : public QObject, public SpatiallyNestable {
|
||||||
|
|
||||||
Q_PROPERTY(QStringList jointNames READ getJointNames)
|
Q_PROPERTY(QStringList jointNames READ getJointNames)
|
||||||
|
|
||||||
Q_PROPERTY(QUuid sessionUUID READ getSessionUUID)
|
Q_PROPERTY(QUuid sessionUUID READ getSessionUUID NOTIFY sessionUUIDChanged)
|
||||||
|
|
||||||
Q_PROPERTY(glm::mat4 sensorToWorldMatrix READ getSensorToWorldMatrix)
|
Q_PROPERTY(glm::mat4 sensorToWorldMatrix READ getSensorToWorldMatrix)
|
||||||
Q_PROPERTY(glm::mat4 controllerLeftHandMatrix READ getControllerLeftHandMatrix)
|
Q_PROPERTY(glm::mat4 controllerLeftHandMatrix READ getControllerLeftHandMatrix)
|
||||||
|
@ -667,13 +667,19 @@ public:
|
||||||
signals:
|
signals:
|
||||||
void displayNameChanged();
|
void displayNameChanged();
|
||||||
void lookAtSnappingChanged(bool enabled);
|
void lookAtSnappingChanged(bool enabled);
|
||||||
|
void sessionUUIDChanged();
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
void sendAvatarDataPacket();
|
void sendAvatarDataPacket();
|
||||||
void sendIdentityPacket();
|
void sendIdentityPacket();
|
||||||
|
|
||||||
void setJointMappingsFromNetworkReply();
|
void setJointMappingsFromNetworkReply();
|
||||||
void setSessionUUID(const QUuid& sessionUUID) { setID(sessionUUID); }
|
void setSessionUUID(const QUuid& sessionUUID) {
|
||||||
|
if (sessionUUID != getID()) {
|
||||||
|
setID(sessionUUID);
|
||||||
|
emit sessionUUIDChanged();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
virtual glm::quat getAbsoluteJointRotationInObjectFrame(int index) const override;
|
virtual glm::quat getAbsoluteJointRotationInObjectFrame(int index) const override;
|
||||||
virtual glm::vec3 getAbsoluteJointTranslationInObjectFrame(int index) const override;
|
virtual glm::vec3 getAbsoluteJointTranslationInObjectFrame(int index) const override;
|
||||||
|
|
Loading…
Reference in a new issue