diff options
Diffstat (limited to 'indra')
| -rw-r--r-- | indra/newview/llmeshrepository.h | 2 | ||||
| -rw-r--r-- | indra/newview/llmodelpreview.cpp | 26 | ||||
| -rw-r--r-- | indra/newview/llvoavatar.cpp | 18 | ||||
| -rw-r--r-- | indra/newview/llvocache.cpp | 1 | 
4 files changed, 43 insertions, 4 deletions
diff --git a/indra/newview/llmeshrepository.h b/indra/newview/llmeshrepository.h index b9430a6165..b850ade0bb 100644 --- a/indra/newview/llmeshrepository.h +++ b/indra/newview/llmeshrepository.h @@ -533,7 +533,7 @@ public:      // Inherited from LLCore::HttpHandler      virtual void onCompleted(LLCore::HttpHandle handle, LLCore::HttpResponse * response); -        LLViewerFetchedTexture* FindViewerTexture(const LLImportMaterial& material); +    static LLViewerFetchedTexture* FindViewerTexture(const LLImportMaterial& material);  private:      LLHandle<LLWholeModelFeeObserver> mFeeObserverHandle; diff --git a/indra/newview/llmodelpreview.cpp b/indra/newview/llmodelpreview.cpp index 7ecd7cdff9..b1a48db0ee 100644 --- a/indra/newview/llmodelpreview.cpp +++ b/indra/newview/llmodelpreview.cpp @@ -543,6 +543,32 @@ void LLModelPreview::rebuildUploadData()              }              instance.mTransform = mat;              mUploadData.push_back(instance); + +            // if uploading textures, make sure textures are present +            if (mFMP->childGetValue("upload_textures").asBoolean()) // too early to cheack if still loading +            { +                for (auto& mat_pair : instance.mMaterial) +                { +                    LLImportMaterial& material = mat_pair.second; + +                    if (material.mDiffuseMapFilename.size()) +                    { +                        LLViewerFetchedTexture* texture = LLMeshUploadThread::FindViewerTexture(material); +                        if (texture && texture->isMissingAsset()) +                        { +                            // in case user provided a missing file later +                            texture->setIsMissingAsset(false); +                            texture->setLoadedCallback(LLModelPreview::textureLoadedCallback, 0, true, false, this, NULL, false); +                            texture->forceToSaveRawImage(0, F32_MAX); +                            texture->updateFetch(); +                            if (mModelLoader) +                            { +                                mModelLoader->mNumOfFetchingTextures++; +                            } +                        } +                    } +                } +            }          }      } diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index 84c8b3a382..4f851eabce 100644 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -2595,7 +2595,7 @@ void LLVOAvatar::idleUpdate(LLAgent &agent, const F64 &time)          return;      } -    LLCachedControl<bool> friends_only(gSavedSettings, "RenderAvatarFriendsOnly", false); +    static LLCachedControl<bool> friends_only(gSavedSettings, "RenderAvatarFriendsOnly", false);      if (friends_only()          && !isUIAvatar()          && !isControlAvatar() @@ -8481,17 +8481,29 @@ bool LLVOAvatar::isTooComplex() const  bool LLVOAvatar::isTooSlow() const  { +    if (mIsControlAvatar) +    { +        return mTooSlow; +    } +      static LLCachedControl<S32> compelxity_render_mode(gSavedSettings, "RenderAvatarComplexityMode"); -    bool render_friend =  (LLAvatarTracker::instance().isBuddy(getID()) && compelxity_render_mode > AV_RENDER_LIMIT_BY_COMPLEXITY); +    static LLCachedControl<bool> friends_only(gSavedSettings, "RenderAvatarFriendsOnly", false); +    bool is_friend = LLAvatarTracker::instance().isBuddy(getID()); +    bool render_friend = is_friend && compelxity_render_mode > AV_RENDER_LIMIT_BY_COMPLEXITY;      if (render_friend || mVisuallyMuteSetting == AV_ALWAYS_RENDER)      {          return false;      } -    else if (compelxity_render_mode == AV_RENDER_ONLY_SHOW_FRIENDS && !mIsControlAvatar) +    else if (compelxity_render_mode == AV_RENDER_ONLY_SHOW_FRIENDS) +    { +        return true; +    } +    else if (!is_friend && friends_only())      {          return true;      } +      return mTooSlow;  } diff --git a/indra/newview/llvocache.cpp b/indra/newview/llvocache.cpp index c92de576f9..0fe2a3e714 100644 --- a/indra/newview/llvocache.cpp +++ b/indra/newview/llvocache.cpp @@ -540,6 +540,7 @@ bool LLVOCacheEntry::isAnyVisible(const LLVector4a& camera_origin, const LLVecto      // Honestly, the entire VOCache partition system needs to be removed since it doubles the overhead of      // the spatial partition system and is redundant to the object cache, but this is a start      //  - davep 2024.06.07 +      LLOcclusionCullingGroup* group = (LLOcclusionCullingGroup*)getGroup();      if(!group)      {  | 
