Merge remote-tracking branch 'origin/develop' into brad/webrtc-voice-develop

master
Brad Linden 2024-06-20 14:29:54 -07:00
commit d8cbc8a0fd
4 changed files with 43 additions and 4 deletions

View File

@ -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;

View File

@ -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++;
}
}
}
}
}
}
}

View File

@ -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;
}

View File

@ -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)
{