summaryrefslogtreecommitdiff
path: root/indra/newview/llvoavatar.cpp
diff options
context:
space:
mode:
authorAndrey Lihatskiy <alihatskiy@productengine.com>2023-01-12 04:37:42 +0200
committerAndrey Lihatskiy <alihatskiy@productengine.com>2023-01-12 04:37:42 +0200
commitf9866a3543e1e13404891c949a3ceca482d2f649 (patch)
tree34e170a4bbe0c9c60832821fdf3246c883b6cf53 /indra/newview/llvoavatar.cpp
parenta66ea0a9089f9525a9e92ae3e7ebed412ffd53e1 (diff)
parenta0c3d69c620a92d73a1008f218680fb4d0ef9255 (diff)
Merge branch 'main' into DRTVWR-573-maint-R
# Conflicts: # autobuild.xml # indra/newview/llagent.cpp # indra/newview/llimview.cpp # indra/newview/llimview.h # indra/newview/llinventoryfunctions.cpp # indra/newview/llpanelmediasettingsgeneral.cpp # indra/newview/pipeline.cpp
Diffstat (limited to 'indra/newview/llvoavatar.cpp')
-rw-r--r--indra/newview/llvoavatar.cpp17
1 files changed, 14 insertions, 3 deletions
diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp
index 0dd4ce78ab..17299b6c61 100644
--- a/indra/newview/llvoavatar.cpp
+++ b/indra/newview/llvoavatar.cpp
@@ -10637,7 +10637,7 @@ void LLVOAvatar::updateVisualComplexity()
// with an avatar. This will be either an attached object or an animated
// object.
void LLVOAvatar::accountRenderComplexityForObject(
- const LLViewerObject *attached_object,
+ LLViewerObject *attached_object,
const F32 max_attachment_complexity,
LLVOVolume::texture_cost_t& textures,
U32& cost,
@@ -10709,7 +10709,7 @@ void LLVOAvatar::accountRenderComplexityForObject(
&& attached_object->mDrawable)
{
textures.clear();
-
+ BOOL is_rigged_mesh = attached_object->isRiggedMesh();
mAttachmentSurfaceArea += attached_object->recursiveGetScaledSurfaceArea();
const LLVOVolume* volume = attached_object->mDrawable->getVOVolume();
@@ -10730,6 +10730,7 @@ void LLVOAvatar::accountRenderComplexityForObject(
iter != child_list.end(); ++iter)
{
LLViewerObject* childp = *iter;
+ is_rigged_mesh |= childp->isRiggedMesh();
const LLVOVolume* chld_volume = dynamic_cast<LLVOVolume*>(childp);
if (chld_volume)
{
@@ -10738,6 +10739,16 @@ void LLVOAvatar::accountRenderComplexityForObject(
hud_object_complexity.objectsCount++;
}
}
+ if (is_rigged_mesh && !attached_object->mRiggedAttachedWarned)
+ {
+ LLSD args;
+ LLViewerInventoryItem* itemp = gInventory.getItem(attached_object->getAttachmentItemID());
+ args["NAME"] = itemp ? itemp->getName() : LLTrans::getString("Unknown");
+ args["POINT"] = LLTrans::getString(getTargetAttachmentPoint(attached_object)->getName());
+ LLNotificationsUtil::add("RiggedMeshAttachedToHUD", args);
+
+ attached_object->mRiggedAttachedWarned = true;
+ }
hud_object_complexity.texturesCount += textures.size();
@@ -10842,7 +10853,7 @@ void LLVOAvatar::calculateUpdateRenderComplexity()
attachment_iter != attachment->mAttachedObjects.end();
++attachment_iter)
{
- const LLViewerObject* attached_object = attachment_iter->get();
+ LLViewerObject* attached_object = attachment_iter->get();
accountRenderComplexityForObject(attached_object, max_attachment_complexity,
textures, cost, hud_complexity_list);
}