mirror of
https://github.com/overte-org/overte.git
synced 2025-04-19 15:43:50 +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("\n");
|
||||
#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"));
|
||||
}
|
||||
}
|
||||
|
@ -798,10 +788,19 @@ Application::Application(int& argc, char** argv, QElapsedTimer& startupTimer, bo
|
|||
installNativeEventFilter(&MyNativeEventFilter::getInstance());
|
||||
#endif
|
||||
|
||||
_logger = new FileLogger(this); // After setting organization name in order to get correct directory
|
||||
|
||||
|
||||
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");
|
||||
_window->setWindowTitle("High Fidelity Interface");
|
||||
|
||||
|
@ -2102,6 +2101,7 @@ Application::~Application() {
|
|||
_octreeProcessor.terminate();
|
||||
_entityEditSender.terminate();
|
||||
|
||||
disconnect(getMyAvatar().get(), &AvatarData::sessionUUIDChanged, _logger, nullptr);
|
||||
|
||||
DependencyManager::destroy<AvatarManager>();
|
||||
DependencyManager::destroy<AnimationCache>();
|
||||
|
|
|
@ -381,7 +381,7 @@ class AvatarData : public QObject, public SpatiallyNestable {
|
|||
|
||||
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 controllerLeftHandMatrix READ getControllerLeftHandMatrix)
|
||||
|
@ -667,13 +667,19 @@ public:
|
|||
signals:
|
||||
void displayNameChanged();
|
||||
void lookAtSnappingChanged(bool enabled);
|
||||
void sessionUUIDChanged();
|
||||
|
||||
public slots:
|
||||
void sendAvatarDataPacket();
|
||||
void sendIdentityPacket();
|
||||
|
||||
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::vec3 getAbsoluteJointTranslationInObjectFrame(int index) const override;
|
||||
|
|
Loading…
Reference in a new issue