Showing the changes to interface/src/Menu.cpp (1 of 1 file). Show all
Unified · Split
| @@ -806,19 +806,18 @@ void Menu::editPreferences() { · 805 unmodified lines | |||
| 806 | 806 | ||
| 807 | QUrl faceModelURL(faceURLEdit->text()); | 807 | QUrl faceModelURL(faceURLEdit->text()); |
| 808 | 808 | ||
| 809 | |||
| 809 | if (avatarUsernameEdit->text() != avatarUsername) { | 810 | if (avatarUsernameEdit->text() != avatarUsername) { |
| 810 | // there has been a username change - set the new UUID on the avatar instance | 811 | // there has been a username change - set the new UUID on the avatar instance |
| 811 | applicationInstance->getAvatar()->setUsername(avatarUsernameEdit->text()); | 812 | applicationInstance->getAvatar()->setUsername(avatarUsernameEdit->text()); |
| 812 | 813 | ||
| 813 | if (faceModelURL.toString() == faceURLString) { | 814 | if (faceModelURL.toString() == faceURLString) { |
| 814 | // if there was no change to the face model URL then ask the data-server for what it is | 815 | // if there was no change to the face model URL then clear it and ask the data-server for what it is |
| 816 | applicationInstance->getAvatar()->getHead().getBlendFace().setModelURL(QUrl()); | ||
| 815 | DataServerClient::getClientValueForKey(DataServerKey::FaceMeshURL); | 817 | DataServerClient::getClientValueForKey(DataServerKey::FaceMeshURL); |
| 816 | } | 818 | } |
| 817 | } | 819 | } |
| 818 | 820 | ||
| 819 | QUrl avatarVoxelURL(avatarURL->text()); | ||
| 820 | applicationInstance->getAvatar()->getVoxels()->setVoxelURL(avatarVoxelURL); | ||
| 821 | |||
| 822 | if (faceModelURL.toString() != faceURLString) { | 821 | if (faceModelURL.toString() != faceURLString) { |
| 823 | applicationInstance->getAvatar()->getHead().getBlendFace().setModelURL(faceModelURL); | 822 | applicationInstance->getAvatar()->getHead().getBlendFace().setModelURL(faceModelURL); |
| 824 | 823 | ||
| @@ -827,6 +826,11 @@ void Menu::editPreferences() { · 2 unmodified lines | |||
| 827 | faceModelURL.toString().toLocal8Bit().constData()); | 826 | faceModelURL.toString().toLocal8Bit().constData()); |
| 828 | } | 827 | } |
| 829 | 828 | ||
| 829 | QUrl avatarVoxelURL(avatarURL->text()); | ||
| 830 | applicationInstance->getAvatar()->getVoxels()->setVoxelURL(avatarVoxelURL); | ||
| 831 | |||
| 832 | |||
| 833 | |||
| 830 | Avatar::sendAvatarURLsMessage(avatarVoxelURL, faceModelURL); | 834 | Avatar::sendAvatarURLsMessage(avatarVoxelURL, faceModelURL); |
| 831 | 835 | ||
| 832 | applicationInstance->getAvatar()->getHead().setPupilDilation(pupilDilation->value() / (float)pupilDilation->maximum()); | 836 | applicationInstance->getAvatar()->getHead().setPupilDilation(pupilDilation->value() / (float)pupilDilation->maximum()); |