nyx avatar nyx committed f991788

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

Comments (0)

Files changed (11)

indra/newview/app_settings/settings.xml

       <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>
       <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>
       <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>

indra/newview/llfloatertools.cpp

 
 // Globals
 LLFloaterTools *gFloaterTools = NULL;
-
+bool LLFloaterTools::sShowObjectCost = true;
 
 const std::string PANEL_NAMES[LLFloaterTools::PANEL_COUNT] =
 {
 	mStatusText["grab"] = getString("status_grab");
 	mStatusText["place"] = getString("status_place");
 	mStatusText["selectland"] = getString("status_selectland");
+
+	sShowObjectCost = gSavedSettings.getBOOL("ShowObjectRenderingCost");
 	
 	return TRUE;
 }
 	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();
 	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)
 	{

indra/newview/llfloatertools.h

 
 protected:
 	LLSD				mMediaSettings;
+
+public:
+	static bool		sShowObjectCost;
 	
 };
 

indra/newview/llpaneloutfitsinventory.cpp

 #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),
 // virtual
 BOOL LLPanelOutfitsInventory::postBuild()
 {
-	
+	sShowDebugEditor = gSavedSettings.getBOOL("ShowDebugAppearanceEditor");
 	initTabPanels();
 	initListCommandsHandlers();
 	return TRUE;
 	{
 		mParent->updateVerbs();
 	}
+
+	childSetVisible("look_edit_btn",sShowDebugEditor);
 }
 
 void LLPanelOutfitsInventory::setParent(LLSidepanelAppearance* parent)
 
 void LLPanelOutfitsInventory::onSelectorButtonClicked()
 {
-	/*
 	  LLFolderViewItem* cur_item = getRootFolder()->getCurSelectedItem();
 
 	  LLFolderViewEventListener* listenerp = cur_item->getListener();
 
 	  LLSideTray::getInstance()->showPanel("sidepanel_appearance", key);
 	  } 
-	*/
 }
 
 LLFolderViewEventListener *LLPanelOutfitsInventory::getCorrectListenerForAction()
 	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

indra/newview/llpaneloutfitsinventory.h

 	LLMenuGL*					mMenuAdd;
 	// List Commands                                                              //
 	////////////////////////////////////////////////////////////////////////////////
+	///
+public:
+	static bool sShowDebugEditor;
 };
 
 #endif //LL_LLPANELOUTFITSINVENTORY_H

indra/newview/llviewercontrol.cpp

 #include "llrender.h"
 #include "llbottomtray.h"
 #include "llnavigationbar.h"
+#include "llfloatertools.h"
+#include "llpaneloutfitsinventory.h"
 
 #ifdef TOGGLE_HACKED_GODLIKE_VIEWER
 BOOL 				gHackGodmode = FALSE;
 	return true;
 }
 
-static bool handleSetSelfInvisible( const LLSD& newvalue)
-{
-	LLVOAvatarSelf::onChangeSelfInvisible( newvalue.asBoolean() );
-	return true;
-}
-
 static bool handleReleaseGLBufferChanged(const LLSD& newvalue)
 {
 	if (gPipeline.isInit())
 	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()
 	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));
 	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

indra/newview/llvoavatarself.cpp

 	}
 }
 
-// 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

indra/newview/llvoavatarself.h

 	// Visibility
 	//--------------------------------------------------------------------
 public:
-	static void		onChangeSelfInvisible(BOOL newvalue);
-	void			setInvisible(BOOL newvalue);
 	bool			sendAppearanceMessage(LLMessageSystem *mesgsys) const;
 
 /**                    Appearance

indra/newview/llwearable.cpp

 
 	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

indra/newview/skins/default/xui/en/panel_outfits_inventory.xml

         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"

indra/newview/skins/default/xui/en/sidepanel_appearance.xml

    layout="topleft"
    left="0"
    name="panel_look_info"
+   top="35"
    visible="false" />
    <panel
    class="panel_edit_wearable"
    layout="topleft"
    left="0"
    name="panel_edit_wearable"
+   top="35"
    visible="false" />
 </panel>
 
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.