SH-812 Fix for rigged meshes not showing up as rigged until LoD switch.
parent
e881ee54d0
commit
d78ecc6c28
|
|
@ -1456,7 +1456,7 @@ void LLDrawPoolAvatar::renderRigged(LLVOAvatar* avatar, U32 type, bool glow)
|
|||
continue;
|
||||
}
|
||||
|
||||
const LLMeshSkinInfo* skin = gMeshRepo.getSkinInfo(mesh_id);
|
||||
const LLMeshSkinInfo* skin = gMeshRepo.getSkinInfo(mesh_id, vobj);
|
||||
if (!skin)
|
||||
{
|
||||
continue;
|
||||
|
|
|
|||
|
|
@ -2630,6 +2630,20 @@ void LLMeshRepository::notifyLoadedMeshes()
|
|||
void LLMeshRepository::notifySkinInfoReceived(LLMeshSkinInfo& info)
|
||||
{
|
||||
mSkinMap[info.mMeshID] = info;
|
||||
|
||||
skin_load_map::iterator iter = mLoadingSkins.find(info.mMeshID);
|
||||
if (iter != mLoadingSkins.end())
|
||||
{
|
||||
for (std::set<LLUUID>::iterator obj_id = iter->second.begin(); obj_id != iter->second.end(); ++obj_id)
|
||||
{
|
||||
LLVOVolume* vobj = (LLVOVolume*) gObjectList.findObject(*obj_id);
|
||||
if (vobj)
|
||||
{
|
||||
vobj->notifyMeshLoaded();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
mLoadingSkins.erase(info.mMeshID);
|
||||
}
|
||||
|
||||
|
|
@ -2745,7 +2759,7 @@ U32 LLMeshRepository::getResourceCost(const LLUUID& mesh_id)
|
|||
return mThread->getResourceCost(mesh_id);
|
||||
}
|
||||
|
||||
const LLMeshSkinInfo* LLMeshRepository::getSkinInfo(const LLUUID& mesh_id)
|
||||
const LLMeshSkinInfo* LLMeshRepository::getSkinInfo(const LLUUID& mesh_id, LLVOVolume* requesting_obj)
|
||||
{
|
||||
if (mesh_id.notNull())
|
||||
{
|
||||
|
|
@ -2759,12 +2773,12 @@ const LLMeshSkinInfo* LLMeshRepository::getSkinInfo(const LLUUID& mesh_id)
|
|||
{
|
||||
LLMutexLock lock(mMeshMutex);
|
||||
//add volume to list of loading meshes
|
||||
std::set<LLUUID>::iterator iter = mLoadingSkins.find(mesh_id);
|
||||
skin_load_map::iterator iter = mLoadingSkins.find(mesh_id);
|
||||
if (iter == mLoadingSkins.end())
|
||||
{ //no request pending for this skin info
|
||||
mLoadingSkins.insert(mesh_id);
|
||||
mPendingSkinRequests.push(mesh_id);
|
||||
}
|
||||
mLoadingSkins[mesh_id].insert(requesting_obj->getID());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -475,7 +475,7 @@ public:
|
|||
static S32 getActualMeshLOD(LLSD& header, S32 lod);
|
||||
U32 calcResourceCost(LLSD& header);
|
||||
U32 getResourceCost(const LLUUID& mesh_params);
|
||||
const LLMeshSkinInfo* getSkinInfo(const LLUUID& mesh_id);
|
||||
const LLMeshSkinInfo* getSkinInfo(const LLUUID& mesh_id, LLVOVolume* requesting_obj);
|
||||
LLModel::Decomposition* getDecomposition(const LLUUID& mesh_id);
|
||||
void fetchPhysicsShape(const LLUUID& mesh_id);
|
||||
bool hasPhysicsShape(const LLUUID& mesh_id);
|
||||
|
|
@ -504,7 +504,8 @@ public:
|
|||
std::vector<LLMeshRepoThread::LODRequest> mPendingRequests;
|
||||
|
||||
//list of mesh ids awaiting skin info
|
||||
std::set<LLUUID> mLoadingSkins;
|
||||
typedef std::map<LLUUID, std::set<LLUUID> > skin_load_map;
|
||||
skin_load_map mLoadingSkins;
|
||||
|
||||
//list of mesh ids that need to send skin info fetch requests
|
||||
std::queue<LLUUID> mPendingSkinRequests;
|
||||
|
|
|
|||
|
|
@ -6004,7 +6004,7 @@ void LLVOAvatar::cleanupAttachedMesh( LLViewerObject* pVO )
|
|||
LLVOVolume* pVObj = pVO->mDrawable->getVOVolume();
|
||||
if ( pVObj )
|
||||
{
|
||||
const LLMeshSkinInfo* pSkinData = gMeshRepo.getSkinInfo( pVObj->getVolume()->getParams().getSculptID() );
|
||||
const LLMeshSkinInfo* pSkinData = gMeshRepo.getSkinInfo( pVObj->getVolume()->getParams().getSculptID(), pVObj );
|
||||
if ( pSkinData )
|
||||
{
|
||||
const int jointCnt = pSkinData->mJointNames.size();
|
||||
|
|
|
|||
|
|
@ -1096,8 +1096,6 @@ void LLVOVolume::updateSculptTexture()
|
|||
|
||||
}
|
||||
|
||||
|
||||
|
||||
void LLVOVolume::notifyMeshLoaded()
|
||||
{
|
||||
mSculptChanged = TRUE;
|
||||
|
|
@ -3534,7 +3532,7 @@ void LLVOVolume::updateRiggedVolume()
|
|||
|
||||
LLVolume* volume = getVolume();
|
||||
|
||||
const LLMeshSkinInfo* skin = gMeshRepo.getSkinInfo(volume->getParams().getSculptID());
|
||||
const LLMeshSkinInfo* skin = gMeshRepo.getSkinInfo(volume->getParams().getSculptID(), this);
|
||||
|
||||
if (!skin)
|
||||
{
|
||||
|
|
@ -3986,7 +3984,7 @@ void LLVolumeGeometryManager::rebuildGeom(LLSpatialGroup* group)
|
|||
|
||||
bool rigged = vobj->isAttachment() &&
|
||||
vobj->isMesh() &&
|
||||
gMeshRepo.getSkinInfo(vobj->getVolume()->getParams().getSculptID());
|
||||
gMeshRepo.getSkinInfo(vobj->getVolume()->getParams().getSculptID(), vobj);
|
||||
|
||||
bool bake_sunlight = LLPipeline::sBakeSunlight && drawablep->isStatic();
|
||||
|
||||
|
|
@ -4028,7 +4026,7 @@ void LLVolumeGeometryManager::rebuildGeom(LLSpatialGroup* group)
|
|||
if ( pAvatarVO )
|
||||
{
|
||||
LLUUID currentId = vobj->getVolume()->getParams().getSculptID();
|
||||
const LLMeshSkinInfo* pSkinData = gMeshRepo.getSkinInfo( currentId );
|
||||
const LLMeshSkinInfo* pSkinData = gMeshRepo.getSkinInfo( currentId, vobj );
|
||||
|
||||
if ( pSkinData )
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in New Issue