From 53d5fd1e9bb59868b793f9bef0529cd62ca70126 Mon Sep 17 00:00:00 2001 From: prep Date: Thu, 28 Oct 2010 13:40:15 -0400 Subject: - Pelvis offsets are now preserved - Fix for CTS-261 --- indra/newview/llvovolume.cpp | 24 +++++++++++++++++++----- 1 file changed, 19 insertions(+), 5 deletions(-) (limited to 'indra/newview/llvovolume.cpp') diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp index e7e2830f25..0b2adc70d9 100644 --- a/indra/newview/llvovolume.cpp +++ b/indra/newview/llvovolume.cpp @@ -74,7 +74,6 @@ #include "llviewermediafocus.h" #include "llvoavatar.h" - const S32 MIN_QUIET_FRAMES_COALESCE = 30; const F32 FORCE_SIMPLE_RENDER_AREA = 512.f; const F32 FORCE_CULL_AREA = 8.f; @@ -4053,23 +4052,38 @@ void LLVolumeGeometryManager::rebuildGeom(LLSpatialGroup* group) //Determine if we've received skininfo that contains an //alternate bind matrix - if it does then apply the translational component //to the joints of the avatar. - const LLVOAvatar* pAvatarVO = vobj->getAvatar(); + LLVOAvatar* pAvatarVO = vobj->getAvatar(); if ( pAvatarVO ) { const LLMeshSkinInfo* pSkinData = gMeshRepo.getSkinInfo( vobj->getVolume()->getParams().getSculptID() ); + if ( pSkinData ) { - const int bindCnt = pSkinData->mAlternateBindMatrix.size(); + const int bindCnt = pSkinData->mAlternateBindMatrix.size(); if ( bindCnt > 0 ) { const int jointCnt = pSkinData->mJointNames.size(); for ( int i=0; imJointNames[i].c_str(); - LLJoint* pJoint = vobj->getAvatar()->getJoint( lookingForJoint ); + LLJoint* pJoint = pAvatarVO->getJoint( lookingForJoint ); if ( pJoint ) { - pJoint->storeCurrentXform( pSkinData->mAlternateBindMatrix[i].getTranslation() ); + const LLVector3& jointPos = pSkinData->mAlternateBindMatrix[i].getTranslation(); + pJoint->storeCurrentXform( jointPos ); + //If joint is a pelvis then handle by setting avPos+offset + //if ( !strcmp( lookingForJoint.c_str(),"mPelvis" ) ) + if ( lookingForJoint == "mPelvis" ) + { + //Apply av pos + offset + if ( !pAvatarVO->hasPelvisOffset() ) + { + pAvatarVO->setPelvisOffset( true, jointPos ); + pAvatarVO->setPosition( pAvatarVO->getCharacterPosition() + jointPos ); + } + } + + } } } -- cgit v1.2.3 From 2ca8a4865ade974b556d4a9c14ad378814c4e7a6 Mon Sep 17 00:00:00 2001 From: Dave Parks Date: Fri, 29 Oct 2010 15:34:03 -0500 Subject: SH-184 Don't render loading meshes as tetrahedrons. --- indra/newview/llvovolume.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'indra/newview/llvovolume.cpp') diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp index 0b2adc70d9..808b8723a2 100644 --- a/indra/newview/llvovolume.cpp +++ b/indra/newview/llvovolume.cpp @@ -4014,6 +4014,12 @@ void LLVolumeGeometryManager::rebuildGeom(LLSpatialGroup* group) } LLVOVolume* vobj = drawablep->getVOVolume(); + + if (vobj->getVolume() && vobj->getVolume()->isTetrahedron()) + { + continue; + } + llassert_always(vobj); vobj->updateTextureVirtualSize(); vobj->preRebuild(); -- cgit v1.2.3