diff options
author | Rider Linden <rider@lindenlab.com> | 2018-10-09 19:00:48 +0000 |
---|---|---|
committer | Rider Linden <rider@lindenlab.com> | 2018-10-09 19:00:48 +0000 |
commit | ac6d2b09c048d8589c572acb2965a0643b07d5ce (patch) | |
tree | 4592bf63d6fc464c9e1a961e4b64af4233ab93bf | |
parent | c2cbb40a0eecb1c3b4a21ffa4d169f23f1e7006b (diff) | |
parent | 83b508a656aebedff915b2fdcd292432a8aaa7b2 (diff) |
Merged in andreykproductengine/maint-eep2 (pull request #137)
SL-9746 [EEP] Local Texture options should work with EEP
Approved-by: Andrey Lihatskiy <andreylproductengine@lindenlab.com>
Approved-by: Maxim Nikolenko <maximnproductengine@lindenlab.com>
-rw-r--r-- | indra/newview/llfloatereditextdaycycle.cpp | 80 | ||||
-rw-r--r-- | indra/newview/llfloaterfixedenvironment.cpp | 58 | ||||
-rw-r--r-- | indra/newview/llinventorypanel.cpp | 408 | ||||
-rw-r--r-- | indra/newview/llinventorypanel.h | 4 | ||||
-rw-r--r-- | indra/newview/lllocalbitmaps.cpp | 13 | ||||
-rw-r--r-- | indra/newview/lllocalbitmaps.h | 1 | ||||
-rw-r--r-- | indra/newview/llpaneleditsky.cpp | 6 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/floater_my_environments.xml | 5 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/floater_settings_picker.xml | 5 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/notifications.xml | 16 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/strings.xml | 7 |
11 files changed, 339 insertions, 264 deletions
diff --git a/indra/newview/llfloatereditextdaycycle.cpp b/indra/newview/llfloatereditextdaycycle.cpp index 840b392f5d..e1220e5592 100644 --- a/indra/newview/llfloatereditextdaycycle.cpp +++ b/indra/newview/llfloatereditextdaycycle.cpp @@ -34,6 +34,7 @@ #include "llcheckboxctrl.h" #include "llcombobox.h" #include "llloadingindicator.h" +#include "lllocalbitmaps.h" #include "llmultisliderctrl.h" #include "llnotifications.h" #include "llnotificationsutil.h" @@ -346,7 +347,7 @@ void LLFloaterEditExtDayCycle::onOpen(const LLSD& key) getChild<LLButton>(track_tabs[idx + 1], true)->setLabel(formatted_label.getString()); } - for (int i = 2; i < LLSettingsDay::TRACK_MAX; i++) //skies #2 through #4 + for (U32 i = 2; i < LLSettingsDay::TRACK_MAX; i++) //skies #2 through #4 { getChild<LLButton>(track_tabs[i])->setEnabled(extended_env); } @@ -513,6 +514,81 @@ void LLFloaterEditExtDayCycle::onButtonApply(LLUICtrl *ctrl, const LLSD &data) return; } + // brute-force local texture scan + for (U32 i = 0; i <= LLSettingsDay::TRACK_MAX; i++) + { + LLSettingsDay::CycleTrack_t &day_track = dayclone->getCycleTrack(i); + + LLSettingsDay::CycleTrack_t::iterator iter = day_track.begin(); + LLSettingsDay::CycleTrack_t::iterator end = day_track.end(); + S32 frame_num = 0; + + while (iter != end) + { + frame_num++; + std::string desc; + bool is_local = false; // because getString can be empty + if (i == LLSettingsDay::TRACK_WATER) + { + LLSettingsWater::ptr_t water = std::static_pointer_cast<LLSettingsWater>(iter->second); + if (water) + { + // LLViewerFetchedTexture and check for FTT_LOCAL_FILE or check LLLocalBitmapMgr + if (LLLocalBitmapMgr::isLocal(water->getNormalMapID())) + { + desc = LLTrans::getString("EnvironmentNormalMap"); + is_local = true; + } + else if (LLLocalBitmapMgr::isLocal(water->getTransparentTextureID())) + { + desc = LLTrans::getString("EnvironmentTransparent"); + is_local = true; + } + } + } + else + { + LLSettingsSky::ptr_t sky = std::static_pointer_cast<LLSettingsSky>(iter->second); + if (sky) + { + if (LLLocalBitmapMgr::isLocal(sky->getSunTextureId())) + { + desc = LLTrans::getString("EnvironmentSun"); + is_local = true; + } + else if (LLLocalBitmapMgr::isLocal(sky->getMoonTextureId())) + { + desc = LLTrans::getString("EnvironmentMoon"); + is_local = true; + } + else if (LLLocalBitmapMgr::isLocal(sky->getCloudNoiseTextureId())) + { + desc = LLTrans::getString("EnvironmentCloudNoise"); + is_local = true; + } + else if (LLLocalBitmapMgr::isLocal(sky->getBloomTextureId())) + { + desc = LLTrans::getString("EnvironmentBloom"); + is_local = true; + } + } + } + + if (is_local) + { + LLSD args; + LLButton* button = getChild<LLButton>(track_tabs[i], true); + args["TRACK"] = button->getCurrentLabel(); + args["FRAME"] = iter->first * 100; // % + args["FIELD"] = desc; + args["FRAMENO"] = frame_num; + LLNotificationsUtil::add("WLLocalTextureDayBlock", args); + return; + } + iter++; + } + } + if (ctrl_action == ACTION_SAVE) { doApplyUpdateInventory(dayclone); @@ -817,7 +893,7 @@ void LLFloaterEditExtDayCycle::selectTrack(U32 track_index, bool force ) return; } - for (int i = 0; i < LLSettingsDay::TRACK_MAX; i++) // use max value + for (U32 i = 0; i < LLSettingsDay::TRACK_MAX; i++) // use max value { getChild<LLButton>(track_tabs[i], true)->setToggleState(i == mCurrentTrack); } diff --git a/indra/newview/llfloaterfixedenvironment.cpp b/indra/newview/llfloaterfixedenvironment.cpp index 5cd99e6ad2..201c6679b3 100644 --- a/indra/newview/llfloaterfixedenvironment.cpp +++ b/indra/newview/llfloaterfixedenvironment.cpp @@ -37,6 +37,7 @@ #include "llsliderctrl.h" #include "lltabcontainer.h" #include "llfilepicker.h" +#include "lllocalbitmaps.h" #include "llsettingspicker.h" #include "llviewermenufile.h" // LLFilePickerReplyThread #include "llviewerparcelmgr.h" @@ -51,6 +52,7 @@ #include "llenvironment.h" #include "llagent.h" #include "llparcel.h" +#include "lltrans.h" #include "llsettingsvo.h" #include "llinventorymodel.h" @@ -340,6 +342,62 @@ void LLFloaterFixedEnvironment::onButtonApply(LLUICtrl *ctrl, const LLSD &data) { std::string ctrl_action = ctrl->getName(); + std::string local_desc; + bool is_local = false; // because getString can be empty + if (mSettings->getSettingsType() == "water") + { + LLSettingsWater::ptr_t water = std::static_pointer_cast<LLSettingsWater>(mSettings); + if (water) + { + // LLViewerFetchedTexture and check for FTT_LOCAL_FILE or check LLLocalBitmapMgr + if (LLLocalBitmapMgr::isLocal(water->getNormalMapID())) + { + local_desc = LLTrans::getString("EnvironmentNormalMap"); + is_local = true; + } + else if (LLLocalBitmapMgr::isLocal(water->getTransparentTextureID())) + { + local_desc = LLTrans::getString("EnvironmentTransparent"); + is_local = true; + } + } + } + else if (mSettings->getSettingsType() == "sky") + { + LLSettingsSky::ptr_t sky = std::static_pointer_cast<LLSettingsSky>(mSettings); + if (sky) + { + if (LLLocalBitmapMgr::isLocal(sky->getSunTextureId())) + { + local_desc = LLTrans::getString("EnvironmentSun"); + is_local = true; + } + else if (LLLocalBitmapMgr::isLocal(sky->getMoonTextureId())) + { + local_desc = LLTrans::getString("EnvironmentMoon"); + is_local = true; + } + else if (LLLocalBitmapMgr::isLocal(sky->getCloudNoiseTextureId())) + { + local_desc = LLTrans::getString("EnvironmentCloudNoise"); + is_local = true; + } + else if (LLLocalBitmapMgr::isLocal(sky->getBloomTextureId())) + { + local_desc = LLTrans::getString("EnvironmentBloom"); + is_local = true; + } + } + } + + if (is_local) + { + LLSD args; + args["FIELD"] = local_desc; + LLNotificationsUtil::add("WLLocalTextureFixedBlock", args); + return; + } + if (ctrl_action == ACTION_SAVE) { doApplyUpdateInventory(); diff --git a/indra/newview/llinventorypanel.cpp b/indra/newview/llinventorypanel.cpp index d8c2de649e..002c7a3215 100644 --- a/indra/newview/llinventorypanel.cpp +++ b/indra/newview/llinventorypanel.cpp @@ -46,18 +46,12 @@ #include "llnotificationsutil.h" #include "llpreview.h" #include "llsidepanelinventory.h" -#include "llstartup.h" #include "lltrans.h" #include "llviewerattachmenu.h" #include "llviewerfoldertype.h" #include "llvoavatarself.h" -class LLInventoryRecentItemsPanel; -class LLAssetFilteredInventoryPanel; - static LLDefaultChildRegistry::Register<LLInventoryPanel> r("inventory_panel"); -static LLDefaultChildRegistry::Register<LLInventoryRecentItemsPanel> t_recent_inventory_panel("recent_inventory_panel"); -static LLDefaultChildRegistry::Register<LLAssetFilteredInventoryPanel> t_asset_filtered_inv_panel("asset_filtered_inv_panel"); const std::string LLInventoryPanel::DEFAULT_SORT_ORDER = std::string("InventorySortOrder"); const std::string LLInventoryPanel::RECENTITEMS_SORT_ORDER = std::string("RecentItemsSortOrder"); @@ -277,9 +271,9 @@ void LLInventoryPanel::initFromParams(const LLInventoryPanel::Params& params) mCompletionObserver = new LLInvPanelComplObserver(boost::bind(&LLInventoryPanel::onItemsCompletion, this)); mInventory->addObserver(mCompletionObserver); - // Build view of inventory if we need default full hierarchy and inventory ready, otherwise do in onIdle. - // Initializing views takes a while so always do it onIdle if viewer already loaded. - if (mInventory->isInventoryUsable() && !mViewsInitialized && LLStartUp::getStartupState() <= STATE_WEARABLES_WAIT) + // Build view of inventory if we need default full hierarchy and inventory ready, + // otherwise wait for idle callback. + if (mInventory->isInventoryUsable() && !mViewsInitialized) { initializeViews(); } @@ -457,204 +451,198 @@ LLInventoryFilter::EFolderShow LLInventoryPanel::getShowFolderState() return getFilter().getShowFolderState(); } -void LLInventoryPanel::itemChanged(const LLUUID& item_id, U32 mask, const LLInventoryObject* model_item) +// Called when something changed in the global model (new item, item coming through the wire, rename, move, etc...) (CHUI-849) +static LLTrace::BlockTimerStatHandle FTM_REFRESH("Inventory Refresh"); +void LLInventoryPanel::modelChanged(U32 mask) { - LLFolderViewItem* view_item = getItemByID(item_id); - LLFolderViewModelItemInventory* viewmodel_item = - static_cast<LLFolderViewModelItemInventory*>(view_item ? view_item->getViewModelItem() : NULL); + LL_RECORD_BLOCK_TIME(FTM_REFRESH); - // LLFolderViewFolder is derived from LLFolderViewItem so dynamic_cast from item - // to folder is the fast way to get a folder without searching through folders tree. - LLFolderViewFolder* view_folder = NULL; + if (!mViewsInitialized) return; + + const LLInventoryModel* model = getModel(); + if (!model) return; - // Check requires as this item might have already been deleted - // as a child of its deleted parent. - if (model_item && view_item) - { - view_folder = dynamic_cast<LLFolderViewFolder*>(view_item); - } + const LLInventoryModel::changed_items_t& changed_items = model->getChangedIDs(); + if (changed_items.empty()) return; - ////////////////////////////// - // LABEL Operation - // Empty out the display name for relabel. - if (mask & LLInventoryObserver::LABEL) + for (LLInventoryModel::changed_items_t::const_iterator items_iter = changed_items.begin(); + items_iter != changed_items.end(); + ++items_iter) { - if (view_item) - { - // Request refresh on this item (also flags for filtering) - LLInvFVBridge* bridge = (LLInvFVBridge*)view_item->getViewModelItem(); - if(bridge) - { - // Clear the display name first, so it gets properly re-built during refresh() - bridge->clearDisplayName(); + const LLUUID& item_id = (*items_iter); + const LLInventoryObject* model_item = model->getObject(item_id); + LLFolderViewItem* view_item = getItemByID(item_id); + LLFolderViewModelItemInventory* viewmodel_item = + static_cast<LLFolderViewModelItemInventory*>(view_item ? view_item->getViewModelItem() : NULL); - view_item->refresh(); - } - LLFolderViewFolder* parent = view_item->getParentFolder(); - if(parent) - { - parent->getViewModelItem()->dirtyDescendantsFilter(); - } - } - } + // LLFolderViewFolder is derived from LLFolderViewItem so dynamic_cast from item + // to folder is the fast way to get a folder without searching through folders tree. + LLFolderViewFolder* view_folder = NULL; - ////////////////////////////// - // REBUILD Operation - // Destroy and regenerate the UI. - if (mask & LLInventoryObserver::REBUILD) - { - if (model_item && view_item && viewmodel_item) + // Check requires as this item might have already been deleted + // as a child of its deleted parent. + if (model_item && view_item) { - const LLUUID& idp = viewmodel_item->getUUID(); - view_item->destroyView(); - removeItemID(idp); + view_folder = dynamic_cast<LLFolderViewFolder*>(view_item); } - view_item = buildNewViews(item_id); - viewmodel_item = - static_cast<LLFolderViewModelItemInventory*>(view_item ? view_item->getViewModelItem() : NULL); - view_folder = dynamic_cast<LLFolderViewFolder *>(view_item); - } - ////////////////////////////// - // INTERNAL Operation - // This could be anything. For now, just refresh the item. - if (mask & LLInventoryObserver::INTERNAL) - { - if (view_item) + ////////////////////////////// + // LABEL Operation + // Empty out the display name for relabel. + if (mask & LLInventoryObserver::LABEL) { - view_item->refresh(); + if (view_item) + { + // Request refresh on this item (also flags for filtering) + LLInvFVBridge* bridge = (LLInvFVBridge*)view_item->getViewModelItem(); + if(bridge) + { // Clear the display name first, so it gets properly re-built during refresh() + bridge->clearDisplayName(); + + view_item->refresh(); + } + LLFolderViewFolder* parent = view_item->getParentFolder(); + if(parent) + { + parent->getViewModelItem()->dirtyDescendantsFilter(); + } + } } - } - ////////////////////////////// - // SORT Operation - // Sort the folder. - if (mask & LLInventoryObserver::SORT) - { - if (view_folder) + ////////////////////////////// + // REBUILD Operation + // Destroy and regenerate the UI. + if (mask & LLInventoryObserver::REBUILD) { - view_folder->getViewModelItem()->requestSort(); + if (model_item && view_item && viewmodel_item) + { + const LLUUID& idp = viewmodel_item->getUUID(); + view_item->destroyView(); + removeItemID(idp); + } + view_item = buildNewViews(item_id); + viewmodel_item = + static_cast<LLFolderViewModelItemInventory*>(view_item ? view_item->getViewModelItem() : NULL); + view_folder = dynamic_cast<LLFolderViewFolder *>(view_item); } - } - // We don't typically care which of these masks the item is actually flagged with, since the masks - // may not be accurate (e.g. in the main inventory panel, I move an item from My Inventory into - // Landmarks; this is a STRUCTURE change for that panel but is an ADD change for the Landmarks - // panel). What's relevant is that the item and UI are probably out of sync and thus need to be - // resynchronized. - if (mask & (LLInventoryObserver::STRUCTURE | - LLInventoryObserver::ADD | - LLInventoryObserver::REMOVE)) - { ////////////////////////////// - // ADD Operation - // Item exists in memory but a UI element hasn't been created for it. - if (model_item && !view_item) + // INTERNAL Operation + // This could be anything. For now, just refresh the item. + if (mask & LLInventoryObserver::INTERNAL) { - // Add the UI element for this item. - buildNewViews(item_id); - // Select any newly created object that has the auto rename at top of folder root set. - if(mFolderRoot.get()->getRoot()->needsAutoRename()) + if (view_item) { - setSelection(item_id, FALSE); + view_item->refresh(); } - updateFolderLabel(model_item->getParentUUID()); } ////////////////////////////// - // STRUCTURE Operation - // This item already exists in both memory and UI. It was probably reparented. - else if (model_item && view_item) + // SORT Operation + // Sort the folder. + if (mask & LLInventoryObserver::SORT) { - LLFolderViewFolder* old_parent = view_item->getParentFolder(); - // Don't process the item if it is the root - if (old_parent) + if (view_folder) { - LLFolderViewModelItemInventory* viewmodel_folder = static_cast<LLFolderViewModelItemInventory*>(old_parent->getViewModelItem()); - LLFolderViewFolder* new_parent = (LLFolderViewFolder*)getItemByID(model_item->getParentUUID()); - // Item has been moved. - if (old_parent != new_parent) + view_folder->getViewModelItem()->requestSort(); + } + } + + // We don't typically care which of these masks the item is actually flagged with, since the masks + // may not be accurate (e.g. in the main inventory panel, I move an item from My Inventory into + // Landmarks; this is a STRUCTURE change for that panel but is an ADD change for the Landmarks + // panel). What's relevant is that the item and UI are probably out of sync and thus need to be + // resynchronized. + if (mask & (LLInventoryObserver::STRUCTURE | + LLInventoryObserver::ADD | + LLInventoryObserver::REMOVE)) + { + ////////////////////////////// + // ADD Operation + // Item exists in memory but a UI element hasn't been created for it. + if (model_item && !view_item) + { + // Add the UI element for this item. + buildNewViews(item_id); + // Select any newly created object that has the auto rename at top of folder root set. + if(mFolderRoot.get()->getRoot()->needsAutoRename()) { - if (new_parent != NULL) + setSelection(item_id, FALSE); + } + updateFolderLabel(model_item->getParentUUID()); + } + + ////////////////////////////// + // STRUCTURE Operation + // This item already exists in both memory and UI. It was probably reparented. + else if (model_item && view_item) + { + LLFolderViewFolder* old_parent = view_item->getParentFolder(); + // Don't process the item if it is the root + if (old_parent) + { + LLFolderViewModelItemInventory* viewmodel_folder = static_cast<LLFolderViewModelItemInventory*>(old_parent->getViewModelItem()); + LLFolderViewFolder* new_parent = (LLFolderViewFolder*)getItemByID(model_item->getParentUUID()); + // Item has been moved. + if (old_parent != new_parent) { - // Item is to be moved and we found its new parent in the panel's directory, so move the item's UI. - view_item->addToFolder(new_parent); - addItemID(viewmodel_item->getUUID(), view_item); - if (mInventory) + if (new_parent != NULL) { - const LLUUID trash_id = mInventory->findCategoryUUIDForType(LLFolderType::FT_TRASH); - if (trash_id != model_item->getParentUUID() && (mask & LLInventoryObserver::INTERNAL) && new_parent->isOpen()) + // Item is to be moved and we found its new parent in the panel's directory, so move the item's UI. + view_item->addToFolder(new_parent); + addItemID(viewmodel_item->getUUID(), view_item); + if (mInventory) { - setSelection(item_id, FALSE); + const LLUUID trash_id = mInventory->findCategoryUUIDForType(LLFolderType::FT_TRASH); + if (trash_id != model_item->getParentUUID() && (mask & LLInventoryObserver::INTERNAL) && new_parent->isOpen()) + { + setSelection(item_id, FALSE); + } } + updateFolderLabel(model_item->getParentUUID()); } - updateFolderLabel(model_item->getParentUUID()); - } - else - { - // Remove the item ID before destroying the view because the view-model-item gets - // destroyed when the view is destroyed - removeItemID(viewmodel_item->getUUID()); + else + { + // Remove the item ID before destroying the view because the view-model-item gets + // destroyed when the view is destroyed + removeItemID(viewmodel_item->getUUID()); - // Item is to be moved outside the panel's directory (e.g. moved to trash for a panel that - // doesn't include trash). Just remove the item's UI. - view_item->destroyView(); - } - if(viewmodel_folder) - { - updateFolderLabel(viewmodel_folder->getUUID()); + // Item is to be moved outside the panel's directory (e.g. moved to trash for a panel that + // doesn't include trash). Just remove the item's UI. + view_item->destroyView(); + } + if(viewmodel_folder) + { + updateFolderLabel(viewmodel_folder->getUUID()); + } + old_parent->getViewModelItem()->dirtyDescendantsFilter(); } - old_parent->getViewModelItem()->dirtyDescendantsFilter(); } } - } - - ////////////////////////////// - // REMOVE Operation - // This item has been removed from memory, but its associated UI element still exists. - else if (!model_item && view_item && viewmodel_item) - { - // Remove the item's UI. - LLFolderViewFolder* parent = view_item->getParentFolder(); - removeItemID(viewmodel_item->getUUID()); - view_item->destroyView(); - if(parent) + + ////////////////////////////// + // REMOVE Operation + // This item has been removed from memory, but its associated UI element still exists. + else if (!model_item && view_item && viewmodel_item) { - parent->getViewModelItem()->dirtyDescendantsFilter(); - LLFolderViewModelItemInventory* viewmodel_folder = static_cast<LLFolderViewModelItemInventory*>(parent->getViewModelItem()); - if(viewmodel_folder) + // Remove the item's UI. + LLFolderViewFolder* parent = view_item->getParentFolder(); + removeItemID(viewmodel_item->getUUID()); + view_item->destroyView(); + if(parent) { - updateFolderLabel(viewmodel_folder->getUUID()); + parent->getViewModelItem()->dirtyDescendantsFilter(); + LLFolderViewModelItemInventory* viewmodel_folder = static_cast<LLFolderViewModelItemInventory*>(parent->getViewModelItem()); + if(viewmodel_folder) + { + updateFolderLabel(viewmodel_folder->getUUID()); + } } } } } } -// Called when something changed in the global model (new item, item coming through the wire, rename, move, etc...) (CHUI-849) -static LLTrace::BlockTimerStatHandle FTM_REFRESH("Inventory Refresh"); -void LLInventoryPanel::modelChanged(U32 mask) -{ - LL_RECORD_BLOCK_TIME(FTM_REFRESH); - - if (!mViewsInitialized) return; - - const LLInventoryModel* model = getModel(); - if (!model) return; - - const LLInventoryModel::changed_items_t& changed_items = model->getChangedIDs(); - if (changed_items.empty()) return; - - for (LLInventoryModel::changed_items_t::const_iterator items_iter = changed_items.begin(); - items_iter != changed_items.end(); - ++items_iter) - { - const LLUUID& item_id = (*items_iter); - const LLInventoryObject* model_item = model->getObject(item_id); - itemChanged(item_id, mask, model_item); - } -} - LLUUID LLInventoryPanel::getRootFolderID() { LLUUID root_id; @@ -849,17 +837,14 @@ LLFolderViewItem * LLInventoryPanel::createFolderViewItem(LLInvFVBridge * bridge LLFolderViewItem* LLInventoryPanel::buildNewViews(const LLUUID& id) { - LLInventoryObject const* objectp = gInventory.getObject(id); - return buildNewViews(id, objectp); -} - -LLFolderViewItem* LLInventoryPanel::buildNewViews(const LLUUID& id, LLInventoryObject const* objectp) -{ - if (!objectp) + LLInventoryObject const* objectp = gInventory.getObject(id); + + if (!objectp) { return NULL; } - LLFolderViewItem* folder_view_item = getItemByID(id); + + LLFolderViewItem* folder_view_item = getItemByID(id); const LLUUID &parent_id = objectp->getParentUUID(); LLFolderViewFolder* parent_folder = (LLFolderViewFolder*)getItemByID(parent_id); @@ -988,7 +973,6 @@ LLFolderViewItem* LLInventoryPanel::buildNewViews(const LLUUID& id, LLInventoryO ++item_iter) { const LLViewerInventoryItem* item = (*item_iter); - if (item->getType() == LLAssetType::AT_SETTINGS) buildNewViews(item->getUUID()); } } @@ -1716,6 +1700,8 @@ bool LLInventoryPanel::isSelectionRemovable() /************************************************************************/ /* Recent Inventory Panel related class */ /************************************************************************/ +class LLInventoryRecentItemsPanel; +static LLDefaultChildRegistry::Register<LLInventoryRecentItemsPanel> t_recent_inventory_panel("recent_inventory_panel"); static const LLRecentInventoryBridgeBuilder RECENT_ITEMS_BUILDER; class LLInventoryRecentItemsPanel : public LLInventoryPanel @@ -1745,82 +1731,6 @@ LLInventoryRecentItemsPanel::LLInventoryRecentItemsPanel( const Params& params) mInvFVBridgeBuilder = &RECENT_ITEMS_BUILDER; } -/************************************************************************/ -/* Asset Pre-Filtered Inventory Panel related class */ -/* Exchanges filter's flexibility for speed of generation and */ -/* improved performance */ -/************************************************************************/ -class LLAssetFilteredInventoryPanel : public LLInventoryPanel -{ -public: - struct Params - : public LLInitParam::Block<Params, LLInventoryPanel::Params> - { - Mandatory<std::string> filter_asset_type; - - Params() : filter_asset_type("filter_asset_type") {} - }; - - void initFromParams(const Params& p); -protected: - LLAssetFilteredInventoryPanel(const Params& p) : LLInventoryPanel(p) { mAcceptsDragAndDrop = false; } - friend class LLUICtrlFactory; -public: - ~LLAssetFilteredInventoryPanel() {} - -protected: - /*virtual*/ LLFolderViewItem* buildNewViews(const LLUUID& id); - /*virtual*/ void itemChanged(const LLUUID& item_id, U32 mask, const LLInventoryObject* model_item); - -private: - LLAssetType::EType mAssetType; -}; - - -void LLAssetFilteredInventoryPanel::initFromParams(const Params& p) -{ - mAssetType = LLAssetType::lookup(p.filter_asset_type.getValue()); - LLInventoryPanel::initFromParams(p); - U64 filter_cats = getFilter().getFilterCategoryTypes(); - filter_cats &= ~(1ULL << LLFolderType::FT_TRASH); - filter_cats &= ~(1ULL << LLFolderType::FT_MARKETPLACE_LISTINGS); - getFilter().setFilterCategoryTypes(filter_cats); - // turn off marketplace for recent items - getFilter().setFilterNoMarketplaceFolder(); -} - -LLFolderViewItem* LLAssetFilteredInventoryPanel::buildNewViews(const LLUUID& id) -{ - LLInventoryObject const* objectp = gInventory.getObject(id); - - if (!objectp) - { - return NULL; - } - - if (objectp->getType() != mAssetType && objectp->getType() != LLAssetType::AT_CATEGORY) - { - return NULL; - } - - return LLInventoryPanel::buildNewViews(id, objectp); -} - -void LLAssetFilteredInventoryPanel::itemChanged(const LLUUID& id, U32 mask, const LLInventoryObject* model_item) -{ - if (!model_item) - { - return; - } - - if (model_item->getType() != mAssetType && model_item->getType() != LLAssetType::AT_CATEGORY) - { - return; - } - - LLInventoryPanel::itemChanged(id, mask, model_item); -} - namespace LLInitParam { void TypeValues<LLFolderType::EType>::declareValues() diff --git a/indra/newview/llinventorypanel.h b/indra/newview/llinventorypanel.h index b968b19d9a..90fd659522 100644 --- a/indra/newview/llinventorypanel.h +++ b/indra/newview/llinventorypanel.h @@ -319,9 +319,7 @@ protected: static LLUIColor sLibraryColor; static LLUIColor sLinkColor; - virtual LLFolderViewItem* buildNewViews(const LLUUID& id); - LLFolderViewItem* buildNewViews(const LLUUID& id, LLInventoryObject const* objectp); - virtual void itemChanged(const LLUUID& item_id, U32 mask, const LLInventoryObject* model_item); + LLFolderViewItem* buildNewViews(const LLUUID& id); BOOL getIsHiddenFolderType(LLFolderType::EType folder_type) const; virtual LLFolderView * createFolderRoot(LLUUID root_id ); diff --git a/indra/newview/lllocalbitmaps.cpp b/indra/newview/lllocalbitmaps.cpp index 760325b652..47b6da708c 100644 --- a/indra/newview/lllocalbitmaps.cpp +++ b/indra/newview/lllocalbitmaps.cpp @@ -976,6 +976,19 @@ LLUUID LLLocalBitmapMgr::getWorldID(LLUUID tracking_id) return world_id; } +bool LLLocalBitmapMgr::isLocal(const LLUUID world_id) +{ + for (local_list_iter iter = sBitmapList.begin(); iter != sBitmapList.end(); iter++) + { + LLLocalBitmap* unit = *iter; + if (unit->getWorldID() == world_id) + { + return true; + } + } + return false; +} + std::string LLLocalBitmapMgr::getFilename(LLUUID tracking_id) { std::string filename = ""; diff --git a/indra/newview/lllocalbitmaps.h b/indra/newview/lllocalbitmaps.h index ee4161fb45..3b33091fdb 100644 --- a/indra/newview/lllocalbitmaps.h +++ b/indra/newview/lllocalbitmaps.h @@ -123,6 +123,7 @@ class LLLocalBitmapMgr static bool checkTextureDimensions(std::string filename); static LLUUID getWorldID(LLUUID tracking_id); + static bool isLocal(const LLUUID world_id); static std::string getFilename(LLUUID tracking_id); static void feedScrollList(LLScrollListCtrl* ctrl); diff --git a/indra/newview/llpaneleditsky.cpp b/indra/newview/llpaneleditsky.cpp index d0e916363d..1e1683c2e2 100644 --- a/indra/newview/llpaneleditsky.cpp +++ b/indra/newview/llpaneleditsky.cpp @@ -262,7 +262,6 @@ BOOL LLPanelSettingsSkyCloudTab::postBuild() getChild<LLTextureCtrl>(FIELD_SKY_CLOUD_MAP)->setCommitCallback([this](LLUICtrl *, const LLSD &) { onCloudMapChanged(); }); getChild<LLTextureCtrl>(FIELD_SKY_CLOUD_MAP)->setDefaultImageAssetID(LLSettingsSky::GetDefaultCloudNoiseTextureId()); getChild<LLTextureCtrl>(FIELD_SKY_CLOUD_MAP)->setAllowNoTexture(TRUE); - getChild<LLTextureCtrl>(FIELD_SKY_CLOUD_MAP)->setAllowLocalTexture(FALSE); getChild<LLUICtrl>(FIELD_SKY_CLOUD_DENSITY_X)->setCommitCallback([this](LLUICtrl *, const LLSD &) { onCloudDensityChanged(); }); getChild<LLUICtrl>(FIELD_SKY_CLOUD_DENSITY_Y)->setCommitCallback([this](LLUICtrl *, const LLSD &) { onCloudDensityChanged(); }); @@ -360,7 +359,8 @@ void LLPanelSettingsSkyCloudTab::onCloudScrollChanged() void LLPanelSettingsSkyCloudTab::onCloudMapChanged() { - mSkySettings->setCloudNoiseTextureId(getChild<LLTextureCtrl>(FIELD_SKY_CLOUD_MAP)->getValue().asUUID()); + LLTextureCtrl* ctrl = getChild<LLTextureCtrl>(FIELD_SKY_CLOUD_MAP); + mSkySettings->setCloudNoiseTextureId(ctrl->getValue().asUUID()); setIsDirty(); } @@ -403,13 +403,11 @@ BOOL LLPanelSettingsSkySunMoonTab::postBuild() getChild<LLTextureCtrl>(FIELD_SKY_SUN_IMAGE)->setBlankImageAssetID(LLSettingsSky::GetBlankSunTextureId()); getChild<LLTextureCtrl>(FIELD_SKY_SUN_IMAGE)->setDefaultImageAssetID(LLSettingsSky::GetBlankSunTextureId()); getChild<LLTextureCtrl>(FIELD_SKY_SUN_IMAGE)->setAllowNoTexture(TRUE); - getChild<LLTextureCtrl>(FIELD_SKY_SUN_IMAGE)->setAllowLocalTexture(FALSE); getChild<LLUICtrl>(FIELD_SKY_MOON_ROTATION)->setCommitCallback([this](LLUICtrl *, const LLSD &) { onMoonRotationChanged(); }); getChild<LLUICtrl>(FIELD_SKY_MOON_IMAGE)->setCommitCallback([this](LLUICtrl *, const LLSD &) { onMoonImageChanged(); }); getChild<LLTextureCtrl>(FIELD_SKY_MOON_IMAGE)->setDefaultImageAssetID(LLSettingsSky::GetDefaultMoonTextureId()); getChild<LLTextureCtrl>(FIELD_SKY_MOON_IMAGE)->setBlankImageAssetID(LLSettingsSky::GetBlankSunTextureId()); getChild<LLTextureCtrl>(FIELD_SKY_MOON_IMAGE)->setAllowNoTexture(TRUE); - getChild<LLTextureCtrl>(FIELD_SKY_MOON_IMAGE)->setAllowLocalTexture(FALSE); getChild<LLUICtrl>(FIELD_SKY_MOON_SCALE)->setCommitCallback([this](LLUICtrl *, const LLSD &) { onMoonScaleChanged(); }); getChild<LLUICtrl>(FIELD_SKY_MOON_BRIGHTNESS)->setCommitCallback([this](LLUICtrl *, const LLSD &) { onMoonBrightnessChanged(); }); diff --git a/indra/newview/skins/default/xui/en/floater_my_environments.xml b/indra/newview/skins/default/xui/en/floater_my_environments.xml index 4384c01033..a11a2c1200 100644 --- a/indra/newview/skins/default/xui/en/floater_my_environments.xml +++ b/indra/newview/skins/default/xui/en/floater_my_environments.xml @@ -102,7 +102,7 @@ background_visible="true" bg_alpha_color="DkGray2" border="true"> - <asset_filtered_inv_panel + <inventory_panel left="0" top="0" right="-1" @@ -110,8 +110,7 @@ allow_multi_select="false" follows="all" layout="topleft" - name="pnl_settings" - filter_asset_type="settings"/> + name="pnl_settings"/> </panel> </layout_panel> <layout_panel diff --git a/indra/newview/skins/default/xui/en/floater_settings_picker.xml b/indra/newview/skins/default/xui/en/floater_settings_picker.xml index 7cc2c517ca..2862d1ae37 100644 --- a/indra/newview/skins/default/xui/en/floater_settings_picker.xml +++ b/indra/newview/skins/default/xui/en/floater_settings_picker.xml @@ -57,7 +57,7 @@ bottom="-2" background_visible="true" bg_alpha_color="DkGray2"> - <asset_filtered_inv_panel + <inventory_panel allow_multi_select="false" suppress_folder_menu="true" bg_visible="true" @@ -68,8 +68,7 @@ name="pnl_inventory" top="1" right="-4" - bottom="-1" - filter_asset_type="settings" /> + bottom="-1" /> </panel> </layout_panel> <layout_panel name="temp" diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml index 69503cdbf2..23e1701dc6 100644 --- a/indra/newview/skins/default/xui/en/notifications.xml +++ b/indra/newview/skins/default/xui/en/notifications.xml @@ -6072,6 +6072,22 @@ Sorry, the settings couldn't be applied to the region. Reason: [FAIL_REASON] </notification> <notification + icon="alertmodal.tga" + name="WLLocalTextureDayBlock" + type="alertmodal"> +A Local texture is in use on track [TRACK], frame #[FRAMENO] ([FRAME]%) in field [FIELD]. +Settings may not be saved using local textures. + </notification> + + <notification + icon="alertmodal.tga" + name="WLLocalTextureFixedBlock" + type="alertmodal"> +A local texture is in use in field [FIELD]. +Settings may not be saved using local textures. + </notification> + + <notification functor="GenericAcknowledge" icon="alertmodal.tga" name="EnvCannotDeleteLastDayCycleKey" diff --git a/indra/newview/skins/default/xui/en/strings.xml b/indra/newview/skins/default/xui/en/strings.xml index 8681c867bd..39c2cb79ad 100644 --- a/indra/newview/skins/default/xui/en/strings.xml +++ b/indra/newview/skins/default/xui/en/strings.xml @@ -2782,6 +2782,13 @@ If you continue to receive this message, please contact Second Life support for <string name="RegionSettings">Region Settings</string> <string name="NoEnvironmentSettings">This Region does not support environmental settings.</string> + <string name="EnvironmentSun">Sun</string> + <string name="EnvironmentMoon">Moon</string> + <string name="EnvironmentBloom">Bloom</string> + <string name="EnvironmentCloudNoise">Cloud Noise</string> + <string name="EnvironmentNormalMap">Normal Map</string> + <string name="EnvironmentTransparent">Transparent</string> + <!-- panel classified --> <string name="ClassifiedClicksTxt">Clicks: [TELEPORT] teleport, [MAP] map, [PROFILE] profile</string> <string name="ClassifiedUpdateAfterPublish">(will update after publish)</string> |