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" /> +