summaryrefslogtreecommitdiff
path: root/indra/newview/pipeline.cpp
diff options
context:
space:
mode:
authorAndrey Lihatskiy <alihatskiy@productengine.com>2022-06-29 20:51:08 +0300
committerAndrey Lihatskiy <alihatskiy@productengine.com>2022-06-29 20:51:08 +0300
commit2e837e538925056be5aa6edc3d358b1f447b5f39 (patch)
tree506f73cc9a317b37a9d5dc344681363116630752 /indra/newview/pipeline.cpp
parentf3deec8851dd03470bf68fcf2cffda1fc3fa44d8 (diff)
parent1e4f2ec07e32a142f35817d3186a124df3f8cd25 (diff)
Merge branch 'master' into DRTVWR-548-maint-N
# Conflicts: # doc/contributions.txt # indra/newview/llviewercontrol.cpp
Diffstat (limited to 'indra/newview/pipeline.cpp')
-rw-r--r--indra/newview/pipeline.cpp57
1 files changed, 41 insertions, 16 deletions
diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp
index db5c446e7a..95e2f98251 100644
--- a/indra/newview/pipeline.cpp
+++ b/indra/newview/pipeline.cpp
@@ -10903,22 +10903,47 @@ void LLPipeline::generateImpostor(LLVOAvatar* avatar, bool preview_avatar)
{
markVisible(avatar->mDrawable, *viewer_camera);
- LLVOAvatar::attachment_map_t::iterator iter;
- for (iter = avatar->mAttachmentPoints.begin();
- iter != avatar->mAttachmentPoints.end();
- ++iter)
- {
- LLViewerJointAttachment *attachment = iter->second;
- for (LLViewerJointAttachment::attachedobjs_vec_t::iterator attachment_iter = attachment->mAttachedObjects.begin();
- attachment_iter != attachment->mAttachedObjects.end();
- ++attachment_iter)
- {
- if (LLViewerObject* attached_object = attachment_iter->get())
- {
- markVisible(attached_object->mDrawable->getSpatialBridge(), *viewer_camera);
- }
- }
- }
+ if (preview_avatar)
+ {
+ // Only show rigged attachments for preview
+ LLVOAvatar::attachment_map_t::iterator iter;
+ for (iter = avatar->mAttachmentPoints.begin();
+ iter != avatar->mAttachmentPoints.end();
+ ++iter)
+ {
+ LLViewerJointAttachment *attachment = iter->second;
+ for (LLViewerJointAttachment::attachedobjs_vec_t::iterator attachment_iter = attachment->mAttachedObjects.begin();
+ attachment_iter != attachment->mAttachedObjects.end();
+ ++attachment_iter)
+ {
+ LLViewerObject* attached_object = attachment_iter->get();
+ if (attached_object && attached_object->isRiggedMesh())
+ {
+ markVisible(attached_object->mDrawable->getSpatialBridge(), *viewer_camera);
+ }
+ }
+ }
+ }
+ else
+ {
+ LLVOAvatar::attachment_map_t::iterator iter;
+ for (iter = avatar->mAttachmentPoints.begin();
+ iter != avatar->mAttachmentPoints.end();
+ ++iter)
+ {
+ LLViewerJointAttachment *attachment = iter->second;
+ for (LLViewerJointAttachment::attachedobjs_vec_t::iterator attachment_iter = attachment->mAttachedObjects.begin();
+ attachment_iter != attachment->mAttachedObjects.end();
+ ++attachment_iter)
+ {
+ LLViewerObject* attached_object = attachment_iter->get();
+ if (attached_object)
+ {
+ markVisible(attached_object->mDrawable->getSpatialBridge(), *viewer_camera);
+ }
+ }
+ }
+ }
}
stateSort(*LLViewerCamera::getInstance(), result);