mirror of
https://github.com/overte-org/overte.git
synced 2025-04-14 15:47:02 +02:00
improvements to tracking model names
This commit is contained in:
parent
50479d5d5e
commit
0bc1b02895
3 changed files with 32 additions and 6 deletions
interface/src
|
@ -3747,6 +3747,7 @@ bool Application::askToSetAvatarUrl(const QString& url) {
|
|||
} else {
|
||||
qDebug() << "Declined to use the avatar: " << url;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
@ -955,8 +955,16 @@ void MyAvatar::setSkeletonModelURL(const QUrl& skeletonModelURL) {
|
|||
|
||||
void MyAvatar::useFullAvatarURL(const QUrl& fullAvatarURL, const QString& modelName) {
|
||||
_useFullAvatar = true;
|
||||
_fullAvatarURLFromPreferences = fullAvatarURL;
|
||||
_fullAvatarModelName = modelName;
|
||||
|
||||
if (_fullAvatarURLFromPreferences != fullAvatarURL) {
|
||||
_fullAvatarURLFromPreferences = fullAvatarURL;
|
||||
if (modelName.isEmpty()) {
|
||||
QVariantHash fullAvatarFST = FSTReader::downloadMapping(_fullAvatarURLFromPreferences.toString());
|
||||
_fullAvatarModelName = fullAvatarFST["name"].toString();
|
||||
} else {
|
||||
_fullAvatarModelName = modelName;
|
||||
}
|
||||
}
|
||||
|
||||
if (!getFaceModelURLString().isEmpty()) {
|
||||
setFaceModelURL(QString());
|
||||
|
@ -979,10 +987,26 @@ void MyAvatar::useBodyURL(const QUrl& bodyURL, const QString& modelName) {
|
|||
|
||||
void MyAvatar::useHeadAndBodyURLs(const QUrl& headURL, const QUrl& bodyURL, const QString& headName, const QString& bodyName) {
|
||||
_useFullAvatar = false;
|
||||
_headURLFromPreferences = headURL;
|
||||
_skeletonURLFromPreferences = bodyURL;
|
||||
_headModelName = headName;
|
||||
_bodyModelName = bodyName;
|
||||
|
||||
if (_headURLFromPreferences != headURL) {
|
||||
_headURLFromPreferences = headURL;
|
||||
if (headName.isEmpty()) {
|
||||
QVariantHash headFST = FSTReader::downloadMapping(_headURLFromPreferences.toString());
|
||||
_headModelName = headFST["name"].toString();
|
||||
} else {
|
||||
_headModelName = headName;
|
||||
}
|
||||
}
|
||||
|
||||
if (_skeletonURLFromPreferences != bodyURL) {
|
||||
_skeletonURLFromPreferences = bodyURL;
|
||||
if (bodyName.isEmpty()) {
|
||||
QVariantHash bodyFST = FSTReader::downloadMapping(_skeletonURLFromPreferences.toString());
|
||||
_bodyModelName = bodyFST["name"].toString();
|
||||
} else {
|
||||
_bodyModelName = bodyName;
|
||||
}
|
||||
}
|
||||
|
||||
if (headURL != getFaceModelURL()) {
|
||||
setFaceModelURL(headURL);
|
||||
|
|
|
@ -271,6 +271,7 @@ void PreferencesDialog::loadPreferences() {
|
|||
void PreferencesDialog::savePreferences() {
|
||||
|
||||
MyAvatar* myAvatar = DependencyManager::get<AvatarManager>()->getMyAvatar();
|
||||
|
||||
bool shouldDispatchIdentityPacket = false;
|
||||
|
||||
QString displayNameStr(ui.displayNameEdit->text());
|
||||
|
|
Loading…
Reference in a new issue