mirror of
https://github.com/overte-org/overte.git
synced 2025-04-23 01:13:32 +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());
|
||||
|
||||
|
||||
if (avatarUsernameEdit->text() != avatarUsername) {
|
||||
// there has been a username change - set the new UUID on the avatar instance
|
||||
applicationInstance->getAvatar()->setUsername(avatarUsernameEdit->text());
|
||||
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
||||
QUrl avatarVoxelURL(avatarURL->text());
|
||||
applicationInstance->getAvatar()->getVoxels()->setVoxelURL(avatarVoxelURL);
|
||||
|
||||
if (faceModelURL.toString() != faceURLString) {
|
||||
applicationInstance->getAvatar()->getHead().getBlendFace().setModelURL(faceModelURL);
|
||||
|
||||
|
@ -827,6 +826,11 @@ void Menu::editPreferences() {
|
|||
faceModelURL.toString().toLocal8Bit().constData());
|
||||
}
|
||||
|
||||
QUrl avatarVoxelURL(avatarURL->text());
|
||||
applicationInstance->getAvatar()->getVoxels()->setVoxelURL(avatarVoxelURL);
|
||||
|
||||
|
||||
|
||||
Avatar::sendAvatarURLsMessage(avatarVoxelURL, faceModelURL);
|
||||
|
||||
applicationInstance->getAvatar()->getHead().setPupilDilation(pupilDilation->value() / (float)pupilDilation->maximum());
|
||||
|
|
Loading…
Reference in a new issue