diff options
author | Andrey Kleshchev <andreykproductengine@lindenlab.com> | 2022-06-02 22:05:03 +0300 |
---|---|---|
committer | Andrey Kleshchev <andreykproductengine@lindenlab.com> | 2022-06-02 22:21:44 +0300 |
commit | 90e8cc630d5ce1332b183bf4232c368d385b8f01 (patch) | |
tree | d017fb72d529ea71e35f45fc67a585d188c5a8df | |
parent | a426e8ddb31260cbc56106d433d967ebcb9b99aa (diff) |
SL-17505 Preview should be displaying rigged attachments only
-rw-r--r-- | indra/newview/pipeline.cpp | 57 |
1 files changed, 41 insertions, 16 deletions
diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index da16c8209f..c297f0f080 100644 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -10897,22 +10897,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); |