mirror of
https://github.com/overte-org/overte.git
synced 2025-04-21 17:03:58 +02:00
reload own avatar on Content Reload
This commit is contained in:
parent
a7a924153a
commit
a1a3c4470c
3 changed files with 12 additions and 0 deletions
|
@ -2763,6 +2763,8 @@ void Application::reloadResourceCaches() {
|
|||
DependencyManager::get<TextureCache>()->refreshAll();
|
||||
|
||||
DependencyManager::get<NodeList>()->reset(); // Force redownload of .fst models
|
||||
|
||||
getMyAvatar()->resetFullAvatarURL();
|
||||
}
|
||||
|
||||
void Application::rotationModeChanged() {
|
||||
|
|
|
@ -986,6 +986,14 @@ void MyAvatar::setSkeletonModelURL(const QUrl& skeletonModelURL) {
|
|||
_headBoneSet.clear();
|
||||
}
|
||||
|
||||
|
||||
void MyAvatar::resetFullAvatarURL() {
|
||||
auto lastAvatarURL = getFullAvatarURLFromPreferences();
|
||||
auto lastAvatarName = getFullAvatarModelName();
|
||||
useFullAvatarURL(QUrl());
|
||||
useFullAvatarURL(lastAvatarURL, lastAvatarName);
|
||||
}
|
||||
|
||||
void MyAvatar::useFullAvatarURL(const QUrl& fullAvatarURL, const QString& modelName) {
|
||||
|
||||
if (QThread::currentThread() != thread()) {
|
||||
|
|
|
@ -196,6 +196,8 @@ public:
|
|||
Q_INVOKABLE void useFullAvatarURL(const QUrl& fullAvatarURL, const QString& modelName = QString());
|
||||
Q_INVOKABLE const QUrl& getFullAvatarURLFromPreferences() const { return _fullAvatarURLFromPreferences; }
|
||||
Q_INVOKABLE const QString& getFullAvatarModelName() const { return _fullAvatarModelName; }
|
||||
void resetFullAvatarURL();
|
||||
|
||||
|
||||
virtual void setAttachmentData(const QVector<AttachmentData>& attachmentData) override;
|
||||
|
||||
|
|
Loading…
Reference in a new issue