summaryrefslogtreecommitdiff
path: root/indra/newview/llvoavatar.cpp
diff options
context:
space:
mode:
authorNat Linden <nat@lindenlab.com>2022-09-19 21:21:21 +0000
committerNat Linden <nat@lindenlab.com>2022-09-19 21:21:21 +0000
commit9ac0b3da77ca0c54161803f23cc37c09e871799d (patch)
treeec9575c248d6e9cd01d8d15471ceb952c7dba738 /indra/newview/llvoavatar.cpp
parent5f1c8d311904bd3937f5ba70476e16233f7d21c1 (diff)
parentf39be1dfd30032f10f21cccc29e93c1c49f01df5 (diff)
SL-18068: Merged DRTVWR-565-maint-P into sl-18068
Diffstat (limited to 'indra/newview/llvoavatar.cpp')
-rw-r--r--indra/newview/llvoavatar.cpp20
1 files changed, 16 insertions, 4 deletions
diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp
index 6543081bd8..3f014990e0 100644
--- a/indra/newview/llvoavatar.cpp
+++ b/indra/newview/llvoavatar.cpp
@@ -2813,6 +2813,7 @@ void LLVOAvatar::idleUpdateMisc(bool detailed_update)
if (detailed_update)
{
U32 draw_order = 0;
+ S32 attachment_selected = LLSelectMgr::getInstance()->getSelection()->getObjectCount() && LLSelectMgr::getInstance()->getSelection()->isAttachment();
for (attachment_map_t::iterator iter = mAttachmentPoints.begin();
iter != mAttachmentPoints.end();
++iter)
@@ -2852,7 +2853,7 @@ void LLVOAvatar::idleUpdateMisc(bool detailed_update)
}
// if selecting any attachments, update all of them as non-damped
- if (LLSelectMgr::getInstance()->getSelection()->getObjectCount() && LLSelectMgr::getInstance()->getSelection()->isAttachment())
+ if (attachment_selected)
{
gPipeline.updateMoveNormalAsync(attached_object->mDrawable);
}
@@ -10621,7 +10622,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,
@@ -10693,7 +10694,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();
@@ -10714,6 +10715,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)
{
@@ -10722,6 +10724,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();
@@ -10826,7 +10838,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);
}