Merged in MAINT-7168
commit
680faa5b01
|
|
@ -203,6 +203,7 @@ set(viewer_SOURCE_FILES
|
|||
llfloaterautoreplacesettings.cpp
|
||||
llfloateravatar.cpp
|
||||
llfloateravatarpicker.cpp
|
||||
llfloateravatarrendersettings.cpp
|
||||
llfloateravatartextures.cpp
|
||||
llfloaterbeacons.cpp
|
||||
llfloaterbigpreview.cpp
|
||||
|
|
@ -820,6 +821,7 @@ set(viewer_HEADER_FILES
|
|||
llfloaterautoreplacesettings.h
|
||||
llfloateravatar.h
|
||||
llfloateravatarpicker.h
|
||||
llfloateravatarrendersettings.h
|
||||
llfloateravatartextures.h
|
||||
llfloaterbeacons.h
|
||||
llfloaterbigpreview.h
|
||||
|
|
|
|||
|
|
@ -8426,6 +8426,17 @@
|
|||
<key>Value</key>
|
||||
<integer>1</integer>
|
||||
</map>
|
||||
<key>AlwaysRenderFriends</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Always render friends regardless of max complexity</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>Boolean</string>
|
||||
<key>Value</key>
|
||||
<integer>0</integer>
|
||||
</map>
|
||||
<key>RenderAvatar</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
|
|
|
|||
|
|
@ -0,0 +1,235 @@
|
|||
/**
|
||||
* @file llfloateravatarrendersettings.cpp
|
||||
* @brief Shows the list of avatars with non-default rendering settings
|
||||
*
|
||||
* $LicenseInfo:firstyear=2009&license=viewerlgpl$
|
||||
* Second Life Viewer Source Code
|
||||
* Copyright (C) 2017, Linden Research, Inc.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation;
|
||||
* version 2.1 of the License only.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*
|
||||
* Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
|
||||
* $/LicenseInfo$
|
||||
*/
|
||||
#include "llviewerprecompiledheaders.h"
|
||||
|
||||
#include "llfloateravatarrendersettings.h"
|
||||
|
||||
#include "llavatarnamecache.h"
|
||||
#include "llfiltereditor.h"
|
||||
#include "llfloaterreg.h"
|
||||
#include "llnamelistctrl.h"
|
||||
#include "llmenugl.h"
|
||||
#include "llviewerobjectlist.h"
|
||||
#include "llvoavatar.h"
|
||||
|
||||
class LLSettingsContextMenu : public LLListContextMenu
|
||||
|
||||
{
|
||||
public:
|
||||
LLSettingsContextMenu(LLFloaterAvatarRenderSettings* floater_settings)
|
||||
: mFloaterSettings(floater_settings)
|
||||
{}
|
||||
protected:
|
||||
LLContextMenu* createMenu()
|
||||
{
|
||||
LLUICtrl::CommitCallbackRegistry::ScopedRegistrar registrar;
|
||||
LLUICtrl::EnableCallbackRegistry::ScopedRegistrar enable_registrar;
|
||||
registrar.add("Settings.SetRendering", boost::bind(&LLFloaterAvatarRenderSettings::onCustomAction, mFloaterSettings, _2, mUUIDs.front()));
|
||||
enable_registrar.add("Settings.IsSelected", boost::bind(&LLFloaterAvatarRenderSettings::isActionChecked, mFloaterSettings, _2, mUUIDs.front()));
|
||||
LLContextMenu* menu = createFromFile("menu_avatar_rendering_settings.xml");
|
||||
|
||||
return menu;
|
||||
}
|
||||
|
||||
LLFloaterAvatarRenderSettings* mFloaterSettings;
|
||||
};
|
||||
|
||||
class LLAvatarRenderMuteListObserver : public LLMuteListObserver
|
||||
{
|
||||
/* virtual */ void onChange() { LLFloaterAvatarRenderSettings::setNeedsUpdate();}
|
||||
};
|
||||
|
||||
static LLAvatarRenderMuteListObserver sAvatarRenderMuteListObserver;
|
||||
|
||||
LLFloaterAvatarRenderSettings::LLFloaterAvatarRenderSettings(const LLSD& key)
|
||||
: LLFloater(key),
|
||||
mAvatarSettingsList(NULL),
|
||||
mNeedsUpdate(false)
|
||||
{
|
||||
mContextMenu = new LLSettingsContextMenu(this);
|
||||
LLRenderMuteList::getInstance()->addObserver(&sAvatarRenderMuteListObserver);
|
||||
}
|
||||
|
||||
LLFloaterAvatarRenderSettings::~LLFloaterAvatarRenderSettings()
|
||||
{
|
||||
delete mContextMenu;
|
||||
LLRenderMuteList::getInstance()->removeObserver(&sAvatarRenderMuteListObserver);
|
||||
}
|
||||
|
||||
BOOL LLFloaterAvatarRenderSettings::postBuild()
|
||||
{
|
||||
LLFloater::postBuild();
|
||||
mAvatarSettingsList = getChild<LLNameListCtrl>("render_settings_list");
|
||||
mAvatarSettingsList->setRightMouseDownCallback(boost::bind(&LLFloaterAvatarRenderSettings::onAvatarListRightClick, this, _1, _2, _3));
|
||||
|
||||
getChild<LLFilterEditor>("people_filter_input")->setCommitCallback(boost::bind(&LLFloaterAvatarRenderSettings::onFilterEdit, this, _2));
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
void LLFloaterAvatarRenderSettings::draw()
|
||||
{
|
||||
if(mNeedsUpdate)
|
||||
{
|
||||
updateList();
|
||||
mNeedsUpdate = false;
|
||||
}
|
||||
|
||||
LLFloater::draw();
|
||||
}
|
||||
|
||||
void LLFloaterAvatarRenderSettings::onAvatarListRightClick(LLUICtrl* ctrl, S32 x, S32 y)
|
||||
{
|
||||
LLNameListCtrl* list = dynamic_cast<LLNameListCtrl*>(ctrl);
|
||||
if (!list) return;
|
||||
list->selectItemAt(x, y, MASK_NONE);
|
||||
uuid_vec_t selected_uuids;
|
||||
|
||||
if(list->getCurrentID().notNull())
|
||||
{
|
||||
selected_uuids.push_back(list->getCurrentID());
|
||||
mContextMenu->show(ctrl, selected_uuids, x, y);
|
||||
}
|
||||
}
|
||||
|
||||
void LLFloaterAvatarRenderSettings::onOpen(const LLSD& key)
|
||||
{
|
||||
updateList();
|
||||
}
|
||||
|
||||
void LLFloaterAvatarRenderSettings::updateList()
|
||||
{
|
||||
mAvatarSettingsList->deleteAllItems();
|
||||
LLAvatarName av_name;
|
||||
LLNameListCtrl::NameItem item_params;
|
||||
for (std::map<LLUUID, S32>::iterator iter = LLRenderMuteList::getInstance()->sVisuallyMuteSettingsMap.begin(); iter != LLRenderMuteList::getInstance()->sVisuallyMuteSettingsMap.end(); iter++)
|
||||
{
|
||||
item_params.value = iter->first;
|
||||
LLAvatarNameCache::get(iter->first, &av_name);
|
||||
if(!isHiddenRow(av_name.getCompleteName()))
|
||||
{
|
||||
item_params.columns.add().value(av_name.getCompleteName()).column("name");
|
||||
std::string setting = getString(iter->second == 1 ? "av_never_render" : "av_always_render");
|
||||
item_params.columns.add().value(setting).column("setting");
|
||||
mAvatarSettingsList->addNameItemRow(item_params);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void LLFloaterAvatarRenderSettings::onFilterEdit(const std::string& search_string)
|
||||
{
|
||||
std::string filter_upper = search_string;
|
||||
LLStringUtil::toUpper(filter_upper);
|
||||
if (mNameFilter != filter_upper)
|
||||
{
|
||||
mNameFilter = filter_upper;
|
||||
mNeedsUpdate = true;
|
||||
}
|
||||
}
|
||||
|
||||
bool LLFloaterAvatarRenderSettings::isHiddenRow(const std::string& av_name)
|
||||
{
|
||||
if (mNameFilter.empty()) return false;
|
||||
std::string upper_name = av_name;
|
||||
LLStringUtil::toUpper(upper_name);
|
||||
return std::string::npos == upper_name.find(mNameFilter);
|
||||
}
|
||||
|
||||
static LLVOAvatar* find_avatar(const LLUUID& id)
|
||||
{
|
||||
LLViewerObject *obj = gObjectList.findObject(id);
|
||||
while (obj && obj->isAttachment())
|
||||
{
|
||||
obj = (LLViewerObject *)obj->getParent();
|
||||
}
|
||||
|
||||
if (obj && obj->isAvatar())
|
||||
{
|
||||
return (LLVOAvatar*)obj;
|
||||
}
|
||||
else
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void LLFloaterAvatarRenderSettings::onCustomAction (const LLSD& userdata, const LLUUID& av_id)
|
||||
{
|
||||
const std::string command_name = userdata.asString();
|
||||
|
||||
S32 new_setting = 0;
|
||||
if ("default" == command_name)
|
||||
{
|
||||
new_setting = S32(LLVOAvatar::AV_RENDER_NORMALLY);
|
||||
}
|
||||
else if ("never" == command_name)
|
||||
{
|
||||
new_setting = S32(LLVOAvatar::AV_DO_NOT_RENDER);
|
||||
}
|
||||
else if ("always" == command_name)
|
||||
{
|
||||
new_setting = S32(LLVOAvatar::AV_ALWAYS_RENDER);
|
||||
}
|
||||
|
||||
LLVOAvatar *avatarp = find_avatar(av_id);
|
||||
if (avatarp)
|
||||
{
|
||||
avatarp->setVisualMuteSettings(LLVOAvatar::VisualMuteSettings(new_setting));
|
||||
}
|
||||
else
|
||||
{
|
||||
LLRenderMuteList::getInstance()->saveVisualMuteSetting(av_id, new_setting);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
bool LLFloaterAvatarRenderSettings::isActionChecked(const LLSD& userdata, const LLUUID& av_id)
|
||||
{
|
||||
const std::string command_name = userdata.asString();
|
||||
|
||||
S32 visual_setting = LLRenderMuteList::getInstance()->getSavedVisualMuteSetting(av_id);
|
||||
if ("default" == command_name)
|
||||
{
|
||||
return (visual_setting == S32(LLVOAvatar::AV_RENDER_NORMALLY));
|
||||
}
|
||||
else if ("never" == command_name)
|
||||
{
|
||||
return (visual_setting == S32(LLVOAvatar::AV_DO_NOT_RENDER));
|
||||
}
|
||||
else if ("always" == command_name)
|
||||
{
|
||||
return (visual_setting == S32(LLVOAvatar::AV_ALWAYS_RENDER));
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
void LLFloaterAvatarRenderSettings::setNeedsUpdate()
|
||||
{
|
||||
LLFloaterAvatarRenderSettings* instance = LLFloaterReg::getTypedInstance<LLFloaterAvatarRenderSettings>("avatar_render_settings");
|
||||
if(!instance) return;
|
||||
instance->mNeedsUpdate = true;
|
||||
}
|
||||
|
|
@ -0,0 +1,67 @@
|
|||
/**
|
||||
* @file llfloateravatarrendersettings.h
|
||||
* @brief Shows the list of avatars with non-default rendering settings
|
||||
*
|
||||
* $LicenseInfo:firstyear=2009&license=viewerlgpl$
|
||||
* Second Life Viewer Source Code
|
||||
* Copyright (C) 2017, Linden Research, Inc.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation;
|
||||
* version 2.1 of the License only.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*
|
||||
* Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
|
||||
* $/LicenseInfo$
|
||||
*/
|
||||
|
||||
#ifndef LL_LLFLOATERAVATARRENDERSETTINGS_H
|
||||
#define LL_LLFLOATERAVATARRENDERSETTINGS_H
|
||||
|
||||
#include "llfloater.h"
|
||||
#include "lllistcontextmenu.h"
|
||||
#include "llmutelist.h"
|
||||
|
||||
class LLNameListCtrl;
|
||||
|
||||
class LLFloaterAvatarRenderSettings : public LLFloater
|
||||
{
|
||||
public:
|
||||
|
||||
LLFloaterAvatarRenderSettings(const LLSD& key);
|
||||
virtual ~LLFloaterAvatarRenderSettings();
|
||||
|
||||
/*virtual*/ BOOL postBuild();
|
||||
/*virtual*/ void onOpen(const LLSD& key);
|
||||
/*virtual*/ void draw();
|
||||
|
||||
void onAvatarListRightClick(LLUICtrl* ctrl, S32 x, S32 y);
|
||||
|
||||
void updateList();
|
||||
void onFilterEdit(const std::string& search_string);
|
||||
void onCustomAction (const LLSD& userdata, const LLUUID& av_id);
|
||||
bool isActionChecked(const LLSD& userdata, const LLUUID& av_id);
|
||||
|
||||
static void setNeedsUpdate();
|
||||
|
||||
private:
|
||||
bool isHiddenRow(const std::string& av_name);
|
||||
|
||||
bool mNeedsUpdate;
|
||||
LLListContextMenu* mContextMenu;
|
||||
LLNameListCtrl* mAvatarSettingsList;
|
||||
|
||||
std::string mNameFilter;
|
||||
};
|
||||
|
||||
|
||||
#endif //LL_LLFLOATERAVATARRENDERSETTINGS_H
|
||||
|
|
@ -360,6 +360,7 @@ LLFloaterPreference::LLFloaterPreference(const LLSD& key)
|
|||
mCommitCallbackRegistrar.add("Pref.ClickEnablePopup", boost::bind(&LLFloaterPreference::onClickEnablePopup, this));
|
||||
mCommitCallbackRegistrar.add("Pref.ClickDisablePopup", boost::bind(&LLFloaterPreference::onClickDisablePopup, this));
|
||||
mCommitCallbackRegistrar.add("Pref.LogPath", boost::bind(&LLFloaterPreference::onClickLogPath, this));
|
||||
mCommitCallbackRegistrar.add("Pref.RenderExceptions", boost::bind(&LLFloaterPreference::onClickRenderExceptions, this));
|
||||
mCommitCallbackRegistrar.add("Pref.HardwareDefaults", boost::bind(&LLFloaterPreference::setHardwareDefaults, this));
|
||||
mCommitCallbackRegistrar.add("Pref.AvatarImpostorsEnable", boost::bind(&LLFloaterPreference::onAvatarImpostorsEnable, this));
|
||||
mCommitCallbackRegistrar.add("Pref.UpdateIndirectMaxComplexity", boost::bind(&LLFloaterPreference::updateMaxComplexity, this));
|
||||
|
|
@ -385,7 +386,7 @@ LLFloaterPreference::LLFloaterPreference(const LLSD& key)
|
|||
gSavedSettings.getControl("NameTagShowUsernames")->getCommitSignal()->connect(boost::bind(&handleNameTagOptionChanged, _2));
|
||||
gSavedSettings.getControl("NameTagShowFriends")->getCommitSignal()->connect(boost::bind(&handleNameTagOptionChanged, _2));
|
||||
gSavedSettings.getControl("UseDisplayNames")->getCommitSignal()->connect(boost::bind(&handleDisplayNamesOptionChanged, _2));
|
||||
|
||||
|
||||
gSavedSettings.getControl("AppearanceCameraMovement")->getCommitSignal()->connect(boost::bind(&handleAppearanceCameraMovementChanged, _2));
|
||||
|
||||
LLAvatarPropertiesProcessor::getInstance()->addObserver( gAgent.getID(), this );
|
||||
|
|
@ -786,10 +787,12 @@ void LLFloaterPreference::onOpen(const LLSD& key)
|
|||
LLButton* load_btn = findChild<LLButton>("PrefLoadButton");
|
||||
LLButton* save_btn = findChild<LLButton>("PrefSaveButton");
|
||||
LLButton* delete_btn = findChild<LLButton>("PrefDeleteButton");
|
||||
LLButton* exceptions_btn = findChild<LLButton>("RenderExceptionsButton");
|
||||
|
||||
load_btn->setEnabled(started);
|
||||
save_btn->setEnabled(started);
|
||||
delete_btn->setEnabled(started);
|
||||
exceptions_btn->setEnabled(started);
|
||||
}
|
||||
|
||||
void LLFloaterPreference::onVertexShaderEnable()
|
||||
|
|
@ -2075,6 +2078,11 @@ void LLFloaterPreference::onClickSpellChecker()
|
|||
LLFloaterReg::showInstance("prefs_spellchecker");
|
||||
}
|
||||
|
||||
void LLFloaterPreference::onClickRenderExceptions()
|
||||
{
|
||||
LLFloaterReg::showInstance("avatar_render_settings");
|
||||
}
|
||||
|
||||
void LLFloaterPreference::onClickAdvanced()
|
||||
{
|
||||
LLFloaterReg::showInstance("prefs_graphics_advanced");
|
||||
|
|
|
|||
|
|
@ -171,6 +171,7 @@ public:
|
|||
void onClickPermsDefault();
|
||||
void onClickAutoReplace();
|
||||
void onClickSpellChecker();
|
||||
void onClickRenderExceptions();
|
||||
void onClickAdvanced();
|
||||
void applyUIColor(LLUICtrl* ctrl, const LLSD& param);
|
||||
void getUIColor(LLUICtrl* ctrl, const LLSD& param);
|
||||
|
|
|
|||
|
|
@ -812,3 +812,99 @@ void LLMuteList::notifyObserversDetailed(const LLMute& mute)
|
|||
it = mObservers.upper_bound(observer);
|
||||
}
|
||||
}
|
||||
|
||||
LLRenderMuteList::LLRenderMuteList()
|
||||
{}
|
||||
|
||||
bool LLRenderMuteList::saveToFile()
|
||||
{
|
||||
std::string filename = gDirUtilp->getExpandedFilename(LL_PATH_PER_SL_ACCOUNT, "render_mute_settings.txt");
|
||||
LLFILE* fp = LLFile::fopen(filename, "wb");
|
||||
if (!fp)
|
||||
{
|
||||
LL_WARNS() << "Couldn't open render mute list file: " << filename << LL_ENDL;
|
||||
return false;
|
||||
}
|
||||
for (std::map<LLUUID, S32>::iterator it = sVisuallyMuteSettingsMap.begin(); it != sVisuallyMuteSettingsMap.end(); ++it)
|
||||
{
|
||||
if (it->second != 0)
|
||||
{
|
||||
std::string id_string;
|
||||
it->first.toString(id_string);
|
||||
fprintf(fp, "%d %s\n", (S32)it->second, id_string.c_str());
|
||||
}
|
||||
}
|
||||
fclose(fp);
|
||||
return true;
|
||||
}
|
||||
|
||||
bool LLRenderMuteList::loadFromFile()
|
||||
{
|
||||
std::string filename = gDirUtilp->getExpandedFilename(LL_PATH_PER_SL_ACCOUNT, "render_mute_settings.txt");
|
||||
LLFILE* fp = LLFile::fopen(filename, "rb");
|
||||
if (!fp)
|
||||
{
|
||||
LL_WARNS() << "Couldn't open render mute list file: " << filename << LL_ENDL;
|
||||
return false;
|
||||
}
|
||||
|
||||
char id_buffer[MAX_STRING];
|
||||
char buffer[MAX_STRING];
|
||||
while (!feof(fp) && fgets(buffer, MAX_STRING, fp))
|
||||
{
|
||||
id_buffer[0] = '\0';
|
||||
S32 setting = 0;
|
||||
sscanf(buffer, " %d %254s\n", &setting, id_buffer);
|
||||
sVisuallyMuteSettingsMap[LLUUID(id_buffer)] = setting;
|
||||
}
|
||||
fclose(fp);
|
||||
return true;
|
||||
}
|
||||
|
||||
void LLRenderMuteList::saveVisualMuteSetting(const LLUUID& agent_id, S32 setting)
|
||||
{
|
||||
if(setting == 0)
|
||||
{
|
||||
sVisuallyMuteSettingsMap.erase(agent_id);
|
||||
}
|
||||
else
|
||||
{
|
||||
sVisuallyMuteSettingsMap[agent_id] = setting;
|
||||
}
|
||||
saveToFile();
|
||||
notifyObservers();
|
||||
}
|
||||
|
||||
S32 LLRenderMuteList::getSavedVisualMuteSetting(const LLUUID& agent_id)
|
||||
{
|
||||
std::map<LLUUID, S32>::iterator iter = sVisuallyMuteSettingsMap.find(agent_id);
|
||||
if (iter != sVisuallyMuteSettingsMap.end())
|
||||
{
|
||||
return iter->second;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
void LLRenderMuteList::addObserver(LLMuteListObserver* observer)
|
||||
{
|
||||
mObservers.insert(observer);
|
||||
}
|
||||
|
||||
void LLRenderMuteList::removeObserver(LLMuteListObserver* observer)
|
||||
{
|
||||
mObservers.erase(observer);
|
||||
}
|
||||
|
||||
void LLRenderMuteList::notifyObservers()
|
||||
{
|
||||
for (observer_set_t::iterator it = mObservers.begin();
|
||||
it != mObservers.end();
|
||||
)
|
||||
{
|
||||
LLMuteListObserver* observer = *it;
|
||||
observer->onChange();
|
||||
// In case onChange() deleted an entry.
|
||||
it = mObservers.upper_bound(observer);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -175,5 +175,25 @@ public:
|
|||
virtual void onChangeDetailed(const LLMute& ) { }
|
||||
};
|
||||
|
||||
class LLRenderMuteList : public LLSingleton<LLRenderMuteList>
|
||||
{
|
||||
LLSINGLETON(LLRenderMuteList);
|
||||
public:
|
||||
bool loadFromFile();
|
||||
bool saveToFile();
|
||||
S32 getSavedVisualMuteSetting(const LLUUID& agent_id);
|
||||
void saveVisualMuteSetting(const LLUUID& agent_id, S32 setting);
|
||||
|
||||
void addObserver(LLMuteListObserver* observer);
|
||||
void removeObserver(LLMuteListObserver* observer);
|
||||
|
||||
std::map<LLUUID, S32> sVisuallyMuteSettingsMap;
|
||||
|
||||
private:
|
||||
void notifyObservers();
|
||||
typedef std::set<LLMuteListObserver*> observer_set_t;
|
||||
observer_set_t mObservers;
|
||||
};
|
||||
|
||||
|
||||
#endif //LL_MUTELIST_H
|
||||
|
|
|
|||
|
|
@ -967,6 +967,8 @@ bool idle_startup()
|
|||
// Load media plugin cookies
|
||||
LLViewerMedia::loadCookieFile();
|
||||
|
||||
LLRenderMuteList::getInstance()->loadFromFile();
|
||||
|
||||
//-------------------------------------------------
|
||||
// Handle startup progress screen
|
||||
//-------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -38,6 +38,7 @@
|
|||
#include "llfloaterautoreplacesettings.h"
|
||||
#include "llfloateravatar.h"
|
||||
#include "llfloateravatarpicker.h"
|
||||
#include "llfloateravatarrendersettings.h"
|
||||
#include "llfloateravatartextures.h"
|
||||
#include "llfloaterbigpreview.h"
|
||||
#include "llfloaterbeacons.h"
|
||||
|
|
@ -194,6 +195,7 @@ void LLViewerFloaterReg::registerFloaters()
|
|||
LLFloaterReg::add("auction", "floater_auction.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterAuction>);
|
||||
LLFloaterReg::add("avatar", "floater_avatar.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterAvatar>);
|
||||
LLFloaterReg::add("avatar_picker", "floater_avatar_picker.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterAvatarPicker>);
|
||||
LLFloaterReg::add("avatar_render_settings", "floater_avatar_render_settings.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterAvatarRenderSettings>);
|
||||
LLFloaterReg::add("avatar_textures", "floater_avatar_textures.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterAvatarTextures>);
|
||||
|
||||
LLFloaterReg::add("beacons", "floater_beacons.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterBeacons>);
|
||||
|
|
|
|||
|
|
@ -728,7 +728,7 @@ LLVOAvatar::LLVOAvatar(const LLUUID& id,
|
|||
LLSceneMonitor::getInstance()->freezeAvatar((LLCharacter*)this);
|
||||
}
|
||||
|
||||
mVisuallyMuteSetting = getSavedVisualMuteSettings();
|
||||
mVisuallyMuteSetting = LLVOAvatar::VisualMuteSettings(LLRenderMuteList::getInstance()->getSavedVisualMuteSetting(getID()));
|
||||
}
|
||||
|
||||
std::string LLVOAvatar::avString() const
|
||||
|
|
@ -7076,7 +7076,9 @@ BOOL LLVOAvatar::isFullyLoaded() const
|
|||
bool LLVOAvatar::isTooComplex() const
|
||||
{
|
||||
bool too_complex;
|
||||
if (isSelf() || mVisuallyMuteSetting == AV_ALWAYS_RENDER)
|
||||
bool render_friend = (LLAvatarTracker::instance().isBuddy(getID()) && gSavedSettings.getBOOL("AlwaysRenderFriends"));
|
||||
|
||||
if (isSelf() || render_friend || mVisuallyMuteSetting == AV_ALWAYS_RENDER)
|
||||
{
|
||||
too_complex = false;
|
||||
}
|
||||
|
|
@ -9230,25 +9232,12 @@ 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;
|
||||
LLRenderMuteList::getInstance()->saveVisualMuteSetting(getID(), S32(set));
|
||||
}
|
||||
|
||||
void LLVOAvatar::calcMutedAVColor()
|
||||
|
|
|
|||
|
|
@ -407,7 +407,6 @@ public:
|
|||
};
|
||||
void setVisualMuteSettings(VisualMuteSettings set);
|
||||
VisualMuteSettings getVisualMuteSettings() { return mVisuallyMuteSetting; };
|
||||
VisualMuteSettings getSavedVisualMuteSettings();
|
||||
|
||||
U32 renderRigid();
|
||||
U32 renderSkinned();
|
||||
|
|
@ -441,7 +440,6 @@ public:
|
|||
|
||||
VisualMuteSettings mVisuallyMuteSetting; // Always or never visually mute this AV
|
||||
|
||||
static std::map<LLUUID, VisualMuteSettings> sVisuallyMuteSettingsMap;
|
||||
//--------------------------------------------------------------------
|
||||
// Morph masks
|
||||
//--------------------------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -0,0 +1,55 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
|
||||
<floater
|
||||
can_resize="true"
|
||||
positioning="cascading"
|
||||
height="200"
|
||||
min_height="100"
|
||||
min_width="230"
|
||||
layout="topleft"
|
||||
name="floater_avatar_render_settings"
|
||||
save_rect="true"
|
||||
single_instance="true"
|
||||
reuse_instance="true"
|
||||
title="AVATAR RENDER SETTINGS"
|
||||
width="300">
|
||||
<string
|
||||
name="av_never_render"
|
||||
value="Never"/>
|
||||
<string
|
||||
name="av_always_render"
|
||||
value="Always"/>
|
||||
<filter_editor
|
||||
follows="left|top|right"
|
||||
height="23"
|
||||
layout="topleft"
|
||||
left="8"
|
||||
right="-8"
|
||||
label="Filter People"
|
||||
max_length_chars="300"
|
||||
name="people_filter_input"
|
||||
text_color="Black"
|
||||
text_pad_left="10"
|
||||
top="4" />
|
||||
<name_list
|
||||
allow_select="true"
|
||||
bottom="-8"
|
||||
draw_heading="true"
|
||||
opaque="true"
|
||||
follows="all"
|
||||
left="8"
|
||||
keep_selection_visible_on_reshape="true"
|
||||
item_pad="2"
|
||||
multi_select="false"
|
||||
name="render_settings_list"
|
||||
right="-8"
|
||||
top="32">
|
||||
<name_list.columns
|
||||
label="Name"
|
||||
name="name"
|
||||
relative_width="0.65" />
|
||||
<name_list.columns
|
||||
label="Render setting"
|
||||
name="setting"
|
||||
relative_width="0.35" />
|
||||
</name_list>
|
||||
</floater>
|
||||
|
|
@ -130,10 +130,13 @@
|
|||
</menu_item_call>
|
||||
|
||||
<menu_item_separator />
|
||||
|
||||
<context_menu
|
||||
label="Render Avatar"
|
||||
layout="topleft"
|
||||
name="Render Avatar">
|
||||
<menu_item_check
|
||||
name="RenderNormally"
|
||||
label="Render Normally">
|
||||
label="Default">
|
||||
<menu_item_check.on_check
|
||||
function="Avatar.CheckImpostorMode"
|
||||
parameter="0" />
|
||||
|
|
@ -141,19 +144,9 @@
|
|||
function="Avatar.SetImpostorMode"
|
||||
parameter="0" />
|
||||
</menu_item_check>
|
||||
<menu_item_check
|
||||
name="DoNotRender"
|
||||
label="Do Not Render">
|
||||
<menu_item_check.on_check
|
||||
function="Avatar.CheckImpostorMode"
|
||||
parameter="1" />
|
||||
<menu_item_check.on_click
|
||||
function="Avatar.SetImpostorMode"
|
||||
parameter="1" />
|
||||
</menu_item_check>
|
||||
<menu_item_check
|
||||
name="AlwaysRenderFully"
|
||||
label="Render Fully">
|
||||
label="Always">
|
||||
<menu_item_check.on_check
|
||||
function="Avatar.CheckImpostorMode"
|
||||
parameter="2" />
|
||||
|
|
@ -161,7 +154,17 @@
|
|||
function="Avatar.SetImpostorMode"
|
||||
parameter="2" />
|
||||
</menu_item_check>
|
||||
|
||||
<menu_item_check
|
||||
name="DoNotRender"
|
||||
label="Never">
|
||||
<menu_item_check.on_check
|
||||
function="Avatar.CheckImpostorMode"
|
||||
parameter="1" />
|
||||
<menu_item_check.on_click
|
||||
function="Avatar.SetImpostorMode"
|
||||
parameter="1" />
|
||||
</menu_item_check>
|
||||
</context_menu>
|
||||
<menu_item_separator
|
||||
layout="topleft" name="Impostor seperator"/>
|
||||
|
||||
|
|
|
|||
|
|
@ -121,9 +121,13 @@
|
|||
|
||||
<menu_item_separator />
|
||||
|
||||
<context_menu
|
||||
label="Render Avatar"
|
||||
layout="topleft"
|
||||
name="Render Avatar">
|
||||
<menu_item_check
|
||||
name="RenderNormally"
|
||||
label="Render Normally">
|
||||
label="Default">
|
||||
<menu_item_check.on_check
|
||||
function="Avatar.CheckImpostorMode"
|
||||
parameter="0" />
|
||||
|
|
@ -131,19 +135,9 @@
|
|||
function="Avatar.SetImpostorMode"
|
||||
parameter="0" />
|
||||
</menu_item_check>
|
||||
<menu_item_check
|
||||
name="DoNotRender"
|
||||
label="Do Not Render">
|
||||
<menu_item_check.on_check
|
||||
function="Avatar.CheckImpostorMode"
|
||||
parameter="1" />
|
||||
<menu_item_check.on_click
|
||||
function="Avatar.SetImpostorMode"
|
||||
parameter="1" />
|
||||
</menu_item_check>
|
||||
<menu_item_check
|
||||
name="AlwaysRenderFully"
|
||||
label="Render Fully">
|
||||
label="Always">
|
||||
<menu_item_check.on_check
|
||||
function="Avatar.CheckImpostorMode"
|
||||
parameter="2" />
|
||||
|
|
@ -151,6 +145,17 @@
|
|||
function="Avatar.SetImpostorMode"
|
||||
parameter="2" />
|
||||
</menu_item_check>
|
||||
<menu_item_check
|
||||
name="DoNotRender"
|
||||
label="Never">
|
||||
<menu_item_check.on_check
|
||||
function="Avatar.CheckImpostorMode"
|
||||
parameter="1" />
|
||||
<menu_item_check.on_click
|
||||
function="Avatar.SetImpostorMode"
|
||||
parameter="1" />
|
||||
</menu_item_check>
|
||||
</context_menu>
|
||||
|
||||
<menu_item_separator
|
||||
layout="topleft" name="Impostor seperator"/>
|
||||
|
|
|
|||
|
|
@ -0,0 +1,26 @@
|
|||
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
|
||||
<context_menu
|
||||
layout="topleft"
|
||||
name="Settings">
|
||||
<menu_item_check
|
||||
label="Default"
|
||||
layout="topleft"
|
||||
name="default">
|
||||
<on_click function="Settings.SetRendering" parameter="default"/>
|
||||
<on_check function="Settings.IsSelected" parameter="default" />
|
||||
</menu_item_check>
|
||||
<menu_item_check
|
||||
label="Always render"
|
||||
layout="topleft"
|
||||
name="always_render">
|
||||
<on_click function="Settings.SetRendering" parameter="always"/>
|
||||
<on_check function="Settings.IsSelected" parameter="always" />
|
||||
</menu_item_check>
|
||||
<menu_item_check
|
||||
label="Never render"
|
||||
layout="topleft"
|
||||
name="never_render">
|
||||
<on_click function="Settings.SetRendering" parameter="never"/>
|
||||
<on_check function="Settings.IsSelected" parameter="never" />
|
||||
</menu_item_check>
|
||||
</context_menu>
|
||||
|
|
@ -231,41 +231,6 @@
|
|||
m
|
||||
</text>
|
||||
|
||||
<slider
|
||||
control_name="IndirectMaxComplexity"
|
||||
tool_tip="Controls at what point a visually complex avatar is drawn as a JellyDoll"
|
||||
follows="left|top"
|
||||
height="16"
|
||||
initial_value="101"
|
||||
increment="1"
|
||||
label="Avatar Maximum Complexity:"
|
||||
label_width="165"
|
||||
layout="topleft"
|
||||
left="30"
|
||||
min_val="1"
|
||||
max_val="101"
|
||||
name="IndirectMaxComplexity"
|
||||
show_text="false"
|
||||
top_delta="24"
|
||||
width="300">
|
||||
<slider.commit_callback
|
||||
function="Pref.UpdateIndirectMaxComplexity"
|
||||
parameter="IndirectMaxComlexityText" />
|
||||
</slider>
|
||||
<text
|
||||
type="string"
|
||||
length="1"
|
||||
follows="left|top"
|
||||
height="16"
|
||||
layout="topleft"
|
||||
top_delta="0"
|
||||
left_delta="304"
|
||||
text_readonly_color="LabelDisabledColor"
|
||||
name="IndirectMaxComplexityText"
|
||||
width="65">
|
||||
0
|
||||
</text>
|
||||
|
||||
<check_box
|
||||
control_name="WindLightUseAtmosShaders"
|
||||
height="16"
|
||||
|
|
@ -293,6 +258,65 @@
|
|||
<check_box.commit_callback
|
||||
function="Pref.VertexShaderEnable" />
|
||||
</check_box>
|
||||
|
||||
<slider
|
||||
control_name="IndirectMaxComplexity"
|
||||
tool_tip="Controls at what point a visually complex avatar is drawn as a JellyDoll"
|
||||
follows="left|top"
|
||||
height="16"
|
||||
initial_value="101"
|
||||
increment="1"
|
||||
label="Avatar Maximum Complexity:"
|
||||
label_width="165"
|
||||
layout="topleft"
|
||||
left="30"
|
||||
min_val="1"
|
||||
max_val="101"
|
||||
name="IndirectMaxComplexity"
|
||||
show_text="false"
|
||||
top_delta="60"
|
||||
width="300">
|
||||
<slider.commit_callback
|
||||
function="Pref.UpdateIndirectMaxComplexity"
|
||||
parameter="IndirectMaxComlexityText" />
|
||||
</slider>
|
||||
<text
|
||||
type="string"
|
||||
length="1"
|
||||
follows="left|top"
|
||||
height="16"
|
||||
layout="topleft"
|
||||
top_delta="0"
|
||||
left_delta="304"
|
||||
text_readonly_color="LabelDisabledColor"
|
||||
name="IndirectMaxComplexityText"
|
||||
width="65">
|
||||
0
|
||||
</text>
|
||||
<check_box
|
||||
control_name="AlwaysRenderFriends"
|
||||
height="16"
|
||||
initial_value="true"
|
||||
label="Always Render Friends"
|
||||
layout="topleft"
|
||||
left="30"
|
||||
name="AlwaysRenderFriends"
|
||||
top_delta="24"
|
||||
width="256">
|
||||
<check_box.commit_callback
|
||||
function="Pref.RenderFriends" />
|
||||
</check_box>
|
||||
<button
|
||||
height="23"
|
||||
label="Exceptions..."
|
||||
layout="topleft"
|
||||
left="48"
|
||||
name="RenderExceptionsButton"
|
||||
top_delta="24"
|
||||
width="100">
|
||||
<button.commit_callback
|
||||
function="Pref.RenderExceptions"/>
|
||||
</button>
|
||||
|
||||
<!-- End of Basic Settings block -->
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue