diff options
-rw-r--r-- | indra/newview/app_settings/settings.xml | 35 | ||||
-rw-r--r-- | indra/newview/llfloatertools.cpp | 17 | ||||
-rw-r--r-- | indra/newview/llfloatertools.h | 3 | ||||
-rw-r--r-- | indra/newview/llpaneloutfitsinventory.cpp | 13 | ||||
-rw-r--r-- | indra/newview/llpaneloutfitsinventory.h | 3 | ||||
-rw-r--r-- | indra/newview/llviewercontrol.cpp | 23 | ||||
-rw-r--r-- | indra/newview/llvoavatarself.cpp | 37 | ||||
-rw-r--r-- | indra/newview/llvoavatarself.h | 2 | ||||
-rw-r--r-- | indra/newview/llwearable.cpp | 2 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/panel_outfits_inventory.xml | 10 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/sidepanel_appearance.xml | 2 |
11 files changed, 78 insertions, 69 deletions
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 @@ <key>Value</key> <integer>35</integer> </map> - <key>RenderAvatarInvisible</key> - <map> - <key>Comment</key> - <string>Set your avatar as Invisible</string> - <key>Persist</key> - <integer>0</integer> - <key>Type</key> - <string>Boolean</string> - <key>Value</key> - <integer>0</integer> - </map> <key>RenderAvatarVP</key> <map> <key>Comment</key> @@ -7820,6 +7809,17 @@ <key>Value</key> <integer>0</integer> </map> + <key>ShowDebugAppearanceEditor</key> + <map> + <key>Comment</key> + <string>Show debugging appearance editor</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>Boolean</string> + <key>Value</key> + <integer>0</integer> + </map> <key>ShowEmptyFoldersWhenSearching</key> <map> <key>Comment</key> @@ -7918,7 +7918,18 @@ <string>Boolean</string> <key>Value</key> <integer>1</integer> - </map> + </map> + <key>ShowObjectRenderingCost</key> + <map> + <key>Comment</key> + <string>Show the object rendering cost in build tools</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>Boolean</string> + <key>Value</key> + <integer>1</integer> + </map> <key>ShowNavbarFavoritesPanel</key> <map> <key>Comment</key> 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<LLPanelOutfitsInventory> 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::deque<LLFolderViewIte void LLPanelOutfitsInventory::onSelectorButtonClicked() { - /* LLFolderViewItem* cur_item = getRootFolder()->getCurSelectedItem(); 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<LLDragAndDropButton>("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" /> </tab_container> + <button + follows="bottom|left" + height="18" + label="edit look" + layout="topleft" + left="10" + name="look_edit_btn" + top_pad="10" + visible="false" + width="90" /> <panel background_visible="true" follows="bottom|left" diff --git a/indra/newview/skins/default/xui/en/sidepanel_appearance.xml b/indra/newview/skins/default/xui/en/sidepanel_appearance.xml index 27f19d44fa..7f4b4aef82 100644 --- a/indra/newview/skins/default/xui/en/sidepanel_appearance.xml +++ b/indra/newview/skins/default/xui/en/sidepanel_appearance.xml @@ -107,6 +107,7 @@ left="0" layout="topleft" left="0" name="panel_look_info" + top="35" visible="false" /> <panel class="panel_edit_wearable" @@ -115,6 +116,7 @@ left="0" layout="topleft" left="0" name="panel_edit_wearable" + top="35" visible="false" /> </panel> |