History

ask for a mesh if username is present on login or is changed

Stephen Birarda committed 13 years ago

Commit b33843f1 parent e9e77d83 files · +19 −3Browse files

Showing the changes to interface/src/Menu.cpp (1 of 3 files). Show all

Unified · Split

interface/src/Menu.cpp+9−3
@@ -804,21 +804,27 @@ void Menu::editPreferences() { · 803 unmodified lines
804804 return;
805805 }
806806
807+ QUrl faceModelURL(faceURLEdit->text());
808+
807809 if (avatarUsernameEdit->text() != avatarUsername) {
808− // there has been a UUID change - set the new UUID on the avatar instance
810+ // there has been a username change - set the new UUID on the avatar instance
809811 applicationInstance->getAvatar()->setUsername(avatarUsernameEdit->text());
810812
813+ 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+ DataServerClient::getClientValueForKey(DataServerKey::FaceMeshURL);
816+ }
811817 }
812818
813819 QUrl avatarVoxelURL(avatarURL->text());
814820 applicationInstance->getAvatar()->getVoxels()->setVoxelURL(avatarVoxelURL);
815821
816− QUrl faceModelURL(faceURLEdit->text());
817822 if (faceModelURL.toString() != faceURLString) {
818823 applicationInstance->getAvatar()->getHead().getBlendFace().setModelURL(faceModelURL);
819824
820825 // send the new face mesh URL to the data-server (if we have a client UUID)
821− DataServerClient::putValueForKey("mesh", faceModelURL.toString().toLocal8Bit().constData());
826+ DataServerClient::putValueForKey(DataServerKey::FaceMeshURL,
827+ faceModelURL.toString().toLocal8Bit().constData());
822828 }
823829
824830 Avatar::sendAvatarURLsMessage(avatarVoxelURL, faceModelURL);