diff --git a/doc/FS_PR_GUIDELINES.md b/CONTRIBUTING.md similarity index 57% rename from doc/FS_PR_GUIDELINES.md rename to CONTRIBUTING.md index 10d858dffa..6cabb793d7 100644 --- a/doc/FS_PR_GUIDELINES.md +++ b/CONTRIBUTING.md @@ -4,16 +4,16 @@ Thank you for submitting code to Firestorm; we will review it and merge or provi We have written this guide to help you contribute code that meets our needs. It will hopefully reduce the number of iterations required before we can merge the code. 1. **Descriptive Title**: -   - Use a clear and descriptive title for the PR. + Use a clear and descriptive title for the PR. 1. **Related Issues**: -   - Reference any related issues or pull requests by including the JIRA number and description in the commit message header (e.g., `[FIRE-12345] When I click, my head falls off` or `[FIRE-12345] prevent click detaching head`). + Reference any related issues or pull requests by including the JIRA number and description in the commit message header (e.g., `[FIRE-12345] When I click, my head falls off` or `[FIRE-12345] prevent click detaching head`). 1. **Description**: -   - Provide a detailed description of the changes. Explain why the changes are necessary and what problem they solve. If a JIRA is associated with the change, there is no need to duplicate that, but we would appreciate a summary and explanation of the fix. + Provide a detailed description of the changes. Explain why the changes are necessary and what problem they solve. If a JIRA is associated with the change, there is no need to duplicate that, but we would appreciate a summary and explanation of the fix. 1. **Comment tags (important)**: -   - We use comments to preserve the original upstream (LL) code when making modifications; this allows the person merging future code updates to see both the original code from LL and any new updates and then use those to determine whether the FS-specific changes need to be updated and reviewed. + We use comments to preserve the original upstream (LL) code when making modifications; this allows the person merging future code updates to see both the original code from LL and any new updates and then use those to determine whether the FS-specific changes need to be updated and reviewed. If you are modifying LL code, we need the LL code preserved in a comment. For example: @@ -38,16 +38,16 @@ Would become: If you add new code, the same rules apply, but there is nothing to comment out. This is done so that when LL updates the original code, we can see what the original code was doing, what their changes do, and how that relates to the changes that we applied on top. - A single line change can use the shorthand ``: + A single line change can use the shorthand ``: ```c++ -    bool break_stuff=true; +    bool break_stuff = true; ``` Could be fixed as follows: ```c++ -    bool break_stuff=false; // [FIRE-23456] don't break stuff. +    bool break_stuff = false; // [FIRE-23456] don't break stuff. ``` The Comment tags are only required when changing code maintained upstream. If the code you are changing is in an FS-created file, RLV code, OpenSim-only code, etc., then we do not need the comments. @@ -55,9 +55,9 @@ Could be fixed as follows: If the code you are changing is already inside an `//` comment block, then there is no need to add a new block, but do try to make sure that any comments align with the updates you make. 5. **Testing**: -   - Include details on how the changes should be tested. Describe the testing environment and any steps needed to verify the changes. + Include details on how the changes should be tested. Describe the testing environment and any steps needed to verify the changes. 1. **Documentation**: -   - If the change includes a new feature, it would be beneficial to suggest how we should update the FS Wiki pages to help users understand the feature + If the change includes a new feature, it would be beneficial to suggest how we should update the FS Wiki pages to help users understand the feature Thank you for your contribution! diff --git a/README.md b/README.md index a60954a276..1d918c3743 100644 --- a/README.md +++ b/README.md @@ -25,4 +25,12 @@ Build instructions for each operating system can be found using the links below ## Contribute -Help make Firestorm better! You can get involved with improvements by filing bugs and suggesting enhancements via [JIRA](https://jira.firestormviewer.org) or [creating pull requests](doc/FS_PR_GUIDELINES.md). +Help make Firestorm better! You can get involved with improvements by filing bugs and suggesting enhancements via [JIRA](https://jira.firestormviewer.org) or [creating pull requests](CONTRIBUTING.md). + +## Community respect + +This section is guided by the [TPV Policy](https://secondlife.com/corporate/third-party-viewers) and the [Second Life Code of Conduct](https://github.com/secondlife/viewer?tab=coc-ov-file). + +Firestorm code is made available during ongoing development, with the **master** branch representing the current nightly build. Developers and self-compilers are encouraged to work on their own forks and contribute back via pull requests, as detailed in the [contributing guide](CONTRIBUTING.md). + +If you intend to use our code for your own viewer beyond personal use, please only use code from official release branches (for example, `Firestorm_7.1.13`), rather than from pre-release/preview or nightly builds. diff --git a/indra/newview/NACLfloaterexploresounds.cpp b/indra/newview/NACLfloaterexploresounds.cpp index a58695824b..d1505a63c8 100644 --- a/indra/newview/NACLfloaterexploresounds.cpp +++ b/indra/newview/NACLfloaterexploresounds.cpp @@ -16,7 +16,7 @@ #include "fscommon.h" #include "rlvhandler.h" -static const size_t num_collision_sounds = 28; +constexpr size_t num_collision_sounds = 28; const LLUUID collision_sounds[num_collision_sounds] = { LLUUID("dce5fdd4-afe4-4ea1-822f-dd52cac46b08"), @@ -73,8 +73,11 @@ bool NACLFloaterExploreSounds::postBuild() getChild("play_locally_btn")->setClickedCallback(boost::bind(&NACLFloaterExploreSounds::handlePlayLocally, this)); getChild("look_at_btn")->setClickedCallback(boost::bind(&NACLFloaterExploreSounds::handleLookAt, this)); getChild("stop_btn")->setClickedCallback(boost::bind(&NACLFloaterExploreSounds::handleStop, this)); - getChild("bl_btn")->setClickedCallback(boost::bind(&NACLFloaterExploreSounds::blacklistSound, this)); + getChild("bl_btn")->setClickedCallback(boost::bind(&NACLFloaterExploreSounds::blacklistSound, this, FSAssetBlacklist::eBlacklistFlag::NONE)); getChild("stop_locally_btn")->setClickedCallback(boost::bind(&NACLFloaterExploreSounds::handleStopLocally, this)); + getChild("block_avatar_worn_sounds_btn")->setClickedCallback(boost::bind(&NACLFloaterExploreSounds::blacklistSound, this, FSAssetBlacklist::eBlacklistFlag::WORN)); + getChild("block_avatar_rezzed_sounds_btn")->setClickedCallback(boost::bind(&NACLFloaterExploreSounds::blacklistSound, this, FSAssetBlacklist::eBlacklistFlag::REZZED)); + getChild("block_avatar_gesture_sounds_btn")->setClickedCallback(boost::bind(&NACLFloaterExploreSounds::blacklistSound, this, FSAssetBlacklist::eBlacklistFlag::GESTURE)); mHistoryScroller = getChild("sound_list"); mHistoryScroller->setCommitCallback(boost::bind(&NACLFloaterExploreSounds::handleSelection, this)); @@ -98,31 +101,26 @@ void NACLFloaterExploreSounds::handleSelection() childSetEnabled("play_locally_btn", num_selected); childSetEnabled("stop_btn", num_selected); childSetEnabled("bl_btn", num_selected); + childSetEnabled("block_avatar_worn_sounds_btn", num_selected); + childSetEnabled("block_avatar_rezzed_sounds_btn", num_selected); + childSetEnabled("block_avatar_gesture_sounds_btn", num_selected); } -LLSoundHistoryItem NACLFloaterExploreSounds::getItem(const LLUUID& itemID) +LLSoundHistoryItem NACLFloaterExploreSounds::getItem(const LLUUID& itemID) const { - std::map::iterator found = gSoundHistory.find(itemID); - if (found != gSoundHistory.end()) + if (auto found = gSoundHistory.find(itemID); found != gSoundHistory.end()) { return found->second; } else { // If log is paused, hopefully we can find it in mLastHistory - std::list::iterator iter = mLastHistory.begin(); - std::list::iterator end = mLastHistory.end(); - for ( ; iter != end; ++iter) - { - if ((*iter).mID == itemID) - { - return (*iter); - } - } + if (auto foundHistory = std::find_if(mLastHistory.begin(), mLastHistory.end(), [&](const auto& item) { return item.mID == itemID; }); + foundHistory != mLastHistory.end()) + return *foundHistory; } - LLSoundHistoryItem item; - item.mID = LLUUID::null; - return item; + + return {}; } class LLSoundHistoryItemCompare @@ -175,11 +173,9 @@ bool NACLFloaterExploreSounds::tick() } else { - std::map::iterator map_iter = gSoundHistory.begin(); - std::map::iterator map_end = gSoundHistory.end(); - for ( ; map_iter != map_end; ++map_iter) + for (const auto& [id, item] : gSoundHistory) { - history.push_back((*map_iter).second); + history.emplace_back(item); } LLSoundHistoryItemCompare c; history.sort(c); @@ -189,24 +185,16 @@ bool NACLFloaterExploreSounds::tick() // Save scroll pos and selection so they can be restored S32 scroll_pos = mHistoryScroller->getScrollPos(); uuid_vec_t selected_ids; - std::vector selected_items = mHistoryScroller->getAllSelected(); - std::vector::iterator selection_iter = selected_items.begin(); - std::vector::iterator selection_end = selected_items.end(); - for (; selection_iter != selection_end; ++selection_iter) + for (const auto* item : mHistoryScroller->getAllSelected()) { - selected_ids.push_back((*selection_iter)->getUUID()); + selected_ids.emplace_back(item->getUUID()); } mHistoryScroller->clearRows(); - std::list unique_asset_list; - - std::list::iterator iter = history.begin(); - std::list::iterator end = history.end(); - for ( ; iter != end; ++iter) + std::unordered_set unique_asset_list; + for (auto& item : history) { - LLSoundHistoryItem item = (*iter); - bool is_avatar = item.mOwnerID == item.mSourceID; if (is_avatar && !show_avatars) { @@ -219,7 +207,7 @@ bool NACLFloaterExploreSounds::tick() continue; } - bool is_repeated_asset = std::find(unique_asset_list.begin(), unique_asset_list.end(), item.mAssetID) != unique_asset_list.end(); + bool is_repeated_asset = unique_asset_list.contains(item.mAssetID); if (is_repeated_asset && !show_repeated_assets) { continue; @@ -237,7 +225,7 @@ bool NACLFloaterExploreSounds::tick() continue; } - unique_asset_list.push_back(item.mAssetID); + unique_asset_list.emplace(item.mAssetID); LLSD element; element["id"] = item.mID; @@ -315,26 +303,17 @@ bool NACLFloaterExploreSounds::tick() mHistoryScroller->setScrollPos(scroll_pos); // Clean up stopped local audio source IDs - uuid_vec_t stopped_audio_src_ids; uuid_vec_t::iterator audio_src_id_iter = mLocalPlayingAudioSourceIDs.begin(); - uuid_vec_t::iterator audio_src_id_end = mLocalPlayingAudioSourceIDs.end(); - for (; audio_src_id_iter != audio_src_id_end; ++audio_src_id_iter) + while (audio_src_id_iter != mLocalPlayingAudioSourceIDs.end()) { - LLUUID audio_src_id = *audio_src_id_iter; - LLAudioSource* audio_source = gAudiop->findAudioSource(audio_src_id); - if (!audio_source || audio_source->isDone()) + const LLUUID& audio_src_id = *audio_src_id_iter; + if (LLAudioSource* audio_source = gAudiop->findAudioSource(audio_src_id); !audio_source || audio_source->isDone()) { - stopped_audio_src_ids.push_back(audio_src_id); + audio_src_id_iter = mLocalPlayingAudioSourceIDs.erase(audio_src_id_iter); } - } - - for (uuid_vec_t::iterator stopped_audio_src_ids_iter = stopped_audio_src_ids.begin(); - stopped_audio_src_ids_iter != stopped_audio_src_ids.end(); ++stopped_audio_src_ids_iter) - { - uuid_vec_t::iterator find_iter = std::find(mLocalPlayingAudioSourceIDs.begin(), mLocalPlayingAudioSourceIDs.end(), *stopped_audio_src_ids_iter); - if (find_iter != mLocalPlayingAudioSourceIDs.end()) + else { - mLocalPlayingAudioSourceIDs.erase(find_iter); + audio_src_id_iter++; } } @@ -345,29 +324,26 @@ bool NACLFloaterExploreSounds::tick() void NACLFloaterExploreSounds::handlePlayLocally() { - std::vector selection = mHistoryScroller->getAllSelected(); - std::vector::iterator selection_iter = selection.begin(); - std::vector::iterator selection_end = selection.end(); - uuid_vec_t asset_list; - for ( ; selection_iter != selection_end; ++selection_iter) + std::unordered_set asset_list; + for (const auto* selected_item : mHistoryScroller->getAllSelected()) { - LLSoundHistoryItem item = getItem((*selection_iter)->getValue()); + LLSoundHistoryItem item = getItem(selected_item->getValue()); if (item.mID.isNull()) { continue; } // Unique assets only - if (std::find(asset_list.begin(), asset_list.end(), item.mAssetID) == asset_list.end()) + if (!asset_list.contains(item.mAssetID)) { - asset_list.push_back(item.mAssetID); + asset_list.emplace(item.mAssetID); LLUUID audio_source_id = LLUUID::generateNewID(); gAudiop->triggerSound(item.mAssetID, gAgent.getID(), 1.0f, LLAudioEngine::AUDIO_TYPE_UI, LLVector3d::zero, LLUUID::null, audio_source_id); - mLocalPlayingAudioSourceIDs.push_back(audio_source_id); + mLocalPlayingAudioSourceIDs.emplace_back(audio_source_id); } } - childSetEnabled("stop_locally_btn", mLocalPlayingAudioSourceIDs.size() > 0); + childSetEnabled("stop_locally_btn", !mLocalPlayingAudioSourceIDs.empty()); } void NACLFloaterExploreSounds::handleLookAt() @@ -407,14 +383,12 @@ void NACLFloaterExploreSounds::handleLookAt() void NACLFloaterExploreSounds::handleStop() { - std::vector selection = mHistoryScroller->getAllSelected(); - for (const auto& selection_item : selection) + for (const auto& selection_item : mHistoryScroller->getAllSelected()) { LLSoundHistoryItem item = getItem(selection_item->getValue()); if (item.mID.notNull() && item.mPlaying) { - LLAudioSource* audio_source = gAudiop->findAudioSource(item.mSourceID); - if (audio_source) + if (LLAudioSource* audio_source = gAudiop->findAudioSource(item.mSourceID)) { S32 type = item.mType; audio_source->setType(LLAudioEngine::AUDIO_TYPE_UI); @@ -449,13 +423,9 @@ void NACLFloaterExploreSounds::handleStop() void NACLFloaterExploreSounds::handleStopLocally() { - uuid_vec_t::iterator audio_source_id_iter = mLocalPlayingAudioSourceIDs.begin(); - uuid_vec_t::iterator audio_source_id_end = mLocalPlayingAudioSourceIDs.end(); - for (; audio_source_id_iter != audio_source_id_end; ++audio_source_id_iter) + for (const auto& audio_source_id : mLocalPlayingAudioSourceIDs) { - LLUUID audio_source_id = *audio_source_id_iter; - LLAudioSource* audio_source = gAudiop->findAudioSource(audio_source_id); - if (audio_source && !audio_source->isDone()) + if (LLAudioSource* audio_source = gAudiop->findAudioSource(audio_source_id); audio_source && !audio_source->isDone()) { audio_source->play(LLUUID::null); } @@ -465,51 +435,44 @@ void NACLFloaterExploreSounds::handleStopLocally() } //add sound to blacklist -void NACLFloaterExploreSounds::blacklistSound() +void NACLFloaterExploreSounds::blacklistSound(FSAssetBlacklist::eBlacklistFlag flag) { - std::vector selection = mHistoryScroller->getAllSelected(); - std::vector::iterator selection_iter = selection.begin(); - std::vector::iterator selection_end = selection.end(); - - for ( ; selection_iter != selection_end; ++selection_iter) + for (const auto* selected_item : mHistoryScroller->getAllSelected()) { - LLSoundHistoryItem item = getItem((*selection_iter)->getValue()); + LLSoundHistoryItem item = getItem(selected_item->getValue()); if (item.mID.isNull()) { continue; } std::string region_name; - LLViewerRegion* cur_region = gAgent.getRegion(); - if (cur_region) + if (LLViewerRegion* cur_region = gAgent.getRegion()) { region_name = cur_region->getName(); } - blacklist_avatar_name_cache_connection_map_t::iterator it = mBlacklistAvatarNameCacheConnections.find(item.mOwnerID); - if (it != mBlacklistAvatarNameCacheConnections.end()) + if (LLAvatarName av_name; LLAvatarNameCache::get(item.mOwnerID, &av_name)) { - if (it->second.connected()) - { - it->second.disconnect(); - } - mBlacklistAvatarNameCacheConnections.erase(it); + FSAssetBlacklist::getInstance()->addNewItemToBlacklist(flag == FSAssetBlacklist::eBlacklistFlag::NONE ? item.mAssetID : item.mOwnerID, av_name.getCompleteName(), region_name, LLAssetType::AT_SOUND, flag); + } + else + { + // Create unique UUID here instead of avatar UUID because we might be blacklisting more than one sound of the same user + LLUUID requestId = LLUUID::generateNewID(); + mBlacklistAvatarNameCacheConnections.try_emplace(requestId, LLAvatarNameCache::get(item.mOwnerID, boost::bind(&NACLFloaterExploreSounds::onBlacklistAvatarNameCacheCallback, this, requestId, _1, _2, item.mAssetID, region_name, flag))); } - LLAvatarNameCache::callback_connection_t cb = LLAvatarNameCache::get(item.mOwnerID, boost::bind(&NACLFloaterExploreSounds::onBlacklistAvatarNameCacheCallback, this, _1, _2, item.mAssetID, region_name)); - mBlacklistAvatarNameCacheConnections.insert(std::make_pair(item.mOwnerID, cb)); } } -void NACLFloaterExploreSounds::onBlacklistAvatarNameCacheCallback(const LLUUID& av_id, const LLAvatarName& av_name, const LLUUID& asset_id, const std::string& region_name) +void NACLFloaterExploreSounds::onBlacklistAvatarNameCacheCallback(const LLUUID& request_id, const LLUUID& av_id, const LLAvatarName& av_name, const LLUUID& asset_id, const std::string& region_name, FSAssetBlacklist::eBlacklistFlag flag) { - blacklist_avatar_name_cache_connection_map_t::iterator it = mBlacklistAvatarNameCacheConnections.find(av_id); - if (it != mBlacklistAvatarNameCacheConnections.end()) + if (auto found = mBlacklistAvatarNameCacheConnections.find(request_id); found != mBlacklistAvatarNameCacheConnections.end()) { - if (it->second.connected()) + if (found->second.connected()) { - it->second.disconnect(); + found->second.disconnect(); } - mBlacklistAvatarNameCacheConnections.erase(it); + mBlacklistAvatarNameCacheConnections.erase(found); } - FSAssetBlacklist::getInstance()->addNewItemToBlacklist(asset_id, av_name.getCompleteName(), region_name, LLAssetType::AT_SOUND); + FSAssetBlacklist::getInstance()->addNewItemToBlacklist(flag == FSAssetBlacklist::eBlacklistFlag::NONE ? asset_id : av_id, av_name.getCompleteName(), region_name, LLAssetType::AT_SOUND, flag); } diff --git a/indra/newview/NACLfloaterexploresounds.h b/indra/newview/NACLfloaterexploresounds.h index 1edce5fe09..bab842a742 100644 --- a/indra/newview/NACLfloaterexploresounds.h +++ b/indra/newview/NACLfloaterexploresounds.h @@ -9,6 +9,7 @@ #include "lleventtimer.h" #include "llaudioengine.h" #include "llavatarnamecache.h" +#include "fsassetblacklist.h" class LLCheckBoxCtrl; class LLScrollListCtrl; @@ -22,7 +23,7 @@ public: bool tick() override; - LLSoundHistoryItem getItem(const LLUUID& itemID); + LLSoundHistoryItem getItem(const LLUUID& itemID) const; private: virtual ~NACLFloaterExploreSounds(); @@ -31,14 +32,14 @@ private: void handleStop(); void handleStopLocally(); void handleSelection(); - void blacklistSound(); + void blacklistSound(FSAssetBlacklist::eBlacklistFlag flag); - LLScrollListCtrl* mHistoryScroller; - LLCheckBoxCtrl* mCollisionSounds; - LLCheckBoxCtrl* mRepeatedAssets; - LLCheckBoxCtrl* mAvatarSounds; - LLCheckBoxCtrl* mObjectSounds; - LLCheckBoxCtrl* mPaused; + LLScrollListCtrl* mHistoryScroller{ nullptr }; + LLCheckBoxCtrl* mCollisionSounds{ nullptr }; + LLCheckBoxCtrl* mRepeatedAssets{ nullptr }; + LLCheckBoxCtrl* mAvatarSounds{ nullptr }; + LLCheckBoxCtrl* mObjectSounds{ nullptr }; + LLCheckBoxCtrl* mPaused{ nullptr }; std::list mLastHistory; @@ -47,7 +48,7 @@ private: typedef std::map blacklist_avatar_name_cache_connection_map_t; blacklist_avatar_name_cache_connection_map_t mBlacklistAvatarNameCacheConnections; - void onBlacklistAvatarNameCacheCallback(const LLUUID& av_id, const LLAvatarName& av_name, const LLUUID& asset_id, const std::string& region_name); + void onBlacklistAvatarNameCacheCallback(const LLUUID& request_id, const LLUUID& av_id, const LLAvatarName& av_name, const LLUUID& asset_id, const std::string& region_name, FSAssetBlacklist::eBlacklistFlag flag); }; #endif diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 901db4ef92..92436b5c59 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -26410,5 +26410,271 @@ Change of this parameter will affect the layout of buttons in notification toast Value 0 + + FSAreaSearch_ExcludeAttachments + + Comment + Area Search Filter: Exclude attachments + Persist + 1 + Type + Boolean + Value + 1 + + FSAreaSearch_ExcludeChildPrims + + Comment + Area Search Filter: Exclude child prims + Persist + 1 + Type + Boolean + Value + 1 + + FSAreaSearch_ExcludeNeighborRegions + + Comment + Area Search Filter: Exclude neighbor regions + Persist + 1 + Type + Boolean + Value + 1 + + FSAreaSearch_ExcludePhysical + + Comment + Area Search Filter: Exclude physical objects + Persist + 1 + Type + Boolean + Value + 1 + + FSAreaSearch_ExcludeReflectionProbes + + Comment + Area Search Filter: Exclude reflection probes + Persist + 1 + Type + Boolean + Value + 0 + + FSAreaSearch_ExcludeTemporary + + Comment + Area Search Filter: Exclude temporary objects + Persist + 1 + Type + Boolean + Value + 1 + + FSAreaSearch_FilterDistance + + Comment + Area Search Filter: Filter by distance + Persist + 1 + Type + Boolean + Value + 0 + + FSAreaSearch_FilterForSale + + Comment + Area Search Filter: Only show objects that are for sale + Persist + 1 + Type + Boolean + Value + 0 + + FSAreaSearch_MaximumDistance + + Comment + Area Search Filter: Maximum distance + Persist + 1 + Type + S32 + Value + 999999 + + FSAreaSearch_MaximumPrice + + Comment + Area Search Filter: Maximum price + Persist + 1 + Type + S32 + Value + 999999 + + FSAreaSearch_MinimumDistance + + Comment + Area Search Filter: Minimum distance + Persist + 1 + Type + S32 + Value + 0 + + FSAreaSearch_MinimumPrice + + Comment + Area Search Filter: Minimum price + Persist + 1 + Type + S32 + Value + 0 + + FSAreaSearch_OnlyAttachments + + Comment + Area Search Filter: Find only attachments + Persist + 1 + Type + Boolean + Value + 0 + + FSAreaSearch_OnlyCopiable + + Comment + Area Search Filter: Find only copiable objects + Persist + 1 + Type + Boolean + Value + 0 + + FSAreaSearch_OnlyCurrentParcel + + Comment + Area Search Filter: Find only objects in the current parcel + Persist + 1 + Type + Boolean + Value + 0 + + FSAreaSearch_OnlyForSale + + Comment + Area Search Filter: Find only objects that are for sale + Persist + 1 + Type + Boolean + Value + 0 + + FSAreaSearch_OnlyLocked + + Comment + Area Search Filter: Find only locked objects + Persist + 1 + Type + Boolean + Value + 0 + + FSAreaSearch_OnlyMOAP + + Comment + Area Search Filter: Find only objects that have shared media applied + Persist + 1 + Type + Boolean + Value + 0 + + FSAreaSearch_OnlyModifiable + + Comment + Area Search Filter: Find only modifiable objects + Persist + 1 + Type + Boolean + Value + 0 + + FSAreaSearch_OnlyPhantom + + Comment + Area Search Filter: Find only phantom objects + Persist + 1 + Type + Boolean + Value + 0 + + FSAreaSearch_OnlyPhysical + + Comment + Area Search Filter: Find only physical objects + Persist + 1 + Type + Boolean + Value + 0 + + FSAreaSearch_OnlyReflectionProbes + + Comment + Area Search Filter: Find only reflection probes + Persist + 1 + Type + Boolean + Value + 0 + + FSAreaSearch_OnlyTemporary + + Comment + Area Search Filter: Find only temporary objects + Persist + 1 + Type + Boolean + Value + 0 + + FSAreaSearch_OnlyTransferable + + Comment + Area Search Filter: Find only transferable objects + Persist + 1 + Type + Boolean + Value + 0 + + diff --git a/indra/newview/fsareasearch.cpp b/indra/newview/fsareasearch.cpp index ef4efc84fc..7d52654ddb 100644 --- a/indra/newview/fsareasearch.cpp +++ b/indra/newview/fsareasearch.cpp @@ -89,7 +89,7 @@ static std::string RLVa_hideNameIfRestricted(std::string_view name) return RlvStrings::getAnonym(std::string(name)); } -F32 calculateObjectDistance(LLVector3d agent_pos, LLViewerObject* object) +F32 static calculateObjectDistance(LLVector3d agent_pos, LLViewerObject* object) { if (object->isHUDAttachment()) { @@ -107,7 +107,7 @@ public: FSParcelChangeObserver(FSAreaSearch* area_search_floater) : mAreaSearchFloater(area_search_floater) {} private: - /*virtual*/ void changed() + void changed() override { if (mAreaSearchFloater) { @@ -139,41 +139,11 @@ public: } private: - LLUUID mObjectID; + LLUUID mObjectID; }; FSAreaSearch::FSAreaSearch(const LLSD& key) : - LLFloater(key), - mActive(false), - mFilterForSale(false), - mFilterForSaleMin(0), - mFilterForSaleMax(999999), - mFilterPhysical(false), - mFilterTemporary(false), - mRegexSearch(false), - mFilterClickAction(false), - mFilterLocked(false), - mFilterPhantom(false), - mFilterAttachment(false), - mFilterMoaP(false), - mFilterReflectionProbe(false), - mFilterDistance(false), - mFilterDistanceMin(0), - mFilterDistanceMax(999999), - mFilterPermCopy(false), - mFilterPermModify(false), - mFilterPermTransfer(false), - mFilterAgentParcelOnly(false), - mBeacons(false), - mExcludeAttachment(true), - mExcludeTemporary(true), - mExcludeReflectionProbe(false), - mExcludePhysics(true), - mExcludeChildPrims(true), - mExcludeNeighborRegions(true), - mRequestQueuePause(false), - mRequestNeedsSent(false), - mRlvBehaviorCallbackConnection() + LLFloater(key) { gAgent.setFSAreaSearchActive(true); gAgent.changeInterestListMode(IL_MODE_360); @@ -197,7 +167,7 @@ FSAreaSearch::~FSAreaSearch() // Tell the Simulator not to send us everything anymore // and revert to the regular "keyhole" frustum of interest // list updates. - if( !LLApp::isExiting() ) + if (!LLApp::isExiting()) { gAgent.changeInterestListMode(IL_MODE_DEFAULT); } @@ -234,8 +204,7 @@ bool FSAreaSearch::postBuild() if (!gSavedSettings.getBOOL("FSAreaSearchAdvanced")) { - LLPanel* advanced_tab = mTab->getPanelByName("area_search_advanced_panel"); - if (advanced_tab) + if (LLPanel* advanced_tab = mTab->getPanelByName("area_search_advanced_panel")) { mTab->removeTabPanel(advanced_tab); } @@ -263,7 +232,7 @@ void FSAreaSearch::draw() { std::vector items = mPanelList->getResultList()->getAllData(); - for (const auto item : items) + for (const auto* item : items) { if (LLViewerObject* objectp = gObjectList.findObject(item->getUUID()); objectp) { @@ -492,7 +461,7 @@ void FSAreaSearch::findObjects() mRequestQueuePause = false; } -bool FSAreaSearch::isSearchableObject(LLViewerObject* objectp, LLViewerRegion* our_region) +bool FSAreaSearch::isSearchableObject(LLViewerObject* objectp, LLViewerRegion* our_region) const { // need to be connected to region object is in. if (!objectp->getRegion()) @@ -1140,31 +1109,30 @@ void FSAreaSearch::getNameFromUUID(const LLUUID& id, std::string& name, bool gro if (!gCacheName->getIfThere(id, name, is_group)) { name = unknown_name; - if (std::find(mNamesRequested.begin(), mNamesRequested.end(), id) == mNamesRequested.end()) + if (!mNamesRequested.contains(id)) { - mNamesRequested.push_back(id); - boost::signals2::connection cb_connection = gCacheName->get(id, group, boost::bind(&FSAreaSearch::callbackLoadFullName, this, _1, _2)); - mNameCacheConnections.insert(std::make_pair(id, cb_connection)); // mNamesRequested will do the dupe check + mNamesRequested.emplace(id); + mNameCacheConnections.try_emplace(id, gCacheName->get(id, group, boost::bind(&FSAreaSearch::callbackLoadFullName, this, _1, _2))); // mNamesRequested will do the dupe check } name_requested = true; } } else { - LLAvatarName av_name; - if (!LLAvatarNameCache::get(id, &av_name)) + if (LLAvatarName av_name; !LLAvatarNameCache::get(id, &av_name)) { name = unknown_name; - if (std::find(mNamesRequested.begin(), mNamesRequested.end(), id) == mNamesRequested.end()) + if (!mNamesRequested.contains(id)) { - mNamesRequested.push_back(id); - boost::signals2::connection cb_connection = LLAvatarNameCache::get(id, boost::bind(&FSAreaSearch::avatarNameCacheCallback, this, _1, _2)); - mNameCacheConnections.insert(std::make_pair(id, cb_connection)); // mNamesRequested will do the dupe check + mNamesRequested.emplace(id); + mNameCacheConnections.try_emplace(id, LLAvatarNameCache::get(id, boost::bind(&FSAreaSearch::avatarNameCacheCallback, this, _1, _2))); // mNamesRequested will do the dupe check } name_requested = true; } else + { name = av_name.getCompleteName(); + } } } @@ -1173,7 +1141,7 @@ void FSAreaSearch::avatarNameCacheCallback(const LLUUID& id, const LLAvatarName& callbackLoadFullName(id, av_name.getCompleteName()); } -void FSAreaSearch::callbackLoadFullName(const LLUUID& id, const std::string& full_name ) +void FSAreaSearch::callbackLoadFullName(const LLUUID& id, const std::string& full_name) { if (auto iter = mNameCacheConnections.find(id); iter != mNameCacheConnections.end()) { @@ -1368,7 +1336,7 @@ void FSAreaSearch::onCommitCheckboxRegex() } } -void FSAreaSearch::setFindOwnerText(std::string value) +void FSAreaSearch::setFindOwnerText(const std::string& value) { mPanelFind->mOwnerLineEditor->setText(value); } @@ -1380,10 +1348,7 @@ void FSAreaSearch::setFindOwnerText(std::string value) FSPanelAreaSearchList::FSPanelAreaSearchList(FSAreaSearch* pointer) : LLPanel(), - mCounterText(0), - mResultList(0), - mFSAreaSearch(pointer), - mFSAreaSearchColumnConfigConnection() + mFSAreaSearch(pointer) { mColumnBits["distance"] = 1; mColumnBits["name"] = 2; @@ -1497,7 +1462,7 @@ void FSPanelAreaSearchList::updateScrollList() // Iterate over the rows in the list, deleting ones whose object has gone away. std::vector items = mResultList->getAllData(); - for (const auto item : items) + for (const auto* item : items) { const LLUUID& row_id = item->getUUID(); LLViewerObject* objectp = gObjectList.findObject(row_id); @@ -1603,7 +1568,7 @@ void FSPanelAreaSearchList::updateName(const LLUUID& id, const std::string& name // Iterate over the rows in the list, updating the ones with matching id. std::vector items = mResultList->getAllData(); - for (const auto item : items) + for (const auto* item : items) { const LLUUID& row_id = item->getUUID(); FSObjectProperties& details = mFSAreaSearch->mObjectDetails[row_id]; @@ -1696,7 +1661,7 @@ bool FSPanelAreaSearchList::onContextMenuItemVisibleRLV(const LLSD& userdata) } std::vector selected = mResultList->getAllSelected(); - for (const auto item : selected) + for (const auto* item : selected) { const LLUUID& object_id = item->getUUID(); LLViewerObject* objectp = gObjectList.findObject(object_id); @@ -1780,7 +1745,7 @@ bool FSPanelAreaSearchList::onContextMenuItemClick(const LLSD& userdata) std::vector selected = mResultList->getAllSelected(); S32 cnt = 0; - for (const auto item : selected) + for (const auto* item : selected) { switch (c) { @@ -1985,7 +1950,7 @@ bool FSPanelAreaSearchList::onContextMenuItemClick(const LLSD& userdata) LLSelectMgr::getInstance()->deselectAll(); std::vector selected = mResultList->getAllSelected(); - for (const auto item : selected) + for (const auto* item : selected) { const LLUUID& object_id = item->getUUID(); LLViewerObject* objectp = gObjectList.findObject(object_id); @@ -2063,9 +2028,8 @@ void FSPanelAreaSearchList::buyObject(FSObjectProperties& details, LLViewerObjec { LLSelectMgr::getInstance()->deselectAll(); LLSelectMgr::getInstance()->selectObjectAndFamily(objectp); - LLSelectNode* node = LLSelectMgr::getInstance()->getSelection()->findNode(objectp); - if (node) + if (LLSelectNode* node = LLSelectMgr::getInstance()->getSelection()->findNode(objectp)) { node->mValid = true; node->mPermissions->init(details.creator_id, details.owner_id, details.last_owner_id, details.group_id); @@ -2188,89 +2152,109 @@ FSPanelAreaSearchFilter::FSPanelAreaSearchFilter(FSAreaSearch* pointer) bool FSPanelAreaSearchFilter::postBuild() { mCheckboxLocked = getChild("filter_locked"); + mCheckboxLocked->set(gSavedSettings.getBOOL("FSAreaSearch_OnlyLocked")); mCheckboxLocked->setCommitCallback(boost::bind(&FSPanelAreaSearchFilter::onCommitCheckbox, this)); mCheckboxPhysical = getChild("filter_physical"); - mCheckboxPhysical->setEnabled(false); + mCheckboxPhysical->set(gSavedSettings.getBOOL("FSAreaSearch_OnlyPhysical")); mCheckboxPhysical->setCommitCallback(boost::bind(&FSPanelAreaSearchFilter::onCommitCheckbox, this)); mCheckboxTemporary = getChild("filter_temporary"); - mCheckboxTemporary->setEnabled(false); + mCheckboxTemporary->set(gSavedSettings.getBOOL("FSAreaSearch_OnlyTemporary")); mCheckboxTemporary->setCommitCallback(boost::bind(&FSPanelAreaSearchFilter::onCommitCheckbox, this)); mCheckboxPhantom = getChild("filter_phantom"); + mCheckboxPhantom->set(gSavedSettings.getBOOL("FSAreaSearch_OnlyPhantom")); mCheckboxPhantom->setCommitCallback(boost::bind(&FSPanelAreaSearchFilter::onCommitCheckbox, this)); mCheckboxForSale = getChild("filter_for_sale"); + mCheckboxForSale->set(gSavedSettings.getBOOL("FSAreaSearch_FilterForSale")); mCheckboxForSale->setCommitCallback(boost::bind(&FSPanelAreaSearchFilter::onCommitCheckbox, this)); mCheckboxAttachment = getChild("filter_attachment"); - mCheckboxAttachment->setEnabled(false); + mCheckboxAttachment->set(gSavedSettings.getBOOL("FSAreaSearch_OnlyAttachments")); mCheckboxAttachment->setCommitCallback(boost::bind(&FSPanelAreaSearchFilter::onCommitCheckbox, this)); mSpinForSaleMinValue= getChild("min_price"); + mSpinForSaleMinValue->set((F32)gSavedSettings.getS32("FSAreaSearch_MinimumPrice")); mSpinForSaleMinValue->setCommitCallback(boost::bind(&FSPanelAreaSearchFilter::onCommitSpin, this)); mSpinForSaleMaxValue= getChild("max_price"); + mSpinForSaleMaxValue->set((F32)gSavedSettings.getS32("FSAreaSearch_MaximumPrice")); mSpinForSaleMaxValue->setCommitCallback(boost::bind(&FSPanelAreaSearchFilter::onCommitSpin, this)); mComboClickAction = getChild("click_action"); + mComboClickAction->setValue(gSavedSettings.getS32("FSAreaSearch_ClickAction")); mComboClickAction->setCommitCallback(boost::bind(&FSPanelAreaSearchFilter::onCommitCombo, this)); mCheckboxExcludeAttachment = getChild("exclude_attachment"); - mCheckboxExcludeAttachment->set(true); + mCheckboxExcludeAttachment->set(gSavedSettings.getBOOL("FSAreaSearch_ExcludeAttachments")); mCheckboxExcludeAttachment->setCommitCallback(boost::bind(&FSPanelAreaSearchFilter::onCommitCheckbox, this)); mCheckboxExcludePhysics = getChild("exclude_physical"); - mCheckboxExcludePhysics->set(true); + mCheckboxExcludePhysics->set(gSavedSettings.getBOOL("FSAreaSearch_ExcludePhysical")); mCheckboxExcludePhysics->setCommitCallback(boost::bind(&FSPanelAreaSearchFilter::onCommitCheckbox, this)); mCheckboxExcludetemporary = getChild("exclude_temporary"); - mCheckboxExcludetemporary->set(true); + mCheckboxExcludetemporary->set(gSavedSettings.getBOOL("FSAreaSearch_ExcludeTemporary")); mCheckboxExcludetemporary->setCommitCallback(boost::bind(&FSPanelAreaSearchFilter::onCommitCheckbox, this)); mCheckboxExcludeReflectionProbes = getChild("exclude_reflection_probes"); - mCheckboxExcludeReflectionProbes->set(false); + mCheckboxExcludeReflectionProbes->set(gSavedSettings.getBOOL("FSAreaSearch_ExcludeReflectionProbes")); mCheckboxExcludeReflectionProbes->setCommitCallback(boost::bind(&FSPanelAreaSearchFilter::onCommitCheckbox, this)); mCheckboxExcludeChildPrim = getChild("exclude_childprim"); - mCheckboxExcludeChildPrim->set(true); + mCheckboxExcludeChildPrim->set(gSavedSettings.getBOOL("FSAreaSearch_ExcludeChildPrims")); mCheckboxExcludeChildPrim->setCommitCallback(boost::bind(&FSPanelAreaSearchFilter::onCommitCheckbox, this)); mCheckboxExcludeNeighborRegions = getChild("exclude_neighbor_region"); - mCheckboxExcludeNeighborRegions->set(true); + mCheckboxExcludeNeighborRegions->set(gSavedSettings.getBOOL("FSAreaSearch_ExcludeNeighborRegions")); mCheckboxExcludeNeighborRegions->setCommitCallback(boost::bind(&FSPanelAreaSearchFilter::onCommitCheckbox, this)); mButtonApply = getChild("apply"); mButtonApply->setClickedCallback(boost::bind(&FSAreaSearch::onButtonClickedSearch, mFSAreaSearch)); + mButtonApply = getChild("save_as_default"); + mButtonApply->setClickedCallback(boost::bind(&FSPanelAreaSearchFilter::onButtonClickedSaveAsDefault, this)); + mCheckboxDistance = getChild("filter_distance"); + mCheckboxExcludeAttachment->set(gSavedSettings.getBOOL("FSAreaSearch_FilterDistance")); mCheckboxDistance->setCommitCallback(boost::bind(&FSPanelAreaSearchFilter::onCommitCheckbox, this)); mSpinDistanceMinValue = getChild("min_distance"); + mCheckboxDistance->set(gSavedSettings.getS32("FSAreaSearch_MinimumDistance")); mSpinDistanceMinValue->setCommitCallback(boost::bind(&FSPanelAreaSearchFilter::onCommitSpin, this)); mSpinDistanceMaxValue= getChild("max_distance"); + mSpinDistanceMaxValue->set((F32)gSavedSettings.getS32("FSAreaSearch_MaximumDistance")); mSpinDistanceMaxValue->setCommitCallback(boost::bind(&FSPanelAreaSearchFilter::onCommitSpin, this)); mCheckboxMoaP = getChild("filter_moap"); + mCheckboxMoaP->set(gSavedSettings.getBOOL("FSAreaSearch_OnlyMOAP")); mCheckboxMoaP->setCommitCallback(boost::bind(&FSPanelAreaSearchFilter::onCommitCheckbox, this)); mCheckboxReflectionProbe = getChild("filter_reflection_probe"); + mCheckboxReflectionProbe->set(gSavedSettings.getBOOL("FSAreaSearch_OnlyReflectionProbes")); mCheckboxReflectionProbe->setCommitCallback(boost::bind(&FSPanelAreaSearchFilter::onCommitCheckbox, this)); mCheckboxPermCopy = getChild("filter_perm_copy"); + mCheckboxPermCopy->set(gSavedSettings.getBOOL("FSAreaSearch_OnlyCopiable")); mCheckboxPermCopy->setCommitCallback(boost::bind(&FSPanelAreaSearchFilter::onCommitCheckbox, this)); mCheckboxPermModify = getChild("filter_perm_modify"); + mCheckboxPermModify->set(gSavedSettings.getBOOL("FSAreaSearch_OnlyModifiable")); mCheckboxPermModify->setCommitCallback(boost::bind(&FSPanelAreaSearchFilter::onCommitCheckbox, this)); mCheckboxPermTransfer = getChild("filter_perm_transfer"); + mCheckboxPermModify->set(gSavedSettings.getBOOL("FSAreaSearch_OnlyTransferable")); mCheckboxPermTransfer->setCommitCallback(boost::bind(&FSPanelAreaSearchFilter::onCommitCheckbox, this)); mCheckboxAgentParcelOnly = getChild("filter_agent_parcel_only"); + mCheckboxAgentParcelOnly->set(gSavedSettings.getBOOL("FSAreaSearch_OnlyCurrentParcel")); mCheckboxAgentParcelOnly->setCommitCallback(boost::bind(&FSPanelAreaSearchFilter::onCommitCheckbox, this)); + onCommitCheckbox(); + return LLPanel::postBuild(); } @@ -2278,8 +2262,6 @@ void FSPanelAreaSearchFilter::onCommitCheckbox() { mFSAreaSearch->setFilterLocked(mCheckboxLocked->get()); mFSAreaSearch->setFilterPhantom(mCheckboxPhantom->get()); - mFSAreaSearch->setFilterForSale(mCheckboxForSale->get()); - mFSAreaSearch->setFilterDistance(mCheckboxDistance->get()); mFSAreaSearch->setFilterMoaP(mCheckboxMoaP->get()); mFSAreaSearch->setFilterReflectionProbe(mCheckboxReflectionProbe->get()); @@ -2338,6 +2320,14 @@ void FSPanelAreaSearchFilter::onCommitCheckbox() } mFSAreaSearch->setFilterAttachment(mCheckboxAttachment->get()); + mFSAreaSearch->setFilterForSale(mCheckboxForSale->get()); + mSpinForSaleMinValue->setEnabled(mCheckboxForSale->get()); + mSpinForSaleMaxValue->setEnabled(mCheckboxForSale->get()); + + mFSAreaSearch->setFilterDistance(mCheckboxDistance->get()); + mSpinDistanceMinValue->setEnabled(mCheckboxDistance->get()); + mSpinDistanceMaxValue->setEnabled(mCheckboxDistance->get()); + mFSAreaSearch->setExcludeChildPrims(mCheckboxExcludeChildPrim->get()); mFSAreaSearch->setExcludeNeighborRegions(mCheckboxExcludeNeighborRegions->get()); @@ -2372,6 +2362,34 @@ void FSPanelAreaSearchFilter::onCommitCombo() } } +void FSPanelAreaSearchFilter::onButtonClickedSaveAsDefault() +{ + gSavedSettings.setBOOL("FSAreaSearch_OnlyLocked", mCheckboxLocked->get()); + gSavedSettings.setBOOL("FSAreaSearch_OnlyPhysical", mCheckboxPhysical->get()); + gSavedSettings.setBOOL("FSAreaSearch_OnlyTemporary", mCheckboxTemporary->get()); + gSavedSettings.setBOOL("FSAreaSearch_OnlyPhantom", mCheckboxPhantom->get()); + gSavedSettings.setBOOL("FSAreaSearch_FilterForSale", mCheckboxForSale->get()); + gSavedSettings.setBOOL("FSAreaSearch_OnlyAttachments", mCheckboxAttachment->get()); + gSavedSettings.setS32("FSAreaSearch_MinimumPrice", (S32)mSpinForSaleMinValue->get()); + gSavedSettings.setS32("FSAreaSearch_MaximumPrice", (S32)mSpinForSaleMaxValue->get()); + gSavedSettings.setS32("FSAreaSearch_ClickAction", mComboClickAction->getValue()); + gSavedSettings.setBOOL("FSAreaSearch_ExcludeAttachments", mCheckboxExcludeAttachment->get()); + gSavedSettings.setBOOL("FSAreaSearch_ExcludePhysical", mCheckboxExcludePhysics->get()); + gSavedSettings.setBOOL("FSAreaSearch_ExcludeTemporary", mCheckboxExcludetemporary->get()); + gSavedSettings.setBOOL("FSAreaSearch_ExcludeReflectionProbes", mCheckboxExcludeReflectionProbes->get()); + gSavedSettings.setBOOL("FSAreaSearch_ExcludeChildPrims", mCheckboxExcludeChildPrim->get()); + gSavedSettings.setBOOL("FSAreaSearch_ExcludeNeighborRegions", mCheckboxExcludeNeighborRegions->get()); + gSavedSettings.setBOOL("FSAreaSearch_FilterDistance", mCheckboxExcludeAttachment->get()); + gSavedSettings.setS32("FSAreaSearch_MinimumDistance", mCheckboxDistance->get()); + gSavedSettings.setS32("FSAreaSearch_MaximumDistance", (S32)mSpinDistanceMaxValue->get()); + gSavedSettings.setBOOL("FSAreaSearch_OnlyMOAP", mCheckboxMoaP->get()); + gSavedSettings.setBOOL("FSAreaSearch_OnlyReflectionProbes", mCheckboxReflectionProbe->get()); + gSavedSettings.setBOOL("FSAreaSearch_OnlyCopiable", mCheckboxPermCopy->get()); + gSavedSettings.setBOOL("FSAreaSearch_OnlyModifiable", mCheckboxPermModify->get()); + gSavedSettings.setBOOL("FSAreaSearch_OnlyTransferable", mCheckboxPermModify->get()); + gSavedSettings.setBOOL("FSAreaSearch_OnlyCurrentParcel", mCheckboxAgentParcelOnly->get()); +} + //--------------------------------------------------------------------------- // Options tab //--------------------------------------------------------------------------- diff --git a/indra/newview/fsareasearch.h b/indra/newview/fsareasearch.h index a4bb89c2b0..07cb2150b4 100644 --- a/indra/newview/fsareasearch.h +++ b/indra/newview/fsareasearch.h @@ -58,7 +58,7 @@ class FSScrollListCtrl; struct FSObjectProperties { LLUUID id; - bool listed; + bool listed{ false }; std::string name; std::string description; std::string touch_name; @@ -67,9 +67,13 @@ struct FSObjectProperties LLUUID owner_id; LLUUID group_id; LLUUID ownership_id; - bool group_owned; - U64 creation_date; - U32 base_mask, owner_mask, group_mask, everyone_mask, next_owner_mask; + bool group_owned{ false }; + U64 creation_date{ 0 }; + U32 base_mask{ 0 }; + U32 owner_mask{ 0 }; + U32 group_mask{ 0 }; + U32 everyone_mask{ 0 }; + U32 next_owner_mask{ 0 }; LLSaleInfo sale_info; LLCategory category; LLUUID last_owner_id; @@ -78,9 +82,9 @@ struct FSObjectProperties LLAggregatePermissions ag_texture_perms_owner; LLPermissions permissions; uuid_vec_t texture_ids; - bool name_requested; - U32 local_id; - U64 region_handle; + bool name_requested{ false }; + U32 local_id{ 0 }; + U64 region_handle{ 0 }; typedef enum e_object_properties_request { @@ -89,14 +93,7 @@ struct FSObjectProperties FINISHED, FAILED } EObjectPropertiesRequest; - EObjectPropertiesRequest request; - - FSObjectProperties() : - request(NEED), - listed(false), - name_requested(false) - { - } + EObjectPropertiesRequest request{ NEED }; }; //--------------------------------------------------------------------- @@ -110,9 +107,9 @@ public: FSAreaSearch(const LLSD &); virtual ~FSAreaSearch(); - /*virtual*/ bool postBuild(); - virtual void draw(); - virtual void onOpen(const LLSD& key); + bool postBuild() override; + virtual void draw() override; + virtual void onOpen(const LLSD& key) override; void avatarNameCacheCallback(const LLUUID& id, const LLAvatarName& av_name); void callbackLoadFullName(const LLUUID& id, const std::string& full_name); @@ -126,8 +123,8 @@ public: void clearSearchText(); void onButtonClickedSearch(); void onCommitCheckboxRegex(); - bool isSearchableObject (LLViewerObject* objectp, LLViewerRegion* our_region); - void setFindOwnerText(std::string value); + bool isSearchableObject(LLViewerObject* objectp, LLViewerRegion* our_region) const; + void setFindOwnerText(const std::string& value); std::map mObjectDetails; @@ -169,10 +166,10 @@ public: void setFilterAgentParcelOnly(bool b) { mFilterAgentParcelOnly = b; } - bool isActive() { return mActive; } + bool isActive() const { return mActive; } private: - void requestObjectProperties(const std::vector< U32 >& request_list, bool select, LLViewerRegion* regionp); + void requestObjectProperties(const std::vector& request_list, bool select, LLViewerRegion* regionp); void matchObject(FSObjectProperties& details, LLViewerObject* objectp); void getNameFromUUID(const LLUUID& id, std::string& name, bool group, bool& name_requested); @@ -181,15 +178,15 @@ private: void findObjects(); void processRequestQueue(); - boost::signals2::connection mRlvBehaviorCallbackConnection; + boost::signals2::connection mRlvBehaviorCallbackConnection{}; void updateRlvRestrictions(ERlvBehaviour behavior); - S32 mRequested; - bool mRefresh; - S32 mSearchableObjects; - bool mActive; - bool mRequestQueuePause; - bool mRequestNeedsSent; + S32 mRequested{ 0 }; + bool mRefresh{ false }; + S32 mSearchableObjects{ 0 }; + bool mActive{ false }; + bool mRequestQueuePause{ false }; + bool mRequestNeedsSent{ false }; std::map mRegionRequests; std::string mSearchName; @@ -199,7 +196,7 @@ private: std::string mSearchCreator; std::string mSearchLastOwner; - bool mRegexSearch; + bool mRegexSearch{ false }; boost::regex mRegexSearchName; boost::regex mRegexSearchDescription; boost::regex mRegexSearchOwner; @@ -210,57 +207,57 @@ private: LLFrameTimer mLastUpdateTimer; LLFrameTimer mLastPropertiesReceivedTimer; - uuid_vec_t mNamesRequested; + uuid_set_t mNamesRequested; - typedef std::map name_cache_connection_map_t; + using name_cache_connection_map_t = std::map; name_cache_connection_map_t mNameCacheConnections; - LLViewerRegion* mLastRegion; + LLViewerRegion* mLastRegion{ nullptr }; class FSParcelChangeObserver; friend class FSParcelChangeObserver; std::unique_ptr mParcelChangedObserver; - LLTabContainer* mTab; - FSPanelAreaSearchList* mPanelList; - FSPanelAreaSearchFind* mPanelFind; - FSPanelAreaSearchFilter* mPanelFilter; - FSPanelAreaSearchOptions* mPanelOptions; - FSPanelAreaSearchAdvanced* mPanelAdvanced; + LLTabContainer* mTab{ nullptr }; + FSPanelAreaSearchList* mPanelList{ nullptr }; + FSPanelAreaSearchFind* mPanelFind{ nullptr }; + FSPanelAreaSearchFilter* mPanelFilter{ nullptr }; + FSPanelAreaSearchOptions* mPanelOptions{ nullptr }; + FSPanelAreaSearchAdvanced* mPanelAdvanced{ nullptr }; - bool mBeacons; + bool mBeacons{ false }; - bool mExcludeAttachment; - bool mExcludeTemporary; - bool mExcludeReflectionProbe; - bool mExcludePhysics; - bool mExcludeChildPrims; - bool mExcludeNeighborRegions; + bool mExcludeAttachment{ false }; + bool mExcludeTemporary{ false }; + bool mExcludeReflectionProbe{ false }; + bool mExcludePhysics{ false }; + bool mExcludeChildPrims{ true }; + bool mExcludeNeighborRegions{ true }; - bool mFilterLocked; - bool mFilterPhysical; - bool mFilterTemporary; - bool mFilterPhantom; - bool mFilterAttachment; - bool mFilterMoaP; - bool mFilterReflectionProbe; + bool mFilterLocked{ false }; + bool mFilterPhysical{ true }; + bool mFilterTemporary{ true }; + bool mFilterPhantom{ false }; + bool mFilterAttachment{ false }; + bool mFilterMoaP{ false }; + bool mFilterReflectionProbe{ false }; - bool mFilterForSale; - S32 mFilterForSaleMin; - S32 mFilterForSaleMax; + bool mFilterForSale{ false }; + S32 mFilterForSaleMin{ 0 }; + S32 mFilterForSaleMax{ 999999 }; - bool mFilterDistance; - S32 mFilterDistanceMin; - S32 mFilterDistanceMax; + bool mFilterDistance{ false }; + S32 mFilterDistanceMin{ 0 }; + S32 mFilterDistanceMax{ 0 }; - bool mFilterClickAction; - U8 mFilterClickActionType; + bool mFilterClickAction{ false }; + U8 mFilterClickActionType{ 0 }; - bool mFilterPermCopy; - bool mFilterPermModify; - bool mFilterPermTransfer; + bool mFilterPermCopy{ false }; + bool mFilterPermModify{ false }; + bool mFilterPermTransfer{ false }; - bool mFilterAgentParcelOnly; + bool mFilterAgentParcelOnly{ false }; protected: static void* createPanelList(void* data); @@ -286,7 +283,7 @@ public: FSPanelAreaSearchList(FSAreaSearch* pointer); virtual ~FSPanelAreaSearchList(); - /*virtual*/ bool postBuild(); + bool postBuild() override; void setCounterText(); void setCounterText(LLStringUtil::format_map_t args); @@ -316,14 +313,14 @@ private: LLVector3d mAgentLastPosition; - FSAreaSearch* mFSAreaSearch; - LLButton* mRefreshButton; - FSScrollListCtrl* mResultList; - LLCheckBoxCtrl* mCheckboxBeacons; - LLTextBox* mCounterText; + FSAreaSearch* mFSAreaSearch{ nullptr }; + LLButton* mRefreshButton{ nullptr }; + FSScrollListCtrl* mResultList{ nullptr }; + LLCheckBoxCtrl* mCheckboxBeacons{ nullptr }; + LLTextBox* mCounterText{ nullptr }; - std::map mColumnBits; - boost::signals2::connection mFSAreaSearchColumnConfigConnection; + std::map> mColumnBits; + boost::signals2::connection mFSAreaSearchColumnConfigConnection{}; }; @@ -339,24 +336,24 @@ public: FSPanelAreaSearchFind(FSAreaSearch* pointer); virtual ~FSPanelAreaSearchFind() = default; - /*virtual*/ bool postBuild(); - /*virtual*/ bool handleKeyHere(KEY key,MASK mask); + bool postBuild() override; + bool handleKeyHere(KEY key,MASK mask) override; - LLLineEditor* mNameLineEditor; - LLLineEditor* mDescriptionLineEditor; - LLLineEditor* mOwnerLineEditor; - LLLineEditor* mGroupLineEditor; - LLLineEditor* mCreatorLineEditor; - LLLineEditor* mLastOwnerLineEditor; - LLCheckBoxCtrl* mCheckboxRegex; + LLLineEditor* mNameLineEditor{ nullptr }; + LLLineEditor* mDescriptionLineEditor{ nullptr }; + LLLineEditor* mOwnerLineEditor{ nullptr }; + LLLineEditor* mGroupLineEditor{ nullptr }; + LLLineEditor* mCreatorLineEditor{ nullptr }; + LLLineEditor* mLastOwnerLineEditor{ nullptr }; + LLCheckBoxCtrl* mCheckboxRegex{ nullptr }; private: void onButtonClickedClear(); - FSAreaSearch* mFSAreaSearch; + FSAreaSearch* mFSAreaSearch{ nullptr }; - LLButton* mSearchButton; - LLButton* mClearButton; + LLButton* mSearchButton{ nullptr }; + LLButton* mClearButton{ nullptr }; }; @@ -372,39 +369,40 @@ public: FSPanelAreaSearchFilter(FSAreaSearch* pointer); virtual ~FSPanelAreaSearchFilter() = default; - /*virtual*/ bool postBuild(); + bool postBuild() override; private: void onCommitCheckbox(); void onCommitSpin(); void onCommitCombo(); + void onButtonClickedSaveAsDefault(); - FSAreaSearch* mFSAreaSearch; - LLCheckBoxCtrl* mCheckboxForSale; - LLCheckBoxCtrl* mCheckboxPhysical; - LLCheckBoxCtrl* mCheckboxTemporary; - LLCheckBoxCtrl* mCheckboxLocked; - LLCheckBoxCtrl* mCheckboxPhantom; - LLCheckBoxCtrl* mCheckboxMoaP; - LLCheckBoxCtrl* mCheckboxReflectionProbe; - LLCheckBoxCtrl* mCheckboxDistance; - LLSpinCtrl* mSpinDistanceMinValue; - LLSpinCtrl* mSpinDistanceMaxValue; - LLSpinCtrl* mSpinForSaleMinValue; - LLSpinCtrl* mSpinForSaleMaxValue; - LLButton* mButtonApply; - LLComboBox* mComboClickAction; - LLCheckBoxCtrl* mCheckboxAttachment; - LLCheckBoxCtrl* mCheckboxExcludeAttachment; - LLCheckBoxCtrl* mCheckboxExcludePhysics; - LLCheckBoxCtrl* mCheckboxExcludetemporary; - LLCheckBoxCtrl* mCheckboxExcludeReflectionProbes; - LLCheckBoxCtrl* mCheckboxExcludeChildPrim; - LLCheckBoxCtrl* mCheckboxExcludeNeighborRegions; - LLCheckBoxCtrl* mCheckboxPermCopy; - LLCheckBoxCtrl* mCheckboxPermModify; - LLCheckBoxCtrl* mCheckboxPermTransfer; - LLCheckBoxCtrl* mCheckboxAgentParcelOnly; + FSAreaSearch* mFSAreaSearch{ nullptr }; + LLCheckBoxCtrl* mCheckboxForSale{ nullptr }; + LLCheckBoxCtrl* mCheckboxPhysical{ nullptr }; + LLCheckBoxCtrl* mCheckboxTemporary{ nullptr }; + LLCheckBoxCtrl* mCheckboxLocked{ nullptr }; + LLCheckBoxCtrl* mCheckboxPhantom{ nullptr }; + LLCheckBoxCtrl* mCheckboxMoaP{ nullptr }; + LLCheckBoxCtrl* mCheckboxReflectionProbe{ nullptr }; + LLCheckBoxCtrl* mCheckboxDistance{ nullptr }; + LLSpinCtrl* mSpinDistanceMinValue{ nullptr }; + LLSpinCtrl* mSpinDistanceMaxValue{ nullptr }; + LLSpinCtrl* mSpinForSaleMinValue{ nullptr }; + LLSpinCtrl* mSpinForSaleMaxValue{ nullptr }; + LLButton* mButtonApply{ nullptr }; + LLComboBox* mComboClickAction{ nullptr }; + LLCheckBoxCtrl* mCheckboxAttachment{ nullptr }; + LLCheckBoxCtrl* mCheckboxExcludeAttachment{ nullptr }; + LLCheckBoxCtrl* mCheckboxExcludePhysics{ nullptr }; + LLCheckBoxCtrl* mCheckboxExcludetemporary{ nullptr }; + LLCheckBoxCtrl* mCheckboxExcludeReflectionProbes{ nullptr }; + LLCheckBoxCtrl* mCheckboxExcludeChildPrim{ nullptr }; + LLCheckBoxCtrl* mCheckboxExcludeNeighborRegions{ nullptr }; + LLCheckBoxCtrl* mCheckboxPermCopy{ nullptr }; + LLCheckBoxCtrl* mCheckboxPermModify{ nullptr }; + LLCheckBoxCtrl* mCheckboxPermTransfer{ nullptr }; + LLCheckBoxCtrl* mCheckboxAgentParcelOnly{ nullptr }; }; @@ -423,9 +421,9 @@ private: void onCommitCheckboxDisplayColumn(const LLSD& userdata); bool onEnableColumnVisibilityChecked(const LLSD& userdata); - FSAreaSearch* mFSAreaSearch; + FSAreaSearch* mFSAreaSearch{ nullptr }; - std::map mColumnParms; + std::map> mColumnParms; }; @@ -440,11 +438,11 @@ public: FSPanelAreaSearchAdvanced() = default; virtual ~FSPanelAreaSearchAdvanced() = default; - /*virtual*/ bool postBuild(); + bool postBuild() override; - LLCheckBoxCtrl* mCheckboxClickTouch; - LLCheckBoxCtrl* mCheckboxClickBuy; - LLCheckBoxCtrl* mCheckboxClickSit; + LLCheckBoxCtrl* mCheckboxClickTouch{ nullptr }; + LLCheckBoxCtrl* mCheckboxClickBuy{ nullptr }; + LLCheckBoxCtrl* mCheckboxClickSit{ nullptr }; }; #endif // FS_AREASEARCH_H diff --git a/indra/newview/fsassetblacklist.cpp b/indra/newview/fsassetblacklist.cpp index 845ffd6e7d..e7fd7491d3 100644 --- a/indra/newview/fsassetblacklist.cpp +++ b/indra/newview/fsassetblacklist.cpp @@ -40,7 +40,7 @@ const LLUUID MAGIC_ID("3c115e51-04f4-523c-9fa6-98aff1034730"); -LLAssetType::EType S32toAssetType(S32 assetindex) +static LLAssetType::EType S32toAssetType(S32 assetindex) { LLAssetType::EType type; switch (assetindex) @@ -66,39 +66,9 @@ LLAssetType::EType S32toAssetType(S32 assetindex) return type; } -void FSAssetBlacklist::init() +LLSD FSAssetBlacklistData::toLLSD() const { - mBlacklistFileName = gDirUtilp->getExpandedFilename(LL_PATH_PER_SL_ACCOUNT, "asset_blacklist.xml"); - loadBlacklist(); -} - -bool FSAssetBlacklist::isBlacklisted(const LLUUID& id, LLAssetType::EType type) -{ - if (mBlacklistData.empty()) - { - return false; - } - - blacklist_type_map_t::iterator it = mBlacklistTypeContainer.find(type); - - if (it == mBlacklistTypeContainer.end()) - { - return false; - } - - blacklisted_uuid_container_t uuids = it->second; - return (uuids.find(id) != uuids.end()); -} - -void FSAssetBlacklist::addNewItemToBlacklist(const LLUUID& id, const std::string& name, const std::string& region, LLAssetType::EType type, bool permanent /*= true*/, bool save /*= true*/) -{ - if (isBlacklisted(id, type)) - { - return; - } - - LLDate curdate = LLDate((double)time_corrected()); - std::string input_date = curdate.asString(); + std::string input_date = date.asString(); input_date.replace(input_date.find("T"), 1, " "); input_date.resize(input_date.size() - 1); @@ -106,10 +76,94 @@ void FSAssetBlacklist::addNewItemToBlacklist(const LLUUID& id, const std::string data["asset_name"] = name; data["asset_region"] = region; data["asset_type"] = type; - data["asset_date"] = input_date; + data["asset_blacklist_flag"] = flags; + data["asset_date"] = date; data["asset_permanent"] = permanent; - addNewItemToBlacklistData(id, data, save); + return data; +} + +FSAssetBlacklistData FSAssetBlacklistData::fromLLSD(const LLSD& data) +{ + FSAssetBlacklistData blacklistdata; + + std::string asset_date = data["asset_date"].asString() + "Z"; + asset_date.replace(asset_date.find(" "), 1, "T"); + + blacklistdata.name = data["asset_name"].asString(); + blacklistdata.region = data["asset_region"].asString(); + blacklistdata.type = S32toAssetType(data["asset_type"].asInteger()); + blacklistdata.flags = data.has("asset_blacklist_flag") ? data["asset_blacklist_flag"].asInteger() : 0; + blacklistdata.date = LLDate(asset_date); + blacklistdata.permanent = data["asset_permanent"].asBoolean(); + + return blacklistdata; +} + +void FSAssetBlacklist::init() +{ + mBlacklistFileName = gDirUtilp->getExpandedFilename(LL_PATH_PER_SL_ACCOUNT, "asset_blacklist.xml"); + loadBlacklist(); +} + +bool FSAssetBlacklist::isBlacklisted(const LLUUID& id, LLAssetType::EType type, eBlacklistFlag flag) const +{ + if (mBlacklistData.empty()) + { + return false; + } + + if (!mBlacklistTypeContainer.contains(type)) + { + return false; + } + + if (!mBlacklistTypeContainer.at(type).contains(id)) + { + return false; + } + + const auto& data_it = mBlacklistData.find(id); + if (data_it == mBlacklistData.end()) + { + return false; + } + + return (data_it->second.flags == eBlacklistFlag::NONE && flag == eBlacklistFlag::NONE) || (data_it->second.flags & flag) != 0; +} + +void FSAssetBlacklist::addNewItemToBlacklist(const LLUUID& id, const std::string& name, const std::string& region, LLAssetType::EType type, eBlacklistFlag flag /*= eBlacklistFlag::NONE*/, bool permanent /*= true*/, bool save /*= true*/) +{ + LLDate curdate = LLDate((double)time_corrected()); + std::string input_date = curdate.asString(); + input_date.replace(input_date.find("T"), 1, " "); + input_date.resize(input_date.size() - 1); + + FSAssetBlacklistData data; + + if (auto it = mBlacklistData.find(id); it != mBlacklistData.end()) + { + data = it->second; + + data.name = name; + data.region = region; + data.date = LLDate((double)time_corrected()); + data.permanent = permanent; + data.flags |= flag; + + addNewItemToBlacklistData(id, data, save); + } + else + { + data.name = name; + data.region = region; + data.date = LLDate((double)time_corrected()); + data.permanent = permanent; + data.flags = flag; + data.type = type; + + addNewItemToBlacklistData(id, data, save); + } } bool FSAssetBlacklist::removeItem(const LLUUID& id) @@ -122,14 +176,17 @@ bool FSAssetBlacklist::removeItem(const LLUUID& id) { return false; } + + // Erase for each possible type + for (auto& [type, container] : mBlacklistTypeContainer) + { + container.erase(id); + } - LLSD data = it->second; - LLAssetType::EType type = S32toAssetType(data["asset_type"].asInteger()); - - mBlacklistTypeContainer[type].erase(id); + auto data = it->second; mBlacklistData.erase(it); - return data["asset_permanent"].asBoolean(); + return data.permanent; } void FSAssetBlacklist::removeItemFromBlacklist(const LLUUID& id) @@ -142,7 +199,8 @@ void FSAssetBlacklist::removeItemsFromBlacklist(const uuid_vec_t& ids) if (!ids.empty()) { bool need_save = false; - LLSD data; + + changed_signal_data_t data; for (const auto& id : ids) { @@ -150,7 +208,7 @@ void FSAssetBlacklist::removeItemsFromBlacklist(const uuid_vec_t& ids) { need_save = true; } - data.append(id.asString()); + data.emplace_back(id, std::nullopt); } if (need_save) @@ -165,14 +223,43 @@ void FSAssetBlacklist::removeItemsFromBlacklist(const uuid_vec_t& ids) } } -void FSAssetBlacklist::addNewItemToBlacklistData(const LLUUID& id, const LLSD& data, bool save) +void FSAssetBlacklist::removeFlagsFromItem(const LLUUID& id, S32 combined_flags) { - LLAssetType::EType type = S32toAssetType(data["asset_type"].asInteger()); + auto it = mBlacklistData.find(id); + if (it == mBlacklistData.end()) + { + return; + } - addEntryToBlacklistMap(id, type); - mBlacklistData[id] = data; + auto& data = it->second; + S32 current_flags = data.flags; - if (type == LLAssetType::AT_SOUND) + current_flags &= ~combined_flags; + + if (current_flags == eBlacklistFlag::NONE) + { + removeItemsFromBlacklist({ id }); + } + else + { + data.flags = current_flags; + addNewItemToBlacklistData(id, data, true); + } +} + +void FSAssetBlacklist::addNewItemToBlacklistData(const LLUUID& id, const FSAssetBlacklistData& data, bool save) +{ + if (auto it = mBlacklistData.find(id); it != mBlacklistData.end()) + { + it->second = data; + } + else + { + addEntryToBlacklistMap(id, data.type); + mBlacklistData.try_emplace(id, data); + } + + if (data.type == LLAssetType::AT_SOUND && data.flags == eBlacklistFlag::NONE) { LLFileSystem::removeFile(id, LLAssetType::AT_SOUND); std::string wav_path = gDirUtilp->getExpandedFilename(LL_PATH_FS_SOUND_CACHE, id.asString()) + ".dsf"; @@ -193,7 +280,7 @@ void FSAssetBlacklist::addNewItemToBlacklistData(const LLUUID& id, const LLSD& d if (!mBlacklistChangedCallback.empty()) { - mBlacklistChangedCallback(LLSD().with(id.asString(), data), eBlacklistOperation::BLACKLIST_ADD); + mBlacklistChangedCallback({ {id, data} }, eBlacklistOperation::BLACKLIST_ADD); } } @@ -247,7 +334,7 @@ void FSAssetBlacklist::loadBlacklist() gObjectList.addDerenderedItem(uid, true); } - addNewItemToBlacklistData(uid, entry_data, false); + addNewItemToBlacklistData(uid, FSAssetBlacklistData::fromLLSD(entry_data), false); } } } @@ -285,7 +372,7 @@ void FSAssetBlacklist::loadBlacklist() newdata["asset_date"] = data["entry_date"].asString(); newdata["asset_permanent"] = true; // For conversion of old data - addNewItemToBlacklistData(uid, newdata, false); + addNewItemToBlacklistData(uid, FSAssetBlacklistData::fromLLSD(newdata), false); } } oldfile.close(); @@ -306,12 +393,12 @@ void FSAssetBlacklist::saveBlacklist() for (const auto& [id, data] : mBlacklistData) { - if (data["asset_permanent"].asBoolean()) + if (data.permanent) { LLUUID shadow_id{ id }; LLXORCipher cipher(MAGIC_ID.mData, UUID_BYTES); cipher.encrypt(shadow_id.mData, UUID_BYTES); - savedata[shadow_id.asString()] = data; + savedata[shadow_id.asString()] = data.toLLSD(); } } diff --git a/indra/newview/fsassetblacklist.h b/indra/newview/fsassetblacklist.h index ea5392e96e..dde7d52d1d 100644 --- a/indra/newview/fsassetblacklist.h +++ b/indra/newview/fsassetblacklist.h @@ -35,21 +35,45 @@ #include "llsingleton.h" #include "llassettype.h" +struct FSAssetBlacklistData +{ + std::string name; + std::string region; + LLAssetType::EType type; + S32 flags{ 0 }; + LLDate date; + bool permanent{ false }; + + LLSD toLLSD() const; + static FSAssetBlacklistData fromLLSD(const LLSD& data); +}; + using blacklisted_uuid_container_t = std::unordered_set; using blacklist_type_map_t = std::map; -using blacklist_data_t = std::unordered_map; +using blacklist_data_t = std::unordered_map; class FSAssetBlacklist : public LLSingleton { LLSINGLETON_EMPTY_CTOR(FSAssetBlacklist); public: + enum eBlacklistFlag + { + NONE = 0, + WORN = 1 << 0, + REZZED = 1 << 1, + GESTURE = 1 << 2, + + LAST_FLAG = 1 << 2 + }; + void init(); - bool isBlacklisted(const LLUUID& id, LLAssetType::EType type); - void addNewItemToBlacklist(const LLUUID& id, const std::string& name, const std::string& region, LLAssetType::EType type, bool permanent = true, bool save = true); - void addNewItemToBlacklistData(const LLUUID& id, const LLSD& data, bool save = true); + bool isBlacklisted(const LLUUID& id, LLAssetType::EType type, eBlacklistFlag flag = eBlacklistFlag::NONE) const; + void addNewItemToBlacklist(const LLUUID& id, const std::string& name, const std::string& region, LLAssetType::EType type, eBlacklistFlag flag = eBlacklistFlag::NONE,bool permanent = true, bool save = true); + void addNewItemToBlacklistData(const LLUUID& id, const FSAssetBlacklistData& data, bool save = true); void removeItemFromBlacklist(const LLUUID& id); void removeItemsFromBlacklist(const uuid_vec_t& ids); + void removeFlagsFromItem(const LLUUID& id, S32 combined_flags); void saveBlacklist(); blacklist_data_t getBlacklistData() const { return mBlacklistData; }; @@ -60,7 +84,8 @@ public: BLACKLIST_REMOVE }; - typedef boost::signals2::signal blacklist_changed_callback_t; + using changed_signal_data_t = std::vector>>; + using blacklist_changed_callback_t = boost::signals2::signal; boost::signals2::connection setBlacklistChangedCallback(const blacklist_changed_callback_t::slot_type& cb) { return mBlacklistChangedCallback.connect(cb); diff --git a/indra/newview/fsdata.cpp b/indra/newview/fsdata.cpp index 8adb3a6adc..d3574f9bee 100644 --- a/indra/newview/fsdata.cpp +++ b/indra/newview/fsdata.cpp @@ -513,7 +513,7 @@ void FSData::processAssets(const LLSD& assets) { continue; } - FSAssetBlacklist::instance().addNewItemToBlacklistData(uid, data, false); + FSAssetBlacklist::instance().addNewItemToBlacklistData(uid, FSAssetBlacklistData::fromLLSD(data), false); LL_DEBUGS("fsdata") << "Added " << uid << " to assets list." << LL_ENDL; } } @@ -881,23 +881,27 @@ void FSData::addAgents() return; } - for (std::map::iterator iter = mTeamAgents.begin(); iter != mTeamAgents.end(); ++iter) + for (const auto& [id, flags] : mTeamAgents) { - if (iter->second & NO_SPAM) + if (flags & NO_SPAM) { - LLUUID id = iter->first; - avatar_name_cache_connection_map_t::iterator it = mAvatarNameCacheConnections.find(id); - if (it != mAvatarNameCacheConnections.end()) + if (LLAvatarName av_name; LLAvatarNameCache::get(id, &av_name)) { - if (it->second.connected()) - { - it->second.disconnect(); - } - mAvatarNameCacheConnections.erase(it); + onNameCache(id, av_name); } + else + { + if (auto it = mAvatarNameCacheConnections.find(id); it != mAvatarNameCacheConnections.end()) + { + if (it->second.connected()) + { + it->second.disconnect(); + } + mAvatarNameCacheConnections.erase(it); + } - LLAvatarNameCache::callback_connection_t cb = LLAvatarNameCache::get(id, boost::bind(&FSData::onNameCache, this, _1, _2)); - mAvatarNameCacheConnections.insert(std::make_pair(id, cb)); + mAvatarNameCacheConnections.try_emplace(id, LLAvatarNameCache::get(id, boost::bind(&FSData::onNameCache, this, _1, _2))); + } } } } diff --git a/indra/newview/fsfloaterassetblacklist.cpp b/indra/newview/fsfloaterassetblacklist.cpp index 636ae39278..17d79f8265 100644 --- a/indra/newview/fsfloaterassetblacklist.cpp +++ b/indra/newview/fsfloaterassetblacklist.cpp @@ -90,25 +90,51 @@ void FSFloaterAssetBlacklist::onOpen(const LLSD& key) buildBlacklist(); } -std::string FSFloaterAssetBlacklist::getTypeString(S32 type) +FSAssetBlacklist::eBlacklistFlag FSFloaterAssetBlacklist::getFlagFromLLSD(const LLSD& data) +{ + if (data.has("asset_blacklist_flag")) + { + return static_cast(data["asset_blacklist_flag"].asInteger()); + } + return FSAssetBlacklist::eBlacklistFlag::NONE; +} + +std::string FSFloaterAssetBlacklist::getTypeString(S32 type) const { switch (type) { case LLAssetType::AT_TEXTURE: return getString("asset_texture"); - case LLAssetType::AT_SOUND: - return getString("asset_sound"); case LLAssetType::AT_OBJECT: return getString("asset_object"); case LLAssetType::AT_ANIMATION: return getString("asset_animation"); case LLAssetType::AT_PERSON: return getString("asset_resident"); + case LLAssetType::AT_SOUND: + return getString("asset_sound"); default: return getString("asset_unknown"); } } +std::string FSFloaterAssetBlacklist::getFlagString(FSAssetBlacklist::eBlacklistFlag flag) const +{ + switch (flag) + { + case FSAssetBlacklist::eBlacklistFlag::NONE: + return getString("blacklist_flag_none"); + case FSAssetBlacklist::eBlacklistFlag::WORN: + return getString("blacklist_flag_mute_avatar_worn_objects_sounds"); + case FSAssetBlacklist::eBlacklistFlag::REZZED: + return getString("blacklist_flag_mute_avatar_rezzed_objects_sounds"); + case FSAssetBlacklist::eBlacklistFlag::GESTURE: + return getString("blacklist_flag_mute_avatar_gestures_sounds"); + default: + return getString("blacklist_flag_unknown"); + } +} + void FSFloaterAssetBlacklist::buildBlacklist() { bool needs_sort = mResultList->isSorted(); @@ -123,70 +149,112 @@ void FSFloaterAssetBlacklist::buildBlacklist() mResultList->updateSort(); } -void FSFloaterAssetBlacklist::addElementToList(const LLUUID& id, const LLSD& data) +void FSFloaterAssetBlacklist::addElementToList(const LLUUID& id, const FSAssetBlacklistData& data) { - // Undo the persisted date in legacy format... - std::string asset_date = data["asset_date"].asString() + "Z"; - asset_date.replace(asset_date.find(" "), 1, "T"); - LLDate date(asset_date); - std::string date_str = getString("DateFormatString"); LLSD substitution; - substitution["datetime"] = date.secondsSinceEpoch(); + substitution["datetime"] = data.date.secondsSinceEpoch(); LLStringUtil::format(date_str, substitution); - LLSD element; - element["id"] = id; - element["columns"][0]["column"] = "name"; - element["columns"][0]["type"] = "text"; - element["columns"][0]["value"] = !data["asset_name"].asString().empty() ? data["asset_name"].asString() : getString("unknown_object"); - element["columns"][1]["column"] = "region"; - element["columns"][1]["type"] = "text"; - element["columns"][1]["value"] = !data["asset_region"].asString().empty() ? data["asset_region"].asString() : getString("unknown_region"); - element["columns"][2]["column"] = "type"; - element["columns"][2]["type"] = "text"; - element["columns"][2]["value"] = getTypeString(data["asset_type"].asInteger()); - element["columns"][3]["column"] = "date"; - element["columns"][3]["type"] = "text"; - element["columns"][3]["value"] = date_str; - element["columns"][4]["column"] = "permanent"; - element["columns"][4]["type"] = "text"; - element["columns"][4]["halign"] = "center"; - element["columns"][4]["value"] = data["asset_permanent"].asBoolean() ? getString("asset_permanent") : LLStringUtil::null; - element["columns"][5]["column"] = "date_sort"; - element["columns"][5]["type"] = "text"; - element["columns"][5]["value"] = llformat("%u", (U64)date.secondsSinceEpoch()); - element["columns"][6]["column"] = "asset_type"; - element["columns"][6]["type"] = "integer"; - element["columns"][6]["value"] = data["asset_type"].asInteger(); + const S32 last_flag_value = static_cast(FSAssetBlacklist::eBlacklistFlag::LAST_FLAG); - mResultList->addElement(element, ADD_BOTTOM); + for (S32 flag_value = 1; flag_value <= last_flag_value; flag_value <<= 1) + { + if ((data.flags & flag_value) || data.flags == FSAssetBlacklist::eBlacklistFlag::NONE) + { + FSAssetBlacklist::eBlacklistFlag flag = static_cast(flag_value); + + if (data.flags == FSAssetBlacklist::eBlacklistFlag::NONE) + flag = FSAssetBlacklist::eBlacklistFlag::NONE; + + LLSD element; + element["id"] = id; + element["columns"][0]["column"] = "name"; + element["columns"][0]["type"] = "text"; + element["columns"][0]["value"] = !data.name.empty() ? data.name : getString("unknown_object"); + + element["columns"][1]["column"] = "region"; + element["columns"][1]["type"] = "text"; + element["columns"][1]["value"] = !data.region.empty() ? data.region : getString("unknown_region"); + + element["columns"][2]["column"] = "type"; + element["columns"][2]["type"] = "text"; + element["columns"][2]["value"] = getTypeString(data.type); + + element["columns"][3]["column"] = "flags"; + element["columns"][3]["type"] = "text"; + element["columns"][3]["value"] = getFlagString(flag); + + element["columns"][4]["column"] = "date"; + element["columns"][4]["type"] = "text"; + element["columns"][4]["value"] = date_str; + + element["columns"][5]["column"] = "permanent"; + element["columns"][5]["type"] = "text"; + element["columns"][5]["halign"] = "center"; + element["columns"][5]["value"] = data.permanent ? getString("asset_permanent") : LLStringUtil::null; + + element["columns"][6]["column"] = "date_sort"; + element["columns"][6]["type"] = "text"; + element["columns"][6]["value"] = llformat("%u", (U64)data.date.secondsSinceEpoch()); + + element["columns"][7]["column"] = "asset_type"; + element["columns"][7]["type"] = "integer"; + element["columns"][7]["value"] = (S32)data.type; + + LLSD value; + value["flag"] = static_cast(flag); + element["alt_value"] = value; + + mResultList->addElement(element, ADD_BOTTOM); + + if (data.flags == FSAssetBlacklist::eBlacklistFlag::NONE) + break; + } + } } void FSFloaterAssetBlacklist::removeElements() { - uuid_vec_t items; + std::map flags_to_remove_by_id; for (auto listitem : mResultList->getAllSelected()) { - items.emplace_back(listitem->getUUID()); + LLUUID id = listitem->getUUID(); + LLSD value = listitem->getAltValue(); + + if (value.has("flag")) + { + S32 flag = value["flag"].asInteger(); + flags_to_remove_by_id[id] |= flag; + } + else + { + // fallback: remove full item + FSAssetBlacklist::instance().removeItemsFromBlacklist({ id }); + } } - FSAssetBlacklist::instance().removeItemsFromBlacklist(items); + for (const auto& [id, flags] : flags_to_remove_by_id) + { + FSAssetBlacklist::instance().removeFlagsFromItem(id, flags); + } } -void FSFloaterAssetBlacklist::onBlacklistChanged(const LLSD& data, FSAssetBlacklist::eBlacklistOperation op) +void FSFloaterAssetBlacklist::onBlacklistChanged(const FSAssetBlacklist::changed_signal_data_t& data, FSAssetBlacklist::eBlacklistOperation op) { if (op == FSAssetBlacklist::eBlacklistOperation::BLACKLIST_ADD) { bool need_sort = mResultList->isSorted(); mResultList->setNeedsSort(false); - for (LLSD::map_const_iterator it = data.beginMap(); it != data.endMap(); ++it) + for (const auto& [id, data] : data) { - LLUUID id = LLUUID(it->first); - LLSD insert_data = it->second; - addElementToList(id, insert_data); + mResultList->deleteItems(id); + if (data.has_value()) + { + addElementToList(id, data.value()); + } } mResultList->setNeedsSort(need_sort); @@ -194,9 +262,9 @@ void FSFloaterAssetBlacklist::onBlacklistChanged(const LLSD& data, FSAssetBlackl } else { - for (LLSD::array_const_iterator it = data.beginArray(); it != data.endArray(); ++it) + for (const auto& [id, data] : data) { - mResultList->deleteItems(*it); + mResultList->deleteItems(id); } mResultList->updateLayout(); } diff --git a/indra/newview/fsfloaterassetblacklist.h b/indra/newview/fsfloaterassetblacklist.h index 0e36346ad8..7696762a12 100644 --- a/indra/newview/fsfloaterassetblacklist.h +++ b/indra/newview/fsfloaterassetblacklist.h @@ -50,7 +50,7 @@ public: bool tick() override; void closeFloater(bool app_quitting = false) override; - void addElementToList(const LLUUID& id, const LLSD& data); + void addElementToList(const LLUUID& id, const FSAssetBlacklistData& data); void removeElements(); protected: @@ -60,11 +60,13 @@ protected: void onStopBtn(); void onCloseBtn(); void onFilterEdit(const std::string& search_string); - void onBlacklistChanged(const LLSD& data, FSAssetBlacklist::eBlacklistOperation op); + void onBlacklistChanged(const FSAssetBlacklist::changed_signal_data_t& data, FSAssetBlacklist::eBlacklistOperation op); void onSelectionChanged(); void buildBlacklist(); - std::string getTypeString(S32 type); + std::string getTypeString(S32 type) const; + std::string getFlagString(FSAssetBlacklist::eBlacklistFlag source) const; + static FSAssetBlacklist::eBlacklistFlag getFlagFromLLSD(const LLSD& data); LLUUID mAudioSourceID; diff --git a/indra/newview/fsfloatercontacts.cpp b/indra/newview/fsfloatercontacts.cpp index 2bf2f924fc..41ff0c8593 100644 --- a/indra/newview/fsfloatercontacts.cpp +++ b/indra/newview/fsfloatercontacts.cpp @@ -648,8 +648,7 @@ void FSFloaterContacts::addFriend(const LLUUID& agent_id) { const LLRelationship* info = at.getBuddyInfo(agent_id); LLUUID request_id = LLUUID::generateNewID(); - LLAvatarNameCache::callback_connection_t conn = LLAvatarNameCache::get(agent_id, boost::bind(&FSFloaterContacts::updateFriendItem, this, agent_id, info, request_id)); - mAvatarNameCacheConnections[request_id] = conn; + mAvatarNameCacheConnections.try_emplace(request_id, LLAvatarNameCache::get(agent_id, boost::bind(&FSFloaterContacts::updateFriendItem, this, agent_id, info, request_id))); } LLSD element; @@ -742,8 +741,7 @@ void FSFloaterContacts::updateFriendItem(const LLUUID& agent_id, const LLRelatio if (!LLAvatarNameCache::get(agent_id, &av_name)) { LLUUID request_id = LLUUID::generateNewID(); - LLAvatarNameCache::callback_connection_t conn = LLAvatarNameCache::get(agent_id, boost::bind(&FSFloaterContacts::updateFriendItem, this, agent_id, info, request_id)); - mAvatarNameCacheConnections[request_id] = conn; + mAvatarNameCacheConnections.try_emplace(request_id, LLAvatarNameCache::get(agent_id, boost::bind(&FSFloaterContacts::updateFriendItem, this, agent_id, info, request_id))); } // Name of the status icon to use @@ -1250,21 +1248,19 @@ void FSFloaterContacts::onColumnDisplayModeChanged(const std::string& settings_n void FSFloaterContacts::onDisplayNameChanged() { - listitem_vec_t items = mFriendsList->getAllData(); - for (listitem_vec_t::iterator it = items.begin(); it != items.end(); ++it) + for (auto item : mFriendsList->getAllData()) { LLAvatarName av_name; - if (LLAvatarNameCache::get((*it)->getUUID(), &av_name)) + if (LLAvatarNameCache::get(item->getUUID(), &av_name)) { - (*it)->getColumn(LIST_FRIEND_USER_NAME)->setValue(av_name.getUserNameForDisplay()); - (*it)->getColumn(LIST_FRIEND_DISPLAY_NAME)->setValue(av_name.getDisplayName()); - (*it)->getColumn(LIST_FRIEND_NAME)->setValue(getFullName(av_name)); + item->getColumn(LIST_FRIEND_USER_NAME)->setValue(av_name.getUserNameForDisplay()); + item->getColumn(LIST_FRIEND_DISPLAY_NAME)->setValue(av_name.getDisplayName()); + item->getColumn(LIST_FRIEND_NAME)->setValue(getFullName(av_name)); } else { LLUUID request_id = LLUUID::generateNewID(); - LLAvatarNameCache::callback_connection_t conn = LLAvatarNameCache::get((*it)->getUUID(), boost::bind(&FSFloaterContacts::setDirtyNames, this, request_id)); - mAvatarNameCacheConnections[request_id] = conn; + mAvatarNameCacheConnections.try_emplace(request_id, LLAvatarNameCache::get(item->getUUID(), boost::bind(&FSFloaterContacts::setDirtyNames, this, request_id))); } } mFriendsList->setNeedsSort(); diff --git a/indra/newview/fsfloaterposer.cpp b/indra/newview/fsfloaterposer.cpp index 22ac6d0a94..1fd1bdbd32 100644 --- a/indra/newview/fsfloaterposer.cpp +++ b/indra/newview/fsfloaterposer.cpp @@ -2427,7 +2427,7 @@ bool FSFloaterPoser::savePoseToBvh(LLVOAvatar* avatar, const std::string& poseFi return false; } - return true; + return writeSuccess; } bool FSFloaterPoser::writePoseAsBvh(llofstream* fileStream, LLVOAvatar* avatar) @@ -2454,7 +2454,6 @@ void FSFloaterPoser::writeBvhFragment(llofstream* fileStream, LLVOAvatar* avatar if (!joint) return; - auto position = mPoserAnimator.getJointPosition(avatar, *joint); auto saveAxis = getBvhJointTranslation(joint->jointName()); switch (joint->boneType()) @@ -2559,7 +2558,7 @@ void FSFloaterPoser::writeBvhMotion(llofstream* fileStream, LLVOAvatar* avatar, switch (joint->boneType()) { case WHOLEAVATAR: - *fileStream << vec3ToXYZString(position) + " " + rotationToString(rotation); + *fileStream << positionToString(position) + " " + rotationToString(rotation); break; default: @@ -2575,9 +2574,10 @@ void FSFloaterPoser::writeBvhMotion(llofstream* fileStream, LLVOAvatar* avatar, } } -std::string FSFloaterPoser::vec3ToXYZString(const LLVector3& val) +std::string FSFloaterPoser::positionToString(const LLVector3& val) { - return std::to_string(val[VX]) + " " + std::to_string(val[VY]) + " " + std::to_string(val[VZ]); + const float metresToInches = 39.37008f; + return std::to_string(metresToInches * val[VY]) + " " + std::to_string(metresToInches * val[VZ]) + " " + std::to_string(metresToInches * val[VX]); } std::string FSFloaterPoser::rotationToString(const LLVector3& val) diff --git a/indra/newview/fsfloaterposer.h b/indra/newview/fsfloaterposer.h index 7e0e6c42e4..3603ca659b 100644 --- a/indra/newview/fsfloaterposer.h +++ b/indra/newview/fsfloaterposer.h @@ -426,7 +426,7 @@ public: /// /// Transforms the supplied vector into a string of three numbers, format suiting to writing into a BVH file. /// - std::string static vec3ToXYZString(const LLVector3& val); + std::string static positionToString(const LLVector3& val); /// /// Performs an angle module of the supplied value to between -180 & 180 (degrees). diff --git a/indra/newview/lggcontactsets.cpp b/indra/newview/lggcontactsets.cpp index df5cbb8aa9..479f4e02b9 100644 --- a/indra/newview/lggcontactsets.cpp +++ b/indra/newview/lggcontactsets.cpp @@ -767,15 +767,23 @@ void LGGContactSets::setPseudonym(const LLUUID& friend_id, std::string_view pseu inst->fetch(friend_id); LLVOAvatar::invalidateNameTag(friend_id); - if (auto it = mAvatarNameCacheConnections.find(friend_id); it != mAvatarNameCacheConnections.end()) + if (LLAvatarName av_name; LLAvatarNameCache::get(friend_id, &av_name)) { - if (it->second.connected()) - { - it->second.disconnect(); - } - mAvatarNameCacheConnections.erase(it); + mChangedSignal(UPDATED_MEMBERS); + } + else + { + if (auto it = mAvatarNameCacheConnections.find(friend_id); it != mAvatarNameCacheConnections.end()) + { + if (it->second.connected()) + { + it->second.disconnect(); + } + mAvatarNameCacheConnections.erase(it); + } + + mAvatarNameCacheConnections.try_emplace(friend_id, LLAvatarNameCache::get(friend_id, boost::bind(&LGGContactSets::onAvatarNameCache, this, _1))); } - mAvatarNameCacheConnections[friend_id] = LLAvatarNameCache::get(friend_id, boost::bind(&LGGContactSets::onAvatarNameCache, this, _1)); saveToDisk(); } @@ -802,15 +810,24 @@ void LGGContactSets::clearPseudonym(const LLUUID& friend_id, bool save_changes / removeNonFriendFromList(friend_id, save_changes); } - if (auto it = mAvatarNameCacheConnections.find(friend_id); it != mAvatarNameCacheConnections.end()) + if (LLAvatarName av_name; LLAvatarNameCache::get(friend_id, &av_name)) { - if (it->second.connected()) - { - it->second.disconnect(); - } - mAvatarNameCacheConnections.erase(it); + mChangedSignal(UPDATED_MEMBERS); } - mAvatarNameCacheConnections[friend_id] = LLAvatarNameCache::get(friend_id, boost::bind(&LGGContactSets::onAvatarNameCache, this, _1)); + else + { + if (auto it = mAvatarNameCacheConnections.find(friend_id); it != mAvatarNameCacheConnections.end()) + { + if (it->second.connected()) + { + it->second.disconnect(); + } + mAvatarNameCacheConnections.erase(it); + } + + mAvatarNameCacheConnections.try_emplace(friend_id, LLAvatarNameCache::get(friend_id, boost::bind(&LGGContactSets::onAvatarNameCache, this, _1))); + } + if (save_changes) { saveToDisk(); diff --git a/indra/newview/llavataractions.cpp b/indra/newview/llavataractions.cpp index c340930972..ff809b09d9 100644 --- a/indra/newview/llavataractions.cpp +++ b/indra/newview/llavataractions.cpp @@ -2531,7 +2531,7 @@ void LLAvatarActions::derenderMultiple(const uuid_vec_t& agent_ids, bool permane //static void LLAvatarActions::onDerenderAvatarNameLookup(const LLUUID& agent_id, const LLAvatarName& av_name, bool permanent) { - FSAssetBlacklist::getInstance()->addNewItemToBlacklist(agent_id, av_name.getUserName(), "", LLAssetType::AT_PERSON, permanent, permanent); + FSAssetBlacklist::getInstance()->addNewItemToBlacklist(agent_id, av_name.getUserName(), "", LLAssetType::AT_PERSON, FSAssetBlacklist::eBlacklistFlag::NONE, permanent, permanent); LLViewerObject* av_obj = gObjectList.findObject(agent_id); if (av_obj) diff --git a/indra/newview/llheroprobemanager.cpp b/indra/newview/llheroprobemanager.cpp index 8633fe00cb..d768f2bb49 100644 --- a/indra/newview/llheroprobemanager.cpp +++ b/indra/newview/llheroprobemanager.cpp @@ -540,10 +540,22 @@ void LLHeroProbeManager::updateUniforms() void LLHeroProbeManager::renderDebug() { gDebugProgram.bind(); + // Add a bit more metadata to the probe debug view + std::map groupCount; + std::map objCount; + std::map locCount; + for (LLReflectionMap* probe : mProbes) + { + if (!probe->isRelevant()) continue; + groupCount[ probe->mGroup ]++; + objCount[ probe->mViewerObject ]++; + locCount[ probe->mOrigin.getF32ptr() ]++; + } + // for (auto& probe : mProbes) { - renderReflectionProbe(probe); + renderReflectionProbe(probe, groupCount, objCount, locCount); // Add a bit more metadata to the probe debug view } gDebugProgram.unbind(); @@ -658,7 +670,7 @@ bool LLHeroProbeManager::registerViewerObject(LLVOVolume* drawablep) // Probe isn't in our list for consideration. Add it. mHeroVOList.push_back(drawablep); return true; - } + } return false; } @@ -680,6 +692,6 @@ void LLHeroProbeManager::unregisterViewerObject(LLVOVolume* drawablep) mDefaultProbe->mViewerObject = nullptr; } } - // + // } diff --git a/indra/newview/llnetmap.cpp b/indra/newview/llnetmap.cpp index 3de843627f..09f7ec42a6 100644 --- a/indra/newview/llnetmap.cpp +++ b/indra/newview/llnetmap.cpp @@ -1761,7 +1761,8 @@ bool LLNetMap::handleRightMouseDown(S32 x, S32 y, MASK mask) LLMenuItemCallGL::Params p; p.name = llformat("Profile Item %d", itAgent - mClosestAgentsToCursor.begin()); - LLAvatarName avName; const LLUUID& idAgent = *itAgent; + LLAvatarName avName; + const LLUUID& idAgent = *itAgent; if (LLAvatarNameCache::get(idAgent, &avName)) { p.label = avName.getCompleteName(); @@ -1778,7 +1779,7 @@ bool LLNetMap::handleRightMouseDown(S32 x, S32 y, MASK mask) } mAvatarNameCacheConnections.erase(it); } - mAvatarNameCacheConnections[idAgent] = LLAvatarNameCache::get(idAgent, boost::bind(&LLNetMap::setAvatarProfileLabel, this, _1, _2, p.name.getValue())); + mAvatarNameCacheConnections.try_emplace(idAgent, LLAvatarNameCache::get(idAgent, boost::bind(&LLNetMap::setAvatarProfileLabel, this, _1, _2, p.name.getValue()))); } p.on_click.function = boost::bind(&LLAvatarActions::showProfile, _2); p.on_click.parameter = idAgent; diff --git a/indra/newview/llpanelgroupbulk.cpp b/indra/newview/llpanelgroupbulk.cpp index 8032e207cd..89d59e68b1 100644 --- a/indra/newview/llpanelgroupbulk.cpp +++ b/indra/newview/llpanelgroupbulk.cpp @@ -63,7 +63,7 @@ LLPanelGroupBulkImpl::LLPanelGroupBulkImpl(const LLUUID& group_id) : mTooManySelected(), mCloseCallback(NULL), mCloseCallbackUserData(NULL), - mAvatarNameCacheConnection(), + //mAvatarNameCacheConnection(), // Fix avatar name loading mRoleNames(NULL), mOwnerWarning(), mAlreadyInGroup(), @@ -74,10 +74,19 @@ LLPanelGroupBulkImpl::LLPanelGroupBulkImpl(const LLUUID& group_id) : LLPanelGroupBulkImpl::~LLPanelGroupBulkImpl() { - if (mAvatarNameCacheConnection.connected()) + // Fix avatar name loading + //if (mAvatarNameCacheConnection.connected()) + //{ + // mAvatarNameCacheConnection.disconnect(); + //} + for (auto& [id, connection] : mAvatarNameCacheConnections) { - mAvatarNameCacheConnection.disconnect(); + if (connection.connected()) + connection.disconnect(); } + + mAvatarNameCacheConnections.clear(); + // } void LLPanelGroupBulkImpl::callbackClickAdd(LLPanelGroupBulk* panelp) @@ -134,26 +143,51 @@ void LLPanelGroupBulkImpl::addUsers(const uuid_vec_t& agent_ids) } else { - if (mAvatarNameCacheConnection.connected()) + // Fix avatar name loading + //if (mAvatarNameCacheConnection.connected()) + //{ + // mAvatarNameCacheConnection.disconnect(); + //} + //// *TODO : Add a callback per avatar name being fetched. + //mAvatarNameCacheConnection = LLAvatarNameCache::get(agent_id, + // [&](const LLUUID& agent_id, const LLAvatarName& av_name) + // { + // onAvatarNameCache(agent_id, av_name); + // }); + + if (auto found = mAvatarNameCacheConnections.find(agent_id); found != mAvatarNameCacheConnections.end()) { - mAvatarNameCacheConnection.disconnect(); + if (found->second.connected()) + found->second.disconnect(); + + mAvatarNameCacheConnections.erase(found); } - // *TODO : Add a callback per avatar name being fetched. - mAvatarNameCacheConnection = LLAvatarNameCache::get(agent_id, + + mAvatarNameCacheConnections.try_emplace(agent_id, LLAvatarNameCache::get(agent_id, [&](const LLUUID& agent_id, const LLAvatarName& av_name) { onAvatarNameCache(agent_id, av_name); - }); + })); + // } } } void LLPanelGroupBulkImpl::onAvatarNameCache(const LLUUID& agent_id, const LLAvatarName& av_name) { - if (mAvatarNameCacheConnection.connected()) + // Fix avatar name loading + //if (mAvatarNameCacheConnection.connected()) + //{ + // mAvatarNameCacheConnection.disconnect(); + //} + if (auto found = mAvatarNameCacheConnections.find(agent_id); found != mAvatarNameCacheConnections.end()) { - mAvatarNameCacheConnection.disconnect(); + if (found->second.connected()) + found->second.disconnect(); + + mAvatarNameCacheConnections.erase(found); } + // std::vector names; uuid_vec_t agent_ids; diff --git a/indra/newview/llpanelgroupbulkimpl.h b/indra/newview/llpanelgroupbulkimpl.h index 5515bd6d9a..6b5eb38092 100644 --- a/indra/newview/llpanelgroupbulkimpl.h +++ b/indra/newview/llpanelgroupbulkimpl.h @@ -84,7 +84,9 @@ public: void (*mCloseCallback)(void* data); void* mCloseCallbackUserData; - boost::signals2::connection mAvatarNameCacheConnection; + // Fix avatar name loading + //boost::signals2::connection mAvatarNameCacheConnection; + std::map mAvatarNameCacheConnections; // The following are for the LLPanelGroupInvite subclass only. // These aren't needed for LLPanelGroupBulkBan, but if we have to add another diff --git a/indra/newview/llreflectionmap.cpp b/indra/newview/llreflectionmap.cpp index 910509928d..9965440dfb 100644 --- a/indra/newview/llreflectionmap.cpp +++ b/indra/newview/llreflectionmap.cpp @@ -291,25 +291,54 @@ bool LLReflectionMap::isActive() const bool LLReflectionMap::isRelevant() const { - static LLCachedControl RenderReflectionProbeLevel(gSavedSettings, "RenderReflectionProbeLevel", 3); + static LLCachedControl sRenderReflectionProbeLevel(gSavedSettings, "RenderReflectionProbeLevel", (S32)ProbeLevel::FULL_SCENE_WITH_AUTO); + // [FIRE-35070] Correct isRelevant() logic for coverage == None and refactor to make it less fragile + // if (mViewerObject && RenderReflectionProbeLevel > 0) + // { // not an automatic probe + // return true; + // } - if (mViewerObject && RenderReflectionProbeLevel > 0) - { // not an automatic probe + // if (RenderReflectionProbeLevel == 3) + // { // all automatics are relevant + // return true; + // } + + // if (RenderReflectionProbeLevel == 2) + // { // terrain and water only, ignore probes that have a group + // return !mGroup; + // } + + // // no automatic probes, yes manual probes + // return mViewerObject != nullptr; + // Implied logic: a probe has a group if it is either a manual or automatic, it has an object if it is manual + // hasGroup hasObject (in parenthesis means condition not checked) + // Manual true true + // Terrain/Water false (false) + // Automatic true false + + const bool is_manual = mViewerObject != nullptr ; + const bool is_automatic = mGroup != nullptr && !is_manual; + const bool is_terrain = mGroup == nullptr; + switch (sRenderReflectionProbeLevel) + { + case (S32)ProbeLevel::NONE: + // no probes are relevant + return false; + case (S32)ProbeLevel::MANUAL_ONLY: + // only manual probes are relevant + return is_manual; + case (S32)ProbeLevel::MANUAL_AND_TERRAIN: + // manual probes and terrain/water probes are relevant + return !is_automatic; + case (S32)ProbeLevel::FULL_SCENE_WITH_AUTO: + // all probes are relevant return true; + default: + LL_WARNS() << "Unknown RenderReflectionProbeLevel: " << (S32)sRenderReflectionProbeLevel() + << " - returning false" << LL_ENDL; + return false; } - - if (RenderReflectionProbeLevel == 3) - { // all automatics are relevant - return true; - } - - if (RenderReflectionProbeLevel == 2) - { // terrain and water only, ignore probes that have a group - return !mGroup; - } - - // no automatic probes, yes manual probes - return mViewerObject != nullptr; + // } diff --git a/indra/newview/llreflectionmap.h b/indra/newview/llreflectionmap.h index d20bba7059..a4fa913f6e 100644 --- a/indra/newview/llreflectionmap.h +++ b/indra/newview/llreflectionmap.h @@ -44,6 +44,13 @@ public: IRRADIANCE, REFLECTION }; + enum class ProbeLevel + { + NONE = 0, + MANUAL_ONLY, + MANUAL_AND_TERRAIN, + FULL_SCENE_WITH_AUTO + }; // allocate an environment map of the given resolution LLReflectionMap(); diff --git a/indra/newview/llreflectionmapmanager.cpp b/indra/newview/llreflectionmapmanager.cpp index b225fcee83..ac3e58a954 100644 --- a/indra/newview/llreflectionmapmanager.cpp +++ b/indra/newview/llreflectionmapmanager.cpp @@ -223,7 +223,7 @@ void LLReflectionMapManager::update() } static LLCachedControl sDetail(gSavedSettings, "RenderReflectionProbeDetail", -1); - static LLCachedControl sLevel(gSavedSettings, "RenderReflectionProbeLevel", 3); + // static LLCachedControl sLevel(gSavedSettings, "RenderReflectionProbeLevel", 3); // No longer required use the pipeline cached version instead static LLCachedControl sReflectionProbeCount(gSavedSettings, "RenderReflectionProbeCount", 256U); static LLCachedControl sProbeDynamicAllocation(gSavedSettings, "RenderReflectionProbeDynamicAllocation", -1); mResetFade = llmin((F32)(mResetFade + gFrameIntervalSeconds * 2.f), 1.f); @@ -232,15 +232,15 @@ void LLReflectionMapManager::update() U32 probe_count_temp = mDynamicProbeCount; if (sProbeDynamicAllocation > -1) { - if (sLevel == 0) + if (LLPipeline::sReflectionProbeLevel == (S32)LLReflectionMap::ProbeLevel::NONE)// No longer required use the pipeline cached version instead { mDynamicProbeCount = 1; } - else if (sLevel == 1) + else if (LLPipeline::sReflectionProbeLevel == (S32)LLReflectionMap::ProbeLevel::MANUAL_ONLY)// No longer required use the pipeline cached version instead { mDynamicProbeCount = (U32)mProbes.size(); } - else if (sLevel == 2) + else if (LLPipeline::sReflectionProbeLevel == (S32)LLReflectionMap::ProbeLevel::MANUAL_AND_TERRAIN)// No longer required use the pipeline cached version instead { mDynamicProbeCount = llmax((U32)mProbes.size(), 128); } @@ -456,13 +456,15 @@ void LLReflectionMapManager::update() { closestDynamic = probe; } - - if (sLevel == 0) - { - // only update default probe when coverage is set to none - llassert(probe == mDefaultProbe); - break; - } + // This code is no longer required and this update loop should self-cleanse + // However: There appears to be something that causes the reference count to be 2 for some probes that should no longer be in use. + // if (sLevel == 0) + // { + // // only update default probe when coverage is set to none + // llassert(probe == mDefaultProbe); + // break; + // } + // } if (realtime && closestDynamic != nullptr) @@ -489,12 +491,12 @@ void LLReflectionMapManager::update() static LLCachedControl sUpdatePeriod(gSavedSettings, "RenderDefaultProbeUpdatePeriod", 2.f); if ((gFrameTimeSeconds - mDefaultProbe->mLastUpdateTime) < sUpdatePeriod) { - if (sLevel == 0) + if (LLPipeline::sReflectionProbeLevel == (S32)LLReflectionMap::ProbeLevel::NONE) // No longer required use the pipeline cached version instead { // when probes are disabled don't update the default probe more often than the prescribed update period oldestProbe = nullptr; } } - else if (sLevel > 0) + else if (LLPipeline::sReflectionProbeLevel > (S32)LLReflectionMap::ProbeLevel::NONE) // No longer required use the pipeline cached version instead { // when probes are enabled don't update the default probe less often than the prescribed update period oldestProbe = mDefaultProbe; } @@ -628,6 +630,12 @@ void LLReflectionMapManager::getReflectionMaps(std::vector& ma LLReflectionMap* LLReflectionMapManager::registerSpatialGroup(LLSpatialGroup* group) { + // [FIRE-35070] Don't register probes if we're not using them + if( LLPipeline::sReflectionProbeLevel == (S32)LLReflectionMap::ProbeLevel::NONE) + { + return nullptr; + } + // if (!group) { return nullptr; @@ -648,7 +656,10 @@ LLReflectionMap* LLReflectionMapManager::registerSpatialGroup(LLSpatialGroup* gr LLReflectionMap* LLReflectionMapManager::registerViewerObject(LLViewerObject* vobj) { - if (!LLPipeline::sReflectionProbesEnabled) + // [FIRE-35070] Don't register manual probes if we're not using them + // if (!LLPipeline::sReflectionProbesEnabled) + if (LLPipeline::sReflectionProbeLevel == (S32)LLReflectionMap::ProbeLevel::NONE) + // { return nullptr; } @@ -1315,7 +1326,7 @@ void LLReflectionMapManager::setUniforms() } -void renderReflectionProbe(LLReflectionMap* probe) +void renderReflectionProbe(LLReflectionMap* probe, std::map groupCount, std::map objCount, std::map locCount) { if (probe->isRelevant()) { @@ -1338,7 +1349,7 @@ void renderReflectionProbe(LLReflectionMap* probe) gGL.end(); gGL.flush(); - gGL.diffuseColor4f(1, 1, 0, 1); + gGL.diffuseColor4f(0, 1, 1, 1); gGL.begin(gGL.LINES); for (auto& neighbor : probe->mNeighbors) { @@ -1350,6 +1361,44 @@ void renderReflectionProbe(LLReflectionMap* probe) } gGL.end(); gGL.flush(); + + // --- New: draw a point at the probe origin color-coded by type --- + bool dupByGroup = (probe->mGroup && groupCount[ probe->mGroup ] > 1); + bool dupByObject= (probe->mViewerObject && objCount[ probe->mViewerObject ] > 1); + bool dupByLoc = ( locCount[ probe->mOrigin.getF32ptr()] > 1); + + const bool is_manual = probe->mViewerObject != nullptr; + const bool is_automatic = (probe->mGroup != nullptr) && !is_manual; + // terrain/water is when neither manual nor automatic + // const bool is_terrain = !is_manual && !is_automatic; + + if (is_manual) + { + // red dot for manual probes + gGL.diffuseColor4f(1.f, 0.f, 0.f, 1.f); + } + else if (is_automatic) + { + // blue dot for automatic probes + gGL.diffuseColor4f(0.f, 0.f, 1.f, 1.f); + } + else + { + // green dot for terrain/water probes + gGL.diffuseColor4f(0.f, 1.f, 0.f, 1.f); + } + + // use a bigger dot if *any* duplicate condition is true + const float normalSize = 9.f; + const float bigSize = 18.f; + float pointSize = (dupByGroup || dupByObject || dupByLoc) + ? bigSize + : normalSize; + glPointSize(pointSize); + gGL.begin(gGL.POINTS); + gGL.vertex3fv(po); + gGL.end(); + gGL.flush(); } #if 0 @@ -1403,10 +1452,21 @@ void renderReflectionProbe(LLReflectionMap* probe) void LLReflectionMapManager::renderDebug() { gDebugProgram.bind(); + + std::map groupCount; + std::map objCount; + std::map locCount; + for (LLReflectionMap* probe : mProbes) + { + if (!probe->isRelevant()) continue; + groupCount[ probe->mGroup ]++; + objCount[ probe->mViewerObject ]++; + locCount[ probe->mOrigin.getF32ptr() ]++; + } for (auto& probe : mProbes) { - renderReflectionProbe(probe); + renderReflectionProbe(probe, groupCount, objCount, locCount); } gDebugProgram.unbind(); diff --git a/indra/newview/llreflectionmapmanager.h b/indra/newview/llreflectionmapmanager.h index 0719c28134..623320a2c0 100644 --- a/indra/newview/llreflectionmapmanager.h +++ b/indra/newview/llreflectionmapmanager.h @@ -43,8 +43,7 @@ class LLViewerObject; // reflection probe mininum scale #define LL_REFLECTION_PROBE_MINIMUM_SCALE 1.f; -void renderReflectionProbe(LLReflectionMap* probe); - +void renderReflectionProbe(LLReflectionMap* probe, std::map groupCount, std::map objCount, std::map locCount); // enhanced metadata render for probes class alignas(16) LLReflectionMapManager { LL_ALIGN_NEW diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index 9e0ec0fb49..503e989a51 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -3327,7 +3327,7 @@ void derenderObject(bool permanent) asset_type = LLAssetType::AT_OBJECT; } - FSAssetBlacklist::getInstance()->addNewItemToBlacklist(id, entry_name, region_name, asset_type, permanent, false); + FSAssetBlacklist::getInstance()->addNewItemToBlacklist(id, entry_name, region_name, asset_type, FSAssetBlacklist::eBlacklistFlag::NONE, permanent, false); if (permanent) { diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index b49d6223e5..bf9b3c3ca3 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -4700,6 +4700,38 @@ void process_time_synch(LLMessageSystem *mesgsys, void **user_data) (void)sun_direction, (void)moon_direction, (void)phase; } +// Sound blacklist +static bool is_sound_blacklisted(const LLUUID& sound_id, const LLUUID& object_id, const LLUUID& owner_id) +{ + FSAssetBlacklist& blacklist = FSAssetBlacklist::instance(); + + if (blacklist.isBlacklisted(sound_id, LLAssetType::AT_SOUND)) + { + return true; + } + else if (object_id == owner_id) + { + // Gesture sound + return blacklist.isBlacklisted(owner_id, LLAssetType::AT_SOUND, FSAssetBlacklist::eBlacklistFlag::GESTURE); + } + else if (LLViewerObject* object = gObjectList.findObject(object_id)) + { + if (object->isAttachment()) + { + // Attachment sound + return blacklist.isBlacklisted(owner_id, LLAssetType::AT_SOUND, FSAssetBlacklist::eBlacklistFlag::WORN); + } + else + { + // Rezzed object sound + return blacklist.isBlacklisted(owner_id, LLAssetType::AT_SOUND, FSAssetBlacklist::eBlacklistFlag::REZZED); + } + } + + return false; +} +// + void process_sound_trigger(LLMessageSystem *msg, void **) { if (!gAudiop) @@ -4728,10 +4760,8 @@ void process_sound_trigger(LLMessageSystem *msg, void **) // // Asset blacklist - if (FSAssetBlacklist::getInstance()->isBlacklisted(sound_id, LLAssetType::AT_SOUND)) - { + if (is_sound_blacklisted(sound_id, object_id, owner_id)) return; - } // // NaCl - Antispam Registry @@ -4837,11 +4867,14 @@ void process_preload_sound(LLMessageSystem *msg, void **user_data) msg->getUUIDFast(_PREHASH_DataBlock, _PREHASH_ObjectID, object_id); msg->getUUIDFast(_PREHASH_DataBlock, _PREHASH_OwnerID, owner_id); - // Asset blacklist - if (FSAssetBlacklist::getInstance()->isBlacklisted(sound_id, LLAssetType::AT_SOUND)) - { + // Protect against corrupted sounds + if (gAudiop->isCorruptSound(sound_id)) + return; + // + + // Asset blacklist + if (is_sound_blacklisted(sound_id, object_id, owner_id)) return; - } // // NaCl - Antispam Registry @@ -4853,12 +4886,7 @@ void process_preload_sound(LLMessageSystem *msg, void **user_data) } // NaCl End - // Protect against corrupted sounds - if( gAudiop->isCorruptSound( sound_id ) ) - return; - // - - LLViewerObject *objectp = gObjectList.findObject(object_id); + LLViewerObject* objectp = gObjectList.findObject(object_id); if (!objectp) return; if (LLMuteList::getInstance()->isMuted(object_id)) return; @@ -4894,11 +4922,14 @@ void process_attached_sound(LLMessageSystem *msg, void **user_data) msg->getUUIDFast(_PREHASH_DataBlock, _PREHASH_ObjectID, object_id); msg->getUUIDFast(_PREHASH_DataBlock, _PREHASH_OwnerID, owner_id); - // Asset blacklist - if (FSAssetBlacklist::getInstance()->isBlacklisted(sound_id, LLAssetType::AT_SOUND)) - { + // Protect against corrupted sounds + if (gAudiop->isCorruptSound(sound_id)) + return; + // + + // Asset blacklist + if (is_sound_blacklisted(sound_id, object_id, owner_id)) return; - } // // NaCl - Antispam Registry diff --git a/indra/newview/llviewerobject.cpp b/indra/newview/llviewerobject.cpp index 74c4d9b4f5..e44d7df155 100644 --- a/indra/newview/llviewerobject.cpp +++ b/indra/newview/llviewerobject.cpp @@ -6602,13 +6602,6 @@ void LLViewerObject::setAttachedSound(const LLUUID &audio_uuid, const LLUUID& ow return; } - // Asset blacklist - if (FSAssetBlacklist::getInstance()->isBlacklisted(audio_uuid, LLAssetType::AT_SOUND)) - { - return; - } - // - if (flags & LL_SOUND_FLAG_LOOP && mAudioSourcep && mAudioSourcep->isLoop() && mAudioSourcep->getCurrentData() && mAudioSourcep->getCurrentData()->getID() == audio_uuid) diff --git a/indra/newview/llviewerregion.cpp b/indra/newview/llviewerregion.cpp index c214507a46..4ba7ce90fb 100755 --- a/indra/newview/llviewerregion.cpp +++ b/indra/newview/llviewerregion.cpp @@ -1357,6 +1357,12 @@ U32 LLViewerRegion::getNumOfVisibleGroups() const void LLViewerRegion::updateReflectionProbes(bool full_update) { + // [FIRE-35070] Don't update reflection probes if disabled + if (LLPipeline::sReflectionProbeLevel == (S32)LLReflectionMap::ProbeLevel::NONE) + { + return; // no probes + } + // if (!full_update && mReflectionMaps.empty()) { return; diff --git a/indra/newview/permissionstracker.cpp b/indra/newview/permissionstracker.cpp index ef5c496639..6899705ecc 100644 --- a/indra/newview/permissionstracker.cpp +++ b/indra/newview/permissionstracker.cpp @@ -225,8 +225,7 @@ void PermissionsTracker::objectPropertiesCallback(LLMessageSystem* msg) mPermissionsList[source_id].objectName = object_name; mPermissionsList[source_id].ownerID = object_owner; - LLAvatarName avatar_name; - if (LLAvatarNameCache::get(object_owner, &avatar_name)) + if (LLAvatarName avatar_name; LLAvatarNameCache::get(object_owner, &avatar_name)) { LL_DEBUGS("PermissionsTracker") << "Found cached entry for owner " << object_owner.asString() << ": " << avatar_name.getCompleteName() << LL_ENDL; @@ -234,10 +233,8 @@ void PermissionsTracker::objectPropertiesCallback(LLMessageSystem* msg) } else if (mAvatarNameCacheConnections.find(object_owner) != mAvatarNameCacheConnections.end()) { - boost::signals2::connection cb_connection = LLAvatarNameCache::get(object_owner, boost::bind(&PermissionsTracker::avatarNameCallback, this, _1, _2)); - mAvatarNameCacheConnections.insert(std::make_pair(object_owner, cb_connection)); - LL_DEBUGS("PermissionsTracker") << "Requesting avatar name for owner " << object_owner.asString() << LL_ENDL; + mAvatarNameCacheConnections.try_emplace(object_owner, LLAvatarNameCache::get(object_owner, boost::bind(&PermissionsTracker::avatarNameCallback, this, _1, _2))); } } } diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index fd18971733..7196dbfadb 100644 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -352,6 +352,7 @@ bool LLPipeline::sRenderAttachedLights = true; bool LLPipeline::sRenderAttachedParticles = true; bool LLPipeline::sRenderDeferred = false; bool LLPipeline::sReflectionProbesEnabled = false; +S32 LLPipeline::sReflectionProbeLevel = (S32)LLReflectionMap::ProbeLevel::NONE; // [FIRE-35070] Address progressive FPS loss. S32 LLPipeline::sVisibleLightCount = 0; bool LLPipeline::sRenderingHUDs; F32 LLPipeline::sDistortionWaterClipPlaneMargin = 1.0125f; @@ -1262,8 +1263,10 @@ void LLPipeline::refreshCachedSettings() RenderMirrors = gSavedSettings.getBOOL("RenderMirrors"); RenderHeroProbeUpdateRate = gSavedSettings.getS32("RenderHeroProbeUpdateRate"); RenderHeroProbeConservativeUpdateMultiplier = gSavedSettings.getS32("RenderHeroProbeConservativeUpdateMultiplier"); - sReflectionProbesEnabled = LLFeatureManager::getInstance()->isFeatureAvailable("RenderReflectionsEnabled") && gSavedSettings.getBOOL("RenderReflectionsEnabled"); + // [FIRE-35070] Instead of using the above we'll add a new static level variable to save some lookups. Making the above "work" with ProbeLevel will break everything. + sReflectionProbeLevel = gSavedSettings.getS32("RenderReflectionProbeLevel"); + // RenderSpotLight = nullptr; if (gNonInteractive) diff --git a/indra/newview/pipeline.h b/indra/newview/pipeline.h index 3a7954b7b3..323cc92355 100644 --- a/indra/newview/pipeline.h +++ b/indra/newview/pipeline.h @@ -690,6 +690,9 @@ public: static bool sRenderAttachedParticles; static bool sRenderDeferred; static bool sReflectionProbesEnabled; + // [FIRE-35070] Address gradual slowdown issue + static S32 sReflectionProbeLevel; + // static S32 sVisibleLightCount; static bool sRenderingHUDs; static F32 sDistortionWaterClipPlaneMargin; diff --git a/indra/newview/poses/hand_presets/Two_Finger_Salute.xml b/indra/newview/poses/hand_presets/Two_Finger_Salute.xml index 049520006f..4648f19c9b 100644 --- a/indra/newview/poses/hand_presets/Two_Finger_Salute.xml +++ b/indra/newview/poses/hand_presets/Two_Finger_Salute.xml @@ -14,8 +14,8 @@ rotation - 0.07227716594934463500976562 - 0.2199114710092544555664062 + 0.072256624698638916015625 + 0.2199114412069320678710938 0.2693966925144195556640625 scale @@ -39,9 +39,9 @@ rotation - -0.05256520584225654602050781 - 0.1256637275218963623046875 - -0.4665162861347198486328125 + -0.072256624698638916015625 + 0.2199114412069320678710938 + -0.2693966925144195556640625 scale @@ -64,9 +64,9 @@ rotation - 0.03285326063632965087890625 - 1.455191696309032778344772e-11 - -0.01314130239188671112060547 + 0.03281218931078910827636719 + 1.455191522836685180664062e-11 + -0.01314130332320928573608398 scale @@ -89,9 +89,9 @@ rotation - -0.03285326063632965087890625 - 1.455191696309032778344772e-11 - 0.01314130239188671112060547 + -0.03281218931078910827636719 + 1.455191522836685180664062e-11 + 0.01314130332320928573608398 scale @@ -114,7 +114,7 @@ rotation - 0.01971195824444293975830078 + 0.01972222141921520233154297 0 0 @@ -139,7 +139,7 @@ rotation - -0.01971195824444293975830078 + -0.01972222141921520233154297 0 0 @@ -164,9 +164,9 @@ rotation - 0.04599455744028091430664062 - -4.65661342818890489070327e-10 - 0.06570650637149810791015625 + 0.04607669264078140258789062 + -2.3283064365386962890625e-10 + 0.0657065212726593017578125 scale @@ -189,9 +189,9 @@ rotation - -0.09855977445840835571289062 - 0 - 0.006570650730282068252563477 + -0.04607669264078140258789062 + -2.3283064365386962890625e-10 + -0.0657065212726593017578125 scale @@ -214,7 +214,7 @@ rotation - 0.03285325691103935241699219 + 0.03281219303607940673828125 0 0 @@ -239,7 +239,7 @@ rotation - -0.03285325691103935241699219 + -0.03281219303607940673828125 0 0 @@ -264,8 +264,8 @@ rotation - 0.01971195638179779052734375 - 2.910383392618065556689544e-11 + 0.0197222232818603515625 + -8.731149137020111083984375e-11 -0.04599456489086151123046875 scale @@ -289,8 +289,8 @@ rotation - -0.01971195638179779052734375 - 2.910383392618065556689544e-11 + -0.0197222232818603515625 + -8.731149137020111083984375e-11 0.04599456489086151123046875 scale @@ -314,9 +314,9 @@ rotation - -0.749054372310638427734375 + -0.749095380306243896484375 -0.543495595455169677734375 - -0.913320600986480712890625 + -0.91332066059112548828125 scale @@ -339,9 +339,9 @@ rotation - -1.42372357845306396484375 - -0.589437425136566162109375 - -0.1377763897180557250976562 + 0.749095380306243896484375 + -0.543495595455169677734375 + 0.91332066059112548828125 scale @@ -365,8 +365,8 @@ rotation -2.0171897411346435546875 - -1.099557399749755859375 - -0.64392375946044921875 + -1.09955728054046630859375 + -0.643852174282073974609375 scale @@ -389,9 +389,9 @@ rotation - -0.03942390903830528259277344 - 0.03141593188047409057617188 - 0.03285326063632965087890625 + 2.0171897411346435546875 + -1.09955728054046630859375 + 0.643852174282073974609375 scale @@ -415,8 +415,8 @@ rotation -0.558505475521087646484375 - -0.56548678874969482421875 - -0.05256522819399833679199219 + -0.565486729145050048828125 + -0.05253438279032707214355469 scale @@ -439,9 +439,9 @@ rotation - -0.0131413042545318603515625 - 5.820767479125521504101926e-11 - -0.1051304414868354797363281 + 0.558505475521087646484375 + -0.565486729145050048828125 + 0.05253438279032707214355469 scale @@ -464,9 +464,9 @@ rotation - -0.987495481967926025390625 - 0.01987109147012233734130859 - -0.498646259307861328125 + -0.987507343292236328125 + 0.01987109519541263580322266 + -0.498646318912506103515625 scale @@ -489,9 +489,9 @@ rotation - -1.4442241191864013671875 - -0.281714916229248046875 - -0.3864487111568450927734375 + 0.987507343292236328125 + 0.01987109519541263580322266 + 0.498646318912506103515625 scale @@ -514,9 +514,9 @@ rotation - -1.96462452411651611328125 + -1.9645426273345947265625 -0.4084071218967437744140625 - -0.551934778690338134765625 + -0.551934719085693359375 scale @@ -539,9 +539,9 @@ rotation - -0.03285326063632965087890625 - 2.910383392618065556689544e-11 - -0.01971195451915264129638672 + 1.9645426273345947265625 + -0.4084071218967437744140625 + 0.551934719085693359375 scale @@ -564,7 +564,7 @@ rotation - -0.2431140989065170288085938 + -0.24312436580657958984375 0 -0.0722771584987640380859375 @@ -589,9 +589,9 @@ rotation - -0.01971195451915264129638672 - 7.27595848154516389172386e-12 - 0.006570650730282068252563477 + 0.24312436580657958984375 + 0 + 0.0722771584987640380859375 scale @@ -615,8 +615,8 @@ rotation -0.1576956808567047119140625 - 1.07128322124481201171875 - 0.1379837095737457275390625 + 1.0712833404541015625 + 0.1380554884672164916992188 scale @@ -639,9 +639,9 @@ rotation - 0.01314130239188671112060547 - 0 - 0.006570651195943355560302734 + 0.1576956808567047119140625 + 1.0712833404541015625 + -0.1380554884672164916992188 scale @@ -664,9 +664,9 @@ rotation - -1.32070124149322509765625 - 1.22522127628326416015625 - 1.018451213836669921875 + -1.32070100307464599609375 + 1.2252213954925537109375 + 1.0183994770050048828125 scale @@ -689,9 +689,9 @@ rotation - 0.03942390531301498413085938 - 5.82076609134674072265625e-11 - -0.01971195451915264129638672 + 1.32070100307464599609375 + 1.2252213954925537109375 + -1.0183994770050048828125 scale @@ -714,9 +714,9 @@ rotation - -0.597929298877716064453125 + -0.59792935848236083984375 -0.251327455043792724609375 - -0.08541848510503768920898438 + -0.08534660190343856811523438 scale @@ -739,9 +739,9 @@ rotation - 0.03285325691103935241699219 - 0 - -0 + 0.59792935848236083984375 + -0.251327455043792724609375 + 0.08534660190343856811523438 scale diff --git a/indra/newview/skins/default/xui/de/floater_NACL_explore_sounds.xml b/indra/newview/skins/default/xui/de/floater_NACL_explore_sounds.xml index 9cf016d6b2..209cba1fb7 100644 --- a/indra/newview/skins/default/xui/de/floater_NACL_explore_sounds.xml +++ b/indra/newview/skins/default/xui/de/floater_NACL_explore_sounds.xml @@ -37,4 +37,7 @@