summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrey Kleshchev <andreykproductengine@lindenlab.com>2022-08-25 20:07:28 +0300
committerAndrey Kleshchev <andreykproductengine@lindenlab.com>2022-08-25 20:07:28 +0300
commita81a60f1b5b845e5e41f593d3dc7297858718ae5 (patch)
tree077e813884d2ae3c02723ec58bc13034f67a92b2
parent43a9b3e4e490202837086f577f303b33315346db (diff)
SL-18019 Sometimes rigged meshes don't show in preview thumbnails
-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;
+ }
+ }
+ }
}
}
}