diff --git a/interface/src/Menu.cpp b/interface/src/Menu.cpp index afaec2305e..923b563af4 100644 --- a/interface/src/Menu.cpp +++ b/interface/src/Menu.cpp @@ -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());