MAINT-7168 SL Viewer should remember avatar rendering selection

meow-7.2.2
Mnikolenko Productengine 2017-03-03 17:26:07 +02:00
parent ef8c1b7e7b
commit 5bd5a474dd
2 changed files with 18 additions and 0 deletions

View File

@ -727,6 +727,8 @@ LLVOAvatar::LLVOAvatar(const LLUUID& id,
{
LLSceneMonitor::getInstance()->freezeAvatar((LLCharacter*)this);
}
mVisuallyMuteSetting = getSavedVisualMuteSettings();
}
std::string LLVOAvatar::avString() const
@ -9228,12 +9230,26 @@ void LLVOAvatar::calculateUpdateRenderComplexity()
}
}
//static
std::map<LLUUID, LLVOAvatar::VisualMuteSettings> LLVOAvatar::sVisuallyMuteSettingsMap;
void LLVOAvatar::setVisualMuteSettings(VisualMuteSettings set)
{
mVisuallyMuteSetting = set;
mNeedsImpostorUpdate = TRUE;
sVisuallyMuteSettingsMap[getID()] = set;
}
LLVOAvatar::VisualMuteSettings LLVOAvatar::getSavedVisualMuteSettings()
{
std::map<LLUUID, VisualMuteSettings>::iterator iter = sVisuallyMuteSettingsMap.find(getID());
if (iter != sVisuallyMuteSettingsMap.end())
{
return iter->second;
}
return AV_RENDER_NORMALLY;
}
void LLVOAvatar::calcMutedAVColor()
{

View File

@ -407,6 +407,7 @@ public:
};
void setVisualMuteSettings(VisualMuteSettings set);
VisualMuteSettings getVisualMuteSettings() { return mVisuallyMuteSetting; };
VisualMuteSettings getSavedVisualMuteSettings();
U32 renderRigid();
U32 renderSkinned();
@ -440,6 +441,7 @@ public:
VisualMuteSettings mVisuallyMuteSetting; // Always or never visually mute this AV
static std::map<LLUUID, VisualMuteSettings> sVisuallyMuteSettingsMap;
//--------------------------------------------------------------------
// Morph masks
//--------------------------------------------------------------------