summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/pipeline.cpp24
1 files changed, 22 insertions, 2 deletions
diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp
index 6d248ef81d..13d6966723 100644
--- a/indra/newview/pipeline.cpp
+++ b/indra/newview/pipeline.cpp
@@ -10921,6 +10921,8 @@ void LLPipeline::generateImpostor(LLVOAvatar* avatar, bool preview_avatar)
if (preview_avatar)
{
// Only show rigged attachments for preview
+ // For the sake of performance and so that static
+ // objects won't obstruct previewing changes
LLVOAvatar::attachment_map_t::iterator iter;
for (iter = avatar->mAttachmentPoints.begin();
iter != avatar->mAttachmentPoints.end();
@@ -10932,9 +10934,27 @@ void LLPipeline::generateImpostor(LLVOAvatar* avatar, bool preview_avatar)
++attachment_iter)
{
LLViewerObject* attached_object = attachment_iter->get();
- if (attached_object && attached_object->isRiggedMesh())
+ if (attached_object)
{
- markVisible(attached_object->mDrawable->getSpatialBridge(), *viewer_camera);
+ if (attached_object->isRiggedMesh())
+ {
+ markVisible(attached_object->mDrawable->getSpatialBridge(), *viewer_camera);
+ }
+ else
+ {
+ // sometimes object is a linkset and rigged mesh is a child
+ LLViewerObject::const_child_list_t& child_list = attached_object->getChildren();
+ for (LLViewerObject::child_list_t::const_iterator iter = child_list.begin();
+ iter != child_list.end(); iter++)
+ {
+ LLViewerObject* child = *iter;
+ if (child->isRiggedMesh())
+ {
+ markVisible(attached_object->mDrawable->getSpatialBridge(), *viewer_camera);
+ break;
+ }
+ }
+ }
}
}
}