summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRunitai Linden <davep@lindenlab.com>2021-12-06 16:49:29 -0600
committerRunitai Linden <davep@lindenlab.com>2021-12-06 16:49:29 -0600
commitd4707b7ef31355278e57a258a1bb19ef014376ce (patch)
treec1e2bf79e11b1949cdbaef58fea102f0671d809e
parent5e5be92d79b6ad49f971e7b2f2ddd359d762c163 (diff)
SL-16451 Fix for rigged meshes disappearing when rendered as static.
-rw-r--r--indra/newview/llvovolume.cpp14
1 files changed, 13 insertions, 1 deletions
diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp
index 4e7eb4df5d..c1f83ed0ae 100644
--- a/indra/newview/llvovolume.cpp
+++ b/indra/newview/llvovolume.cpp
@@ -1699,6 +1699,7 @@ BOOL LLVOVolume::genBBoxes(BOOL force_global)
{
LL_DEBUGS("RiggedBox") << "rebuilding box, volume face count " << getVolume()->getNumVolumeFaces() << " drawable face count " << mDrawable->getNumFaces() << LL_ENDL;
}
+
// There's no guarantee that getVolume()->getNumFaces() == mDrawable->getNumFaces()
for (S32 i = 0;
i < getVolume()->getNumVolumeFaces() && i < mDrawable->getNumFaces() && i < getNumTEs();
@@ -1740,7 +1741,18 @@ BOOL LLVOVolume::genBBoxes(BOOL force_global)
}
}
- if (isRiggedMesh())
+ bool rigged = false;
+
+ if (!isAnimatedObject())
+ {
+ rigged = isRiggedMesh() && isAttachment();
+ }
+ else
+ {
+ rigged = isRiggedMesh() && getControlAvatar() && getControlAvatar()->mPlaying;
+ }
+
+ if (rigged)
{
min.set(-1, -1, -1, 0);
max.set(1, 1, 1, 0);