mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 22:28:37 +02:00
clear the face model URL if the username is changed in preferences
This commit is contained in:
parent
4b62026c25
commit
26d5e2cfec
1 changed files with 8 additions and 4 deletions
|
@ -806,19 +806,18 @@ void Menu::editPreferences() {
|
||||||
|
|
||||||
QUrl faceModelURL(faceURLEdit->text());
|
QUrl faceModelURL(faceURLEdit->text());
|
||||||
|
|
||||||
|
|
||||||
if (avatarUsernameEdit->text() != avatarUsername) {
|
if (avatarUsernameEdit->text() != avatarUsername) {
|
||||||
// there has been a username change - set the new UUID on the avatar instance
|
// there has been a username change - set the new UUID on the avatar instance
|
||||||
applicationInstance->getAvatar()->setUsername(avatarUsernameEdit->text());
|
applicationInstance->getAvatar()->setUsername(avatarUsernameEdit->text());
|
||||||
|
|
||||||
if (faceModelURL.toString() == faceURLString) {
|
if (faceModelURL.toString() == faceURLString) {
|
||||||
// if there was no change to the face model URL then ask the data-server for what it is
|
// if there was no change to the face model URL then clear it and ask the data-server for what it is
|
||||||
|
applicationInstance->getAvatar()->getHead().getBlendFace().setModelURL(QUrl());
|
||||||
DataServerClient::getClientValueForKey(DataServerKey::FaceMeshURL);
|
DataServerClient::getClientValueForKey(DataServerKey::FaceMeshURL);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
QUrl avatarVoxelURL(avatarURL->text());
|
|
||||||
applicationInstance->getAvatar()->getVoxels()->setVoxelURL(avatarVoxelURL);
|
|
||||||
|
|
||||||
if (faceModelURL.toString() != faceURLString) {
|
if (faceModelURL.toString() != faceURLString) {
|
||||||
applicationInstance->getAvatar()->getHead().getBlendFace().setModelURL(faceModelURL);
|
applicationInstance->getAvatar()->getHead().getBlendFace().setModelURL(faceModelURL);
|
||||||
|
|
||||||
|
@ -827,6 +826,11 @@ void Menu::editPreferences() {
|
||||||
faceModelURL.toString().toLocal8Bit().constData());
|
faceModelURL.toString().toLocal8Bit().constData());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QUrl avatarVoxelURL(avatarURL->text());
|
||||||
|
applicationInstance->getAvatar()->getVoxels()->setVoxelURL(avatarVoxelURL);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Avatar::sendAvatarURLsMessage(avatarVoxelURL, faceModelURL);
|
Avatar::sendAvatarURLsMessage(avatarVoxelURL, faceModelURL);
|
||||||
|
|
||||||
applicationInstance->getAvatar()->getHead().setPupilDilation(pupilDilation->value() / (float)pupilDilation->maximum());
|
applicationInstance->getAvatar()->getHead().setPupilDilation(pupilDilation->value() / (float)pupilDilation->maximum());
|
||||||
|
|
Loading…
Reference in a new issue