From adec0ba983c6b01c3d6c08692f3d5c7979ba90bb Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Wed, 16 Dec 2009 11:34:46 -0500 Subject: For EXT-3114: [BSI] Can't right click > edit a no-mod attachment --HG-- branch : avatar-pipeline --- indra/newview/llselectmgr.cpp | 20 ++++++++++++++++++++ indra/newview/llselectmgr.h | 1 + indra/newview/llviewermenu.cpp | 2 +- 3 files changed, 22 insertions(+), 1 deletion(-) (limited to 'indra') diff --git a/indra/newview/llselectmgr.cpp b/indra/newview/llselectmgr.cpp index 44930f03c5..59ca54a147 100644 --- a/indra/newview/llselectmgr.cpp +++ b/indra/newview/llselectmgr.cpp @@ -2277,6 +2277,26 @@ BOOL LLSelectMgr::selectGetAllValid() return TRUE; } +//----------------------------------------------------------------------------- +// selectGetAllValidAndObjectsFound() - return TRUE if selections are +// valid and objects are found. +// +// For EXT-3114 - same as selectGetModify() without the modify check. +//----------------------------------------------------------------------------- +BOOL LLSelectMgr::selectGetAllValidAndObjectsFound() +{ + for (LLObjectSelection::iterator iter = getSelection()->begin(); + iter != getSelection()->end(); iter++ ) + { + LLSelectNode* node = *iter; + LLViewerObject* object = node->getObject(); + if( !object || !node->mValid ) + { + return FALSE; + } + } + return TRUE; +} //----------------------------------------------------------------------------- // selectGetModify() - return TRUE if current agent can modify all diff --git a/indra/newview/llselectmgr.h b/indra/newview/llselectmgr.h index 6641be335a..f8ecfd0674 100644 --- a/indra/newview/llselectmgr.h +++ b/indra/newview/llselectmgr.h @@ -535,6 +535,7 @@ public: // Returns TRUE if the viewer has information on all selected objects BOOL selectGetAllRootsValid(); BOOL selectGetAllValid(); + BOOL selectGetAllValidAndObjectsFound(); // returns TRUE if you can modify all selected objects. BOOL selectGetRootsModify(); diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index e38d03c60b..313b161ce5 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -2630,7 +2630,7 @@ bool enable_object_edit() enable = LLViewerParcelMgr::getInstance()->allowAgentBuild() || LLSelectMgr::getInstance()->getSelection()->isAttachment(); } - else if (LLSelectMgr::getInstance()->selectGetModify()) + else if (LLSelectMgr::getInstance()->selectGetAllValidAndObjectsFound()) { enable = true; } -- cgit v1.2.3 From 90bb29245cbd9626f840f1d16c351ac415f7c35e Mon Sep 17 00:00:00 2001 From: "Nyx (Neal Orman)" Date: Wed, 16 Dec 2009 12:15:18 -0500 Subject: EXT-3514 update debug settings for new appearance features following changes: 1) remove renderavatarinvisible - no longer need this debug setting 2) add showobjectrenderingcost (default:TRUE) so we can turn this feature off if necessary 3) add showdebugappearanceeditor (default:FALSE) so we can test the future appearance editor code reviewed by vir and seraph --HG-- branch : avatar-pipeline --- indra/newview/app_settings/settings.xml | 35 +++++++++++++------- indra/newview/llfloatertools.cpp | 17 ++++++---- indra/newview/llfloatertools.h | 3 ++ indra/newview/llpaneloutfitsinventory.cpp | 13 +++++--- indra/newview/llpaneloutfitsinventory.h | 3 ++ indra/newview/llviewercontrol.cpp | 23 ++++++++++---- indra/newview/llvoavatarself.cpp | 37 ---------------------- indra/newview/llvoavatarself.h | 2 -- indra/newview/llwearable.cpp | 2 +- .../default/xui/en/panel_outfits_inventory.xml | 10 ++++++ .../skins/default/xui/en/sidepanel_appearance.xml | 2 ++ 11 files changed, 78 insertions(+), 69 deletions(-) (limited to 'indra') diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index eed84671c1..d6ffedb597 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -5823,17 +5823,6 @@ Value 35 - RenderAvatarInvisible - - Comment - Set your avatar as Invisible - Persist - 0 - Type - Boolean - Value - 0 - RenderAvatarVP Comment @@ -7820,6 +7809,17 @@ Value 0 + ShowDebugAppearanceEditor + + Comment + Show debugging appearance editor + Persist + 1 + Type + Boolean + Value + 0 + ShowEmptyFoldersWhenSearching Comment @@ -7918,7 +7918,18 @@ Boolean Value 1 - + + ShowObjectRenderingCost + + Comment + Show the object rendering cost in build tools + Persist + 1 + Type + Boolean + Value + 1 + ShowNavbarFavoritesPanel Comment diff --git a/indra/newview/llfloatertools.cpp b/indra/newview/llfloatertools.cpp index 7fb71d4d4f..babef5b63d 100644 --- a/indra/newview/llfloatertools.cpp +++ b/indra/newview/llfloatertools.cpp @@ -93,7 +93,7 @@ // Globals LLFloaterTools *gFloaterTools = NULL; - +bool LLFloaterTools::sShowObjectCost = true; const std::string PANEL_NAMES[LLFloaterTools::PANEL_COUNT] = { @@ -286,6 +286,8 @@ BOOL LLFloaterTools::postBuild() mStatusText["grab"] = getString("status_grab"); mStatusText["place"] = getString("status_place"); mStatusText["selectland"] = getString("status_selectland"); + + sShowObjectCost = gSavedSettings.getBOOL("ShowObjectRenderingCost"); return TRUE; } @@ -425,16 +427,19 @@ void LLFloaterTools::refresh() childSetTextArg("prim_count", "[COUNT]", prim_count_string); // calculate selection rendering cost - std::string prim_cost_string; - LLResMgr::getInstance()->getIntegerString(prim_cost_string, calcRenderCost()); - childSetTextArg("RenderingCost", "[COUNT]", prim_cost_string); + if (sShowObjectCost) + { + std::string prim_cost_string; + LLResMgr::getInstance()->getIntegerString(prim_cost_string, calcRenderCost()); + childSetTextArg("RenderingCost", "[COUNT]", prim_cost_string); + } // disable the object and prim counts if nothing selected bool have_selection = ! LLSelectMgr::getInstance()->getSelection()->isEmpty(); childSetEnabled("obj_count", have_selection); childSetEnabled("prim_count", have_selection); - childSetEnabled("RenderingCost", have_selection); + childSetEnabled("RenderingCost", have_selection && sShowObjectCost); // Refresh child tabs mPanelPermissions->refresh(); @@ -566,7 +571,7 @@ void LLFloaterTools::updatePopup(LLCoordGL center, MASK mask) mBtnEdit ->setToggleState( edit_visible ); mRadioGroupEdit->setVisible( edit_visible ); bool linked_parts = gSavedSettings.getBOOL("EditLinkedParts"); - childSetVisible("RenderingCost", !linked_parts && (edit_visible || focus_visible || move_visible)); + childSetVisible("RenderingCost", !linked_parts && (edit_visible || focus_visible || move_visible) && sShowObjectCost); if (mCheckSelectIndividual) { diff --git a/indra/newview/llfloatertools.h b/indra/newview/llfloatertools.h index 05a88a31d3..85aeb9f523 100644 --- a/indra/newview/llfloatertools.h +++ b/indra/newview/llfloatertools.h @@ -196,6 +196,9 @@ private: protected: LLSD mMediaSettings; + +public: + static bool sShowObjectCost; }; diff --git a/indra/newview/llpaneloutfitsinventory.cpp b/indra/newview/llpaneloutfitsinventory.cpp index 5b36a5406a..a6388164d5 100644 --- a/indra/newview/llpaneloutfitsinventory.cpp +++ b/indra/newview/llpaneloutfitsinventory.cpp @@ -56,7 +56,10 @@ #include "llmenugl.h" #include "llviewermenu.h" +#include "llviewercontrol.h" + static LLRegisterPanelClassWrapper t_inventory("panel_outfits_inventory"); +bool LLPanelOutfitsInventory::sShowDebugEditor = false; LLPanelOutfitsInventory::LLPanelOutfitsInventory() : mActivePanel(NULL), @@ -74,7 +77,7 @@ LLPanelOutfitsInventory::~LLPanelOutfitsInventory() // virtual BOOL LLPanelOutfitsInventory::postBuild() { - + sShowDebugEditor = gSavedSettings.getBOOL("ShowDebugAppearanceEditor"); initTabPanels(); initListCommandsHandlers(); return TRUE; @@ -86,6 +89,8 @@ void LLPanelOutfitsInventory::updateVerbs() { mParent->updateVerbs(); } + + childSetVisible("look_edit_btn",sShowDebugEditor); } void LLPanelOutfitsInventory::setParent(LLSidepanelAppearance* parent) @@ -177,7 +182,6 @@ void LLPanelOutfitsInventory::onSelectionChange(const std::dequegetCurSelectedItem(); LLFolderViewEventListener* listenerp = cur_item->getListener(); @@ -189,7 +193,6 @@ void LLPanelOutfitsInventory::onSelectorButtonClicked() LLSideTray::getInstance()->showPanel("sidepanel_appearance", key); } - */ } LLFolderViewEventListener *LLPanelOutfitsInventory::getCorrectListenerForAction() @@ -235,7 +238,9 @@ void LLPanelOutfitsInventory::initListCommandsHandlers() mListCommands->childSetAction("trash_btn", boost::bind(&LLPanelOutfitsInventory::onTrashButtonClick, this)); mListCommands->childSetAction("add_btn", boost::bind(&LLPanelOutfitsInventory::onAddButtonClick, this)); mListCommands->childSetAction("wear_btn", boost::bind(&LLPanelOutfitsInventory::onWearButtonClick, this)); - + + childSetAction("look_edit_btn", boost::bind(&LLPanelOutfitsInventory::onSelectorButtonClicked, this)); + LLDragAndDropButton* trash_btn = mListCommands->getChild("trash_btn"); trash_btn->setDragAndDropHandler(boost::bind(&LLPanelOutfitsInventory::handleDragAndDropToTrash, this , _4 // BOOL drop diff --git a/indra/newview/llpaneloutfitsinventory.h b/indra/newview/llpaneloutfitsinventory.h index 9b6b483e3b..0f1b1b066c 100644 --- a/indra/newview/llpaneloutfitsinventory.h +++ b/indra/newview/llpaneloutfitsinventory.h @@ -117,6 +117,9 @@ private: LLMenuGL* mMenuAdd; // List Commands // //////////////////////////////////////////////////////////////////////////////// + /// +public: + static bool sShowDebugEditor; }; #endif //LL_LLPANELOUTFITSINVENTORY_H diff --git a/indra/newview/llviewercontrol.cpp b/indra/newview/llviewercontrol.cpp index 6339d23fa7..4ce56039f7 100644 --- a/indra/newview/llviewercontrol.cpp +++ b/indra/newview/llviewercontrol.cpp @@ -73,6 +73,8 @@ #include "llrender.h" #include "llbottomtray.h" #include "llnavigationbar.h" +#include "llfloatertools.h" +#include "llpaneloutfitsinventory.h" #ifdef TOGGLE_HACKED_GODLIKE_VIEWER BOOL gHackGodmode = FALSE; @@ -120,12 +122,6 @@ static bool handleSetShaderChanged(const LLSD& newvalue) return true; } -static bool handleSetSelfInvisible( const LLSD& newvalue) -{ - LLVOAvatarSelf::onChangeSelfInvisible( newvalue.asBoolean() ); - return true; -} - static bool handleReleaseGLBufferChanged(const LLSD& newvalue) { if (gPipeline.isInit()) @@ -547,6 +543,18 @@ bool toggle_show_favorites_panel(const LLSD& newvalue) return true; } +bool toggle_show_appearance_editor(const LLSD& newvalue) +{ + LLPanelOutfitsInventory::sShowDebugEditor = newvalue.asBoolean(); + return true; +} + +bool toggle_show_object_render_cost(const LLSD& newvalue) +{ + LLFloaterTools::sShowObjectCost = newvalue.asBoolean(); + return true; +} + //////////////////////////////////////////////////////////////////////////// void settings_setup_listeners() @@ -567,7 +575,6 @@ void settings_setup_listeners() gSavedSettings.getControl("WindLightUseAtmosShaders")->getSignal()->connect(boost::bind(&handleSetShaderChanged, _2)); gSavedSettings.getControl("RenderGammaFull")->getSignal()->connect(boost::bind(&handleSetShaderChanged, _2)); gSavedSettings.getControl("RenderAvatarMaxVisible")->getSignal()->connect(boost::bind(&handleAvatarMaxVisibleChanged, _2)); - gSavedSettings.getControl("RenderAvatarInvisible")->getSignal()->connect(boost::bind(&handleSetSelfInvisible, _2)); gSavedSettings.getControl("RenderVolumeLODFactor")->getSignal()->connect(boost::bind(&handleVolumeLODChanged, _2)); gSavedSettings.getControl("RenderAvatarLODFactor")->getSignal()->connect(boost::bind(&handleAvatarLODChanged, _2)); gSavedSettings.getControl("RenderTerrainLODFactor")->getSignal()->connect(boost::bind(&handleTerrainLODChanged, _2)); @@ -690,6 +697,8 @@ void settings_setup_listeners() gSavedSettings.getControl("ShowSnapshotButton")->getSignal()->connect(boost::bind(&toggle_show_snapshot_button, _2)); gSavedSettings.getControl("ShowNavbarNavigationPanel")->getSignal()->connect(boost::bind(&toggle_show_navigation_panel, _2)); gSavedSettings.getControl("ShowNavbarFavoritesPanel")->getSignal()->connect(boost::bind(&toggle_show_favorites_panel, _2)); + gSavedSettings.getControl("ShowDebugAppearanceEditor")->getSignal()->connect(boost::bind(&toggle_show_appearance_editor, _2)); + gSavedSettings.getControl("ShowObjectRenderingCost")->getSignal()->connect(boost::bind(&toggle_show_object_render_cost, _2)); } #if TEST_CACHED_CONTROL diff --git a/indra/newview/llvoavatarself.cpp b/indra/newview/llvoavatarself.cpp index b4c45c23d4..ecd6b05ded 100644 --- a/indra/newview/llvoavatarself.cpp +++ b/indra/newview/llvoavatarself.cpp @@ -2021,43 +2021,6 @@ void LLVOAvatarSelf::onCustomizeEnd() } } -// static -void LLVOAvatarSelf::onChangeSelfInvisible(BOOL newvalue) -{ - LLVOAvatarSelf *avatarp = gAgent.getAvatarObject(); - if (avatarp) - { - if (newvalue) - { - // we have just requested to set the avatar's baked textures to invisible - avatarp->setInvisible(TRUE); - } - else - { - avatarp->setInvisible(FALSE); - } - } -} - -void LLVOAvatarSelf::setInvisible(BOOL newvalue) -{ - if (newvalue) - { - setCompositeUpdatesEnabled(FALSE); - for (U32 i = 0; i < mBakedTextureDatas.size(); i++ ) - { - setNewBakedTexture(mBakedTextureDatas[i].mTextureIndex, IMG_INVISIBLE); - } - gAgent.sendAgentSetAppearance(); - } - else - { - setCompositeUpdatesEnabled(TRUE); - invalidateAll(); - gAgent.sendAgentSetAppearance(); - } -} - // HACK: this will null out the avatar's local texture IDs before the TE message is sent // to ensure local texture IDs are not sent to other clients in the area. // this is a short-term solution. The long term solution will be to not set the texture diff --git a/indra/newview/llvoavatarself.h b/indra/newview/llvoavatarself.h index c7bd4eaadc..dc70996f0b 100644 --- a/indra/newview/llvoavatarself.h +++ b/indra/newview/llvoavatarself.h @@ -308,8 +308,6 @@ public: // Visibility //-------------------------------------------------------------------- public: - static void onChangeSelfInvisible(BOOL newvalue); - void setInvisible(BOOL newvalue); bool sendAppearanceMessage(LLMessageSystem *mesgsys) const; /** Appearance diff --git a/indra/newview/llwearable.cpp b/indra/newview/llwearable.cpp index 0405b9d28b..b789bd3650 100644 --- a/indra/newview/llwearable.cpp +++ b/indra/newview/llwearable.cpp @@ -356,7 +356,7 @@ BOOL LLWearable::importFile( LLFILE* file ) if( num_parameters != mVisualParamIndexMap.size() ) { - llwarns << "Wearable parameter mismatch. Reading in " << num_parameters << " from file, but created " << mVisualParamIndexMap.size() << " from avatar parameters. " << llendl; + llwarns << "Wearable parameter mismatch. Reading in " << num_parameters << " from file, but created " << mVisualParamIndexMap.size() << " from avatar parameters. type: " << mType << llendl; } // parameters diff --git a/indra/newview/skins/default/xui/en/panel_outfits_inventory.xml b/indra/newview/skins/default/xui/en/panel_outfits_inventory.xml index ab73f135b9..42537553ec 100644 --- a/indra/newview/skins/default/xui/en/panel_outfits_inventory.xml +++ b/indra/newview/skins/default/xui/en/panel_outfits_inventory.xml @@ -47,6 +47,16 @@ name="cof_accordionpanel" start_folder="Current Outfit" /> + + + Date: Wed, 16 Dec 2009 18:21:37 -0500 Subject: EXT-3527 : Centralize calls to getIsItemWorn Changed more functions to use get_is_item_worn. --HG-- branch : avatar-pipeline --- indra/newview/llinventorybridge.cpp | 48 ++++++++++++++++--------------------- 1 file changed, 20 insertions(+), 28 deletions(-) (limited to 'indra') diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index bc0bf7fdf4..fce945acda 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -1159,7 +1159,7 @@ LLFontGL::StyleFlags LLItemBridge::getLabelStyle() const { U8 font = LLFontGL::NORMAL; - if( gAgentWearables.isWearingItem( mUUID ) ) + if (get_is_item_worn(mUUID)) { // llinfos << "BOLD" << llendl; font |= LLFontGL::BOLD; @@ -1302,14 +1302,8 @@ BOOL LLItemBridge::isItemCopyable() const LLViewerInventoryItem* item = getItem(); if (item) { - // can't copy worn objects. DEV-15183 - LLVOAvatarSelf *avatarp = gAgent.getAvatarObject(); - if( !avatarp ) - { - return FALSE; - } - - if(avatarp->isWearingAttachment(mUUID)) + // Can't copy worn objects. DEV-15183 + if(get_is_item_worn(mUUID)) { return FALSE; } @@ -4004,8 +3998,7 @@ LLFontGL::StyleFlags LLObjectBridge::getLabelStyle() const { U8 font = LLFontGL::NORMAL; - LLVOAvatarSelf* avatar = gAgent.getAvatarObject(); - if( avatar && avatar->isWearingAttachment( mUUID ) ) + if(get_is_item_worn( mUUID ) ) { font |= LLFontGL::BOLD; } @@ -4021,9 +4014,9 @@ LLFontGL::StyleFlags LLObjectBridge::getLabelStyle() const std::string LLObjectBridge::getLabelSuffix() const { - LLVOAvatarSelf* avatar = gAgent.getAvatarObject(); - if( avatar && avatar->isWearingAttachment( mUUID ) ) + if (get_is_item_worn(mUUID)) { + LLVOAvatarSelf* avatar = gAgent.getAvatarObject(); std::string attachment_point_name = avatar->getAttachedPointName(mUUID); // e.g. "(worn on ...)" / "(attached to ...)" @@ -4148,12 +4141,11 @@ void LLObjectBridge::buildContextMenu(LLMenuGL& menu, U32 flags) return; } - if( avatarp->isWearingAttachment( mUUID ) ) + if( get_is_item_worn( mUUID ) ) { items.push_back(std::string("Detach From Yourself")); } - else - if( !isInTrash() && !isLinkedObjectInTrash() && !isLinkedObjectMissing()) + else if (!isInTrash() && !isLinkedObjectInTrash() && !isLinkedObjectMissing()) { items.push_back(std::string("Attach Separator")); items.push_back(std::string("Object Wear")); @@ -4379,7 +4371,7 @@ void remove_inventory_category_from_avatar_step2( BOOL proceed, LLUUID category_ if (gAgent.isTeen() && item->isWearableType() && (item->getWearableType() == WT_UNDERPANTS || item->getWearableType() == WT_UNDERSHIRT)) continue; - if( gAgentWearables.isWearingItem (item->getLinkedUUID()) ) + if (get_is_item_worn(item->getUUID())) { LLWearableList::instance().getAsset(item->getAssetUUID(), item->getName(), @@ -4430,7 +4422,7 @@ void remove_inventory_category_from_avatar_step2( BOOL proceed, LLUUID category_ BOOL LLWearableBridge::renameItem(const std::string& new_name) { - if( gAgentWearables.isWearingItem( mUUID ) ) + if (get_is_item_worn(mUUID)) { gAgentWearables.setWearableName( mUUID, new_name ); } @@ -4439,7 +4431,7 @@ BOOL LLWearableBridge::renameItem(const std::string& new_name) std::string LLWearableBridge::getLabelSuffix() const { - if( gAgentWearables.isWearingItem( mUUID ) ) + if (get_is_item_worn(mUUID)) { // e.g. "(worn)" return LLItemBridge::getLabelSuffix() + LLTrans::getString("worn"); @@ -4473,7 +4465,7 @@ void LLWearableBridge::performAction(LLFolderView* folder, LLInventoryModel* mod } else if (isRemoveAction(action)) { - if(gAgentWearables.isWearingItem(mUUID)) + if (get_is_item_worn(mUUID)) { LLViewerInventoryItem* item = getItem(); if (item) @@ -4504,7 +4496,7 @@ void LLWearableBridge::openItem() } else if(isAgentInventory()) { - if( !gAgentWearables.isWearingItem( mUUID ) ) + if( !get_is_item_worn( mUUID ) ) { wearOnAvatar(); } @@ -4604,7 +4596,7 @@ void LLWearableBridge::buildContextMenu(LLMenuGL& menu, U32 flags) case LLAssetType::AT_CLOTHING: items.push_back(std::string("Take Off")); case LLAssetType::AT_BODYPART: - if (gAgentWearables.isWearingItem(item->getUUID())) + if (get_is_item_worn(item->getUUID())) { disabled_items.push_back(std::string("Wearable Wear")); disabled_items.push_back(std::string("Wearable Add")); @@ -4635,7 +4627,7 @@ BOOL LLWearableBridge::canWearOnAvatar(void* user_data) LLViewerInventoryItem* item = (LLViewerInventoryItem*)self->getItem(); if(!item || !item->isComplete()) return FALSE; } - return (!gAgentWearables.isWearingItem(self->mUUID)); + return (!get_is_item_worn(self->mUUID)); } // Called from menus @@ -4767,7 +4759,7 @@ BOOL LLWearableBridge::canEditOnAvatar(void* user_data) LLWearableBridge* self = (LLWearableBridge*)user_data; if(!self) return FALSE; - return (gAgentWearables.isWearingItem(self->mUUID)); + return (get_is_item_worn(self->mUUID)); } // static @@ -4804,7 +4796,7 @@ BOOL LLWearableBridge::canRemoveFromAvatar(void* user_data) LLWearableBridge* self = (LLWearableBridge*)user_data; if( self && (LLAssetType::AT_BODYPART != self->mAssetType) ) { - return gAgentWearables.isWearingItem( self->mUUID ); + return get_is_item_worn( self->mUUID ); } return FALSE; } @@ -4814,7 +4806,7 @@ void LLWearableBridge::onRemoveFromAvatar(void* user_data) { LLWearableBridge* self = (LLWearableBridge*)user_data; if(!self) return; - if(gAgentWearables.isWearingItem(self->mUUID)) + if(get_is_item_worn(self->mUUID)) { LLViewerInventoryItem* item = self->getItem(); if (item) @@ -4837,7 +4829,7 @@ void LLWearableBridge::onRemoveFromAvatarArrived(LLWearable* wearable, const LLUUID &item_id = gInventory.getLinkedItemID(on_remove_struct->mUUID); if(wearable) { - if( gAgentWearables.isWearingItem( item_id ) ) + if( get_is_item_worn( item_id ) ) { EWearableType type = wearable->getType(); @@ -5121,7 +5113,7 @@ void LLWearableBridgeAction::doIt() } else if(isAgentInventory()) { - if(!gAgentWearables.isWearingItem(mUUID)) + if(!get_is_item_worn(mUUID)) { wearOnAvatar(); } -- cgit v1.2.3 From d0262fa7ce49a838e9a4530e5de8fe119de64510 Mon Sep 17 00:00:00 2001 From: Rick Pasetto Date: Wed, 16 Dec 2009 15:41:08 -0800 Subject: Dial down logging in mediadataclient --- indra/newview/llmediadataclient.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'indra') diff --git a/indra/newview/llmediadataclient.cpp b/indra/newview/llmediadataclient.cpp index 91064eea6b..2bb2a3da6f 100755 --- a/indra/newview/llmediadataclient.cpp +++ b/indra/newview/llmediadataclient.cpp @@ -224,7 +224,7 @@ bool LLMediaDataClient::processQueueTimer() if(!isEmpty()) { - LL_INFOS("LLMediaDataClient") << "QueueTimer::tick() started, SORTED queue size is: " << mSortedQueue.size() + LL_DEBUGS("LLMediaDataClient") << "QueueTimer::tick() started, SORTED queue size is: " << mSortedQueue.size() << ", RR queue size is: " << mRoundRobinQueue.size() << LL_ENDL; LL_DEBUGS("LLMediaDataClient") << "QueueTimer::tick() started, SORTED queue is: " << mSortedQueue << LL_ENDL; LL_DEBUGS("LLMediaDataClient") << "QueueTimer::tick() started, RR queue is: " << mRoundRobinQueue << LL_ENDL; @@ -262,7 +262,7 @@ void LLMediaDataClient::sortQueue() if (size > mMaxSortedQueueSize) { U32 num_to_cull = (size - mMaxSortedQueueSize); - LL_INFOS("LLMediaDataClient") << "sorted queue MAXED OUT! Culling " + LL_INFOS_ONCE("LLMediaDataClient") << "sorted queue MAXED OUT! Culling " << num_to_cull << " items" << LL_ENDL; while (num_to_cull-- > 0) { @@ -309,7 +309,7 @@ void LLMediaDataClient::serviceQueue() { if (request.isNull()) { - LL_INFOS("LLMediaDataClient") << "Skipping NULL request" << LL_ENDL; + LL_WARNS("LLMediaDataClient") << "Skipping NULL request" << LL_ENDL; } else { LL_INFOS("LLMediaDataClient") << "Skipping : " << *request << " " @@ -636,8 +636,8 @@ void LLMediaDataClient::Responder::error(U32 status, const std::string& reason) new RetryTimer(F32(retry_timeout/*secs*/), this); } else { - LL_INFOS("LLMediaDataClient") << *mRequest << " got SERVICE_UNAVAILABLE...retry count " << - mRequest->getRetryCount() << " exceeds " << mRequest->getMaxNumRetries() << ", not retrying" << LL_ENDL; + LL_INFOS("LLMediaDataClient") << *mRequest << " got SERVICE_UNAVAILABLE...retry count " + << mRequest->getRetryCount() << " exceeds " << mRequest->getMaxNumRetries() << ", not retrying" << LL_ENDL; } } else { -- cgit v1.2.3 From 8c5a13c3704c8f655eeb724cf03d8ceb26b2c76e Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Thu, 17 Dec 2009 10:20:55 -0500 Subject: For EXT-3500: Make InventorySP and AppearanceSP filters behave like it does in LandmarksSP and PeopleSP. This covers the InventorySP part. --HG-- branch : avatar-pipeline --- indra/newview/llpanelmaininventory.cpp | 9 +++++++-- indra/newview/llpanelmaininventory.h | 1 + 2 files changed, 8 insertions(+), 2 deletions(-) (limited to 'indra') diff --git a/indra/newview/llpanelmaininventory.cpp b/indra/newview/llpanelmaininventory.cpp index c0da8f3daa..961d3dec8b 100644 --- a/indra/newview/llpanelmaininventory.cpp +++ b/indra/newview/llpanelmaininventory.cpp @@ -400,6 +400,7 @@ void LLPanelMainInventory::onClearSearch() mActivePanel->getRootFolder()->applyFunctorRecursively(opener); mActivePanel->getRootFolder()->scrollToShowSelection(); } + mFilterSubString = ""; } void LLPanelMainInventory::onFilterEdit(const std::string& search_string ) @@ -417,6 +418,7 @@ void LLPanelMainInventory::onFilterEdit(const std::string& search_string ) std::string uppercase_search_string = search_string; LLStringUtil::toUpper(uppercase_search_string); + mFilterSubString = uppercase_search_string; if (mActivePanel->getFilterSubString().empty() && uppercase_search_string.empty()) { // current filter and new filter empty, do nothing @@ -431,7 +433,7 @@ void LLPanelMainInventory::onFilterEdit(const std::string& search_string ) } // set new filter string - mActivePanel->setFilterSubString(uppercase_search_string); + mActivePanel->setFilterSubString(mFilterSubString); } @@ -484,6 +486,7 @@ void LLPanelMainInventory::onFilterSelected() { return; } + setFilterSubString(mFilterSubString); LLInventoryFilter* filter = mActivePanel->getFilter(); LLFloaterInventoryFinder *finder = getFinder(); if (finder) @@ -542,7 +545,7 @@ void LLPanelMainInventory::draw() { if (mActivePanel && mFilterEditor) { - mFilterEditor->setText(mActivePanel->getFilterSubString()); + mFilterEditor->setText(mFilterSubString); } LLPanel::draw(); } @@ -1016,9 +1019,11 @@ void LLPanelMainInventory::onCustomAction(const LLSD& userdata) } const LLUUID& item_id = current_item->getListener()->getUUID(); const std::string &item_name = current_item->getListener()->getName(); + mFilterSubString = item_name; LLInventoryFilter *filter = mActivePanel->getFilter(); filter->setFilterSubString(item_name); mFilterEditor->setText(item_name); + mFilterEditor->setFocus(TRUE); filter->setFilterUUID(item_id); filter->setShowFolderState(LLInventoryFilter::SHOW_NON_EMPTY_FOLDERS); diff --git a/indra/newview/llpanelmaininventory.h b/indra/newview/llpanelmaininventory.h index 920de2665c..69f8a14583 100644 --- a/indra/newview/llpanelmaininventory.h +++ b/indra/newview/llpanelmaininventory.h @@ -123,6 +123,7 @@ private: LLInventoryPanel* mActivePanel; LLSaveFolderState* mSavedFolderState; std::string mFilterText; + std::string mFilterSubString; ////////////////////////////////////////////////////////////////////////////////// -- cgit v1.2.3 From bc2b79681101facc3d913cab3ebf8e43edc98b8e Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Thu, 17 Dec 2009 13:07:16 -0500 Subject: For EXT-3500: Make InventorySP and AppearanceSP filters behave like it does in LandmarksSP and PeopleSP. This covers AppearanceSP --HG-- branch : avatar-pipeline --- indra/newview/llpaneloutfitsinventory.cpp | 14 ++++++++++++++ indra/newview/llpaneloutfitsinventory.h | 5 ++++- 2 files changed, 18 insertions(+), 1 deletion(-) (limited to 'indra') diff --git a/indra/newview/llpaneloutfitsinventory.cpp b/indra/newview/llpaneloutfitsinventory.cpp index 5b36a5406a..f73c1363f6 100644 --- a/indra/newview/llpaneloutfitsinventory.cpp +++ b/indra/newview/llpaneloutfitsinventory.cpp @@ -96,6 +96,7 @@ void LLPanelOutfitsInventory::setParent(LLSidepanelAppearance* parent) // virtual void LLPanelOutfitsInventory::onSearchEdit(const std::string& string) { + mFilterSubString = string; if (string == "") { mActivePanel->setFilterSubString(LLStringUtil::null); @@ -433,6 +434,9 @@ void LLPanelOutfitsInventory::initTabPanels() LLInventoryPanel *panel = (*iter); panel->setSelectCallback(boost::bind(&LLPanelOutfitsInventory::onTabSelectionChange, this, panel, _1, _2)); } + + mAppearanceTabs = getChild("appearance_tabs"); + mAppearanceTabs->setCommitCallback(boost::bind(&LLPanelOutfitsInventory::onTabChange, this)); } void LLPanelOutfitsInventory::onTabSelectionChange(LLInventoryPanel* tab_panel, const std::deque &items, BOOL user_action) @@ -457,6 +461,16 @@ void LLPanelOutfitsInventory::onTabSelectionChange(LLInventoryPanel* tab_panel, onSelectionChange(items, user_action); } +void LLPanelOutfitsInventory::onTabChange() +{ + mActivePanel = (LLInventoryPanel*)childGetVisibleTab("appearance_tabs"); + if (!mActivePanel) + { + return; + } + mActivePanel->setFilterSubString(mFilterSubString); +} + LLInventoryPanel* LLPanelOutfitsInventory::getActivePanel() { return mActivePanel; diff --git a/indra/newview/llpaneloutfitsinventory.h b/indra/newview/llpaneloutfitsinventory.h index 9b6b483e3b..b4babc853d 100644 --- a/indra/newview/llpaneloutfitsinventory.h +++ b/indra/newview/llpaneloutfitsinventory.h @@ -44,6 +44,7 @@ class LLSaveFolderState; class LLButton; class LLMenuGL; class LLSidepanelAppearance; +class LLTabContainer; class LLPanelOutfitsInventory : public LLPanel { @@ -76,7 +77,8 @@ protected: private: LLSidepanelAppearance* mParent; LLSaveFolderState* mSavedFolderState; - + LLTabContainer* mAppearanceTabs; + std::string mFilterSubString; public: ////////////////////////////////////////////////////////////////////////////////// @@ -87,6 +89,7 @@ public: protected: void initTabPanels(); void onTabSelectionChange(LLInventoryPanel* tab_panel, const std::deque &items, BOOL user_action); + void onTabChange(); private: LLInventoryPanel* mActivePanel; -- cgit v1.2.3 From 27fda6c35fb9a965799a3e723aa516bbadeac582 Mon Sep 17 00:00:00 2001 From: "Eric M. Tulla (BigPapi)" Date: Thu, 17 Dec 2009 13:40:57 -0500 Subject: EXT-2636: we now show "Loading..." before the my inventory named folder when doing a background fetch. --- indra/newview/llfolderview.cpp | 1 + indra/newview/llfolderviewitem.cpp | 10 ++++++---- indra/newview/llfolderviewitem.h | 3 +++ indra/newview/skins/default/colors.xml | 2 +- 4 files changed, 11 insertions(+), 5 deletions(-) (limited to 'indra') diff --git a/indra/newview/llfolderview.cpp b/indra/newview/llfolderview.cpp index 321982ceb6..0be3371172 100644 --- a/indra/newview/llfolderview.cpp +++ b/indra/newview/llfolderview.cpp @@ -330,6 +330,7 @@ BOOL LLFolderView::addFolder( LLFolderViewFolder* folder) else { mFolders.insert(mFolders.begin(), folder); + folder->setShowLoadStatus(true); } folder->setOrigin(0, 0); folder->reshape(getRect().getWidth(), 0); diff --git a/indra/newview/llfolderviewitem.cpp b/indra/newview/llfolderviewitem.cpp index 135821f662..8a13964708 100644 --- a/indra/newview/llfolderviewitem.cpp +++ b/indra/newview/llfolderviewitem.cpp @@ -136,7 +136,8 @@ LLFolderViewItem::LLFolderViewItem(LLFolderViewItem::Params p) mListener(p.listener), mArrowImage(p.folder_arrow_image), mBoxImage(p.selection_image), - mDontShowInHierarchy(false) + mDontShowInHierarchy(false), + mShowLoadStatus(false) { refresh(); } @@ -966,10 +967,11 @@ void LLFolderViewItem::draw() } - if ( mIsLoading - && mTimeSinceRequestStart.getElapsedTimeF32() >= gSavedSettings.getF32("FolderLoadingMessageWaitTime") ) + if ( (mIsLoading && mTimeSinceRequestStart.getElapsedTimeF32() >= gSavedSettings.getF32("FolderLoadingMessageWaitTime")) + || (LLInventoryModel::backgroundFetchActive() && mShowLoadStatus) ) { - font->renderUTF8(LLTrans::getString("LoadingData"), 0, text_left, y, sSearchStatusColor, + std::string load_string = LLTrans::getString("LoadingData") + " "; + font->renderUTF8(load_string, 0, text_left, y, sSearchStatusColor, LLFontGL::LEFT, LLFontGL::BOTTOM, LLFontGL::NORMAL, LLFontGL::NO_SHADOW, S32_MAX, S32_MAX, &right_x, FALSE); text_left = right_x; } diff --git a/indra/newview/llfolderviewitem.h b/indra/newview/llfolderviewitem.h index 620aa070b9..a43096dcb2 100644 --- a/indra/newview/llfolderviewitem.h +++ b/indra/newview/llfolderviewitem.h @@ -163,6 +163,7 @@ protected: BOOL mIsLoading; LLTimer mTimeSinceRequestStart; bool mDontShowInHierarchy; + bool mShowLoadStatus; // helper function to change the selection from the root. void changeSelectionFromRoot(LLFolderViewItem* selection, BOOL selected); @@ -254,6 +255,8 @@ public: BOOL getIsCurSelection() { return mIsCurSelection; } BOOL hasVisibleChildren() { return mHasVisibleChildren; } + + void setShowLoadStatus(bool status) { mShowLoadStatus = status; } // Call through to the viewed object and return true if it can be // removed. Returns true if it's removed. diff --git a/indra/newview/skins/default/colors.xml b/indra/newview/skins/default/colors.xml index b6995d2122..91402acc0a 100644 --- a/indra/newview/skins/default/colors.xml +++ b/indra/newview/skins/default/colors.xml @@ -378,7 +378,7 @@ reference="White_25" /> + reference="EmphasisColor" /> -- cgit v1.2.3 From 3c38c7f14869f803538bcb87a109f26fecc9d107 Mon Sep 17 00:00:00 2001 From: Loren Shih Date: Thu, 17 Dec 2009 15:21:14 -0500 Subject: EXT-1634 : Block collapse/expand of accordion "root" folder by keyword Hidden folders are no longer allowed to be selected. --HG-- branch : avatar-pipeline --- indra/newview/llfolderview.cpp | 6 ++++++ indra/newview/llfolderviewitem.cpp | 4 +++- 2 files changed, 9 insertions(+), 1 deletion(-) (limited to 'indra') diff --git a/indra/newview/llfolderview.cpp b/indra/newview/llfolderview.cpp index adf7f08702..640b0d7d8f 100644 --- a/indra/newview/llfolderview.cpp +++ b/indra/newview/llfolderview.cpp @@ -748,6 +748,12 @@ void LLFolderView::sanitizeSelection() } } } + + // Don't allow invisible items (such as root folders) to be selected. + if (item->getDontShowInHierarchy()) + { + items_to_remove.push_back(item); + } } std::vector::iterator item_it; diff --git a/indra/newview/llfolderviewitem.cpp b/indra/newview/llfolderviewitem.cpp index 135821f662..c2607dcc9a 100644 --- a/indra/newview/llfolderviewitem.cpp +++ b/indra/newview/llfolderviewitem.cpp @@ -198,7 +198,9 @@ LLFolderViewItem* LLFolderViewItem::getPreviousOpenNode(BOOL include_children) } LLFolderViewItem* itemp = mParentFolder->getPreviousFromChild( this, include_children ); - while(itemp && !itemp->getVisible()) + + // Skip over items that are invisible or are hidden from the UI. + while(itemp && (!itemp->getVisible() || itemp->getDontShowInHierarchy())) { LLFolderViewItem* next_itemp = itemp->mParentFolder->getPreviousFromChild( itemp, include_children ); if (itemp == next_itemp) -- cgit v1.2.3 From d3d454988a37a3f2d3175d10aa6ad44ef68fcaee Mon Sep 17 00:00:00 2001 From: Loren Shih Date: Thu, 17 Dec 2009 15:47:07 -0500 Subject: EXT-2677 : "Remove From Outfit" active even when I'm not wearing any items in the folder Now checking contents of the folder for any actively worn items for determining this flag. --HG-- branch : avatar-pipeline --- indra/newview/llinventorybridge.cpp | 61 +++++++++++++++++++++++++++++-------- indra/newview/llinventorybridge.h | 1 + 2 files changed, 49 insertions(+), 13 deletions(-) (limited to 'indra') diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index fce945acda..e2bab7eef2 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -2466,7 +2466,10 @@ void LLFolderBridge::folderOptionsMenu() mItems.push_back(std::string("Wear As Ensemble")); } mItems.push_back(std::string("Remove From Outfit")); - + if (!areAnyContentsWorn(model)) + { + disabled_items.push_back(std::string("Remove From Outfit")); + } mItems.push_back(std::string("Outfit Separator")); } hide_context_entries(*mMenu, mItems, disabled_items); @@ -2488,6 +2491,35 @@ BOOL LLFolderBridge::checkFolderForContentsOfType(LLInventoryModel* model, LLInv return ((item_array.count() > 0) ? TRUE : FALSE ); } +class LLFindWorn : public LLInventoryCollectFunctor +{ +public: + LLFindWorn() {} + virtual ~LLFindWorn() {} + virtual bool operator()(LLInventoryCategory* cat, + LLInventoryItem* item) + { + if (item && get_is_item_worn(item->getUUID())) + { + return TRUE; + } + return FALSE; + } +}; + +BOOL LLFolderBridge::areAnyContentsWorn(LLInventoryModel* model) const +{ + LLInventoryModel::cat_array_t cat_array; + LLInventoryModel::item_array_t item_array; + LLFindWorn is_worn; + model->collectDescendentsIf(mUUID, + cat_array, + item_array, + LLInventoryModel::EXCLUDE_TRASH, + is_worn); + return (item_array.size() > 0); +} + // Flags unused void LLFolderBridge::buildContextMenu(LLMenuGL& menu, U32 flags) { @@ -4387,18 +4419,21 @@ void remove_inventory_category_from_avatar_step2( BOOL proceed, LLUUID category_ for(i = 0; i < obj_count; ++i) { LLViewerInventoryItem *obj_item = obj_item_array.get(i); - gMessageSystem->newMessageFast(_PREHASH_DetachAttachmentIntoInv); - gMessageSystem->nextBlockFast(_PREHASH_ObjectData ); - gMessageSystem->addUUIDFast(_PREHASH_AgentID, gAgent.getID() ); - gMessageSystem->addUUIDFast(_PREHASH_ItemID, obj_item->getLinkedUUID() ); - - gMessageSystem->sendReliable( gAgent.getRegion()->getHost() ); - - // this object might have been selected, so let the selection manager know it's gone now - LLViewerObject *found_obj = gObjectList.findObject( obj_item->getLinkedUUID()); - if (found_obj) + if (get_is_item_worn(obj_item->getUUID())) { - LLSelectMgr::getInstance()->remove(found_obj); + gMessageSystem->newMessageFast(_PREHASH_DetachAttachmentIntoInv); + gMessageSystem->nextBlockFast(_PREHASH_ObjectData ); + gMessageSystem->addUUIDFast(_PREHASH_AgentID, gAgent.getID() ); + gMessageSystem->addUUIDFast(_PREHASH_ItemID, obj_item->getLinkedUUID() ); + + gMessageSystem->sendReliable( gAgent.getRegion()->getHost() ); + + // this object might have been selected, so let the selection manager know it's gone now + LLViewerObject *found_obj = gObjectList.findObject( obj_item->getLinkedUUID()); + if (found_obj) + { + LLSelectMgr::getInstance()->remove(found_obj); + } } } } @@ -4408,7 +4443,7 @@ void remove_inventory_category_from_avatar_step2( BOOL proceed, LLUUID category_ for(i = 0; i < gest_count; ++i) { LLViewerInventoryItem *gest_item = gest_item_array.get(i); - if ( LLGestureManager::instance().isGestureActive( gest_item->getLinkedUUID()) ) + if (get_is_item_worn(gest_item->getUUID())) { LLGestureManager::instance().deactivateGesture( gest_item->getLinkedUUID() ); gInventory.updateItem( gest_item ); diff --git a/indra/newview/llinventorybridge.h b/indra/newview/llinventorybridge.h index 117e32c6be..54eb27db39 100644 --- a/indra/newview/llinventorybridge.h +++ b/indra/newview/llinventorybridge.h @@ -339,6 +339,7 @@ protected: static void createNewEyes(void* user_data); BOOL checkFolderForContentsOfType(LLInventoryModel* model, LLInventoryCollectFunctor& typeToCheck); + BOOL areAnyContentsWorn(LLInventoryModel* model) const; void modifyOutfit(BOOL append); void determineFolderType(); -- cgit v1.2.3 From 9abe3c58141ddee053f42a7751a92363fbee63ac Mon Sep 17 00:00:00 2001 From: "Nyx (Neal Orman)" Date: Thu, 17 Dec 2009 16:26:04 -0500 Subject: EXT-3551 make outfit functionality non-discoverable removed + button, added make outfit button. make outfit button is only enabled if the "my outfits" tab is selected. Code reviewed by Vir --HG-- branch : avatar-pipeline --- indra/newview/llpaneloutfitsinventory.cpp | 5 +- .../default/xui/en/panel_outfits_inventory.xml | 55 +++++++++++----------- 2 files changed, 32 insertions(+), 28 deletions(-) (limited to 'indra') diff --git a/indra/newview/llpaneloutfitsinventory.cpp b/indra/newview/llpaneloutfitsinventory.cpp index 59cd01f920..f9777147b7 100644 --- a/indra/newview/llpaneloutfitsinventory.cpp +++ b/indra/newview/llpaneloutfitsinventory.cpp @@ -240,7 +240,7 @@ void LLPanelOutfitsInventory::initListCommandsHandlers() mListCommands->childSetAction("options_gear_btn", boost::bind(&LLPanelOutfitsInventory::onGearButtonClick, this)); mListCommands->childSetAction("trash_btn", boost::bind(&LLPanelOutfitsInventory::onTrashButtonClick, this)); - mListCommands->childSetAction("add_btn", boost::bind(&LLPanelOutfitsInventory::onAddButtonClick, this)); + mListCommands->childSetAction("make_outfit_btn", boost::bind(&LLPanelOutfitsInventory::onAddButtonClick, this)); mListCommands->childSetAction("wear_btn", boost::bind(&LLPanelOutfitsInventory::onWearButtonClick, this)); mListCommands->childSetAction("look_edit_btn", boost::bind(&LLPanelOutfitsInventory::onSelectorButtonClicked, this)); @@ -477,6 +477,9 @@ void LLPanelOutfitsInventory::onTabChange() return; } mActivePanel->setFilterSubString(mFilterSubString); + + bool is_my_outfits = (mActivePanel->getName() == "outfitslist_accordionpanel"); + mListCommands->childSetEnabled("make_outfit_btn", is_my_outfits); } LLInventoryPanel* LLPanelOutfitsInventory::getActivePanel() diff --git a/indra/newview/skins/default/xui/en/panel_outfits_inventory.xml b/indra/newview/skins/default/xui/en/panel_outfits_inventory.xml index 2f176f011b..5c99022f35 100644 --- a/indra/newview/skins/default/xui/en/panel_outfits_inventory.xml +++ b/indra/newview/skins/default/xui/en/panel_outfits_inventory.xml @@ -69,18 +69,7 @@ name="options_gear_btn" top="6" width="18" /> -