diff options
Diffstat (limited to 'indra')
| -rw-r--r-- | indra/llui/llcombobox.cpp | 4 | ||||
| -rw-r--r-- | indra/llui/llcombobox.h | 1 | ||||
| -rw-r--r-- | indra/newview/llfloaterpreference.cpp | 7 | ||||
| -rw-r--r-- | indra/newview/llfloatertools.cpp | 7 | ||||
| -rw-r--r-- | indra/newview/llpanelobject.cpp | 26 | ||||
| -rw-r--r-- | indra/newview/llviewerwindow.cpp | 23 | 
6 files changed, 58 insertions, 10 deletions
| diff --git a/indra/llui/llcombobox.cpp b/indra/llui/llcombobox.cpp index 8b6a73af56..701d1ff706 100644 --- a/indra/llui/llcombobox.cpp +++ b/indra/llui/llcombobox.cpp @@ -231,6 +231,10 @@ void	LLComboBox::resetDirty()  	}  } +bool LLComboBox::itemExists(const std::string& name) +{ +	return mList->getItemByLabel(name); +}  // add item "name" to menu  LLScrollListItem* LLComboBox::add(const std::string& name, EAddPosition pos, BOOL enabled) diff --git a/indra/llui/llcombobox.h b/indra/llui/llcombobox.h index 74d64269bd..59beba509c 100644 --- a/indra/llui/llcombobox.h +++ b/indra/llui/llcombobox.h @@ -134,6 +134,7 @@ public:  	LLScrollListItem*	addSeparator(EAddPosition pos = ADD_BOTTOM);  	BOOL			remove( S32 index );	// remove item by index, return TRUE if found and removed  	void			removeall() { clearRows(); } +	bool			itemExists(const std::string& name);  	void			sortByName(BOOL ascending = TRUE); // Sort the entries in the combobox by name diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp index 456005f1fe..952643326a 100644 --- a/indra/newview/llfloaterpreference.cpp +++ b/indra/newview/llfloaterpreference.cpp @@ -656,6 +656,13 @@ void LLFloaterPreference::onOpen(const LLSD& key)  		getChildView("maturity_desired_combobox")->setVisible( false);  	} +	bool enable_mesh = gSavedSettings.getBOOL("MeshEnabled"); + +	getChildView("UseLightShaders")->setVisible(enable_mesh); +	getChildView("UseSSAO")->setVisible(enable_mesh); +	getChildView("shadows_label")->setVisible(enable_mesh); +	getChildView("ShadowDetail")->setVisible(enable_mesh); +  	if (LLStartUp::getStartupState() == STATE_STARTED)  	{  		mFavoritesRecordMayExist = gSavedPerAccountSettings.getBOOL("ShowFavoritesOnLogin"); diff --git a/indra/newview/llfloatertools.cpp b/indra/newview/llfloatertools.cpp index 920bdef7f6..49e24f8e3d 100644 --- a/indra/newview/llfloatertools.cpp +++ b/indra/newview/llfloatertools.cpp @@ -463,6 +463,13 @@ void LLFloaterTools::refresh()  	childSetEnabled("linked_set_cost", have_selection);  	childSetEnabled("object_cost", have_selection); +	bool enable_mesh = gSavedSettings.getBOOL("MeshEnabled"); + +	getChildView("linked_set_count")->setVisible(enable_mesh); +	getChildView("linked_set_cost")->setVisible(enable_mesh); +	getChildView("object_count")->setVisible(enable_mesh); +	getChildView("object_cost")->setVisible(enable_mesh); +  	// Refresh child tabs  	mPanelPermissions->refresh();  	mPanelObject->refresh(); diff --git a/indra/newview/llpanelobject.cpp b/indra/newview/llpanelobject.cpp index 45e9a04fc2..73a8fbe3aa 100644 --- a/indra/newview/llpanelobject.cpp +++ b/indra/newview/llpanelobject.cpp @@ -1910,6 +1910,32 @@ void LLPanelObject::refresh()  	{  		mRootObject = NULL;  	} +	 +	bool enable_mesh = gSavedSettings.getBOOL("MeshEnabled"); + +	getChildView("label physicsshapetype")->setVisible(enable_mesh); +	getChildView("Physics Shape Type Combo Ctrl")->setVisible(enable_mesh); +	getChildView("Physics Gravity")->setVisible(enable_mesh); +	getChildView("Physics Material Override")->setVisible(enable_mesh); +	getChildView("Physics Friction")->setVisible(enable_mesh); +	getChildView("Physics Density")->setVisible(enable_mesh); +	getChildView("Physics Restitution")->setVisible(enable_mesh); + +	// if mesh isn't enabled we want to the scale max to be 10 +	getChild<LLSpinCtrl>("Scale X")->setMaxValue(enable_mesh ? 64 : 10); +	getChild<LLSpinCtrl>("Scale Y")->setMaxValue(enable_mesh ? 64 : 10); +	getChild<LLSpinCtrl>("Scale Z")->setMaxValue(enable_mesh ? 64 : 10); + +	LLComboBox* sculpt_combo = getChild<LLComboBox>("sculpt type control"); +	BOOL found = sculpt_combo->itemExists("Mesh"); +	if (enable_mesh && !found) +	{ +		sculpt_combo->add("Mesh"); +	} +	else if (!enable_mesh && found) +	{ +		sculpt_combo->remove("Mesh"); +	}  } diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index 96ee3f6180..dcfac012f6 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -506,18 +506,21 @@ public:  			ypos += y_inc; -			addText(xpos, ypos, llformat("%.3f MB Mesh Data Received", LLMeshRepository::sBytesReceived/(1024.f*1024.f))); -			 -			ypos += y_inc; -			 -			addText(xpos, ypos, llformat("%d/%d Mesh HTTP Requests/Retries", LLMeshRepository::sHTTPRequestCount, -				LLMeshRepository::sHTTPRetryCount)); -			 -			ypos += y_inc; +			if (gSavedSettings.getBOOL("MeshEnabled")) +			{ +				addText(xpos, ypos, llformat("%.3f MB Mesh Data Received", LLMeshRepository::sBytesReceived/(1024.f*1024.f))); +				 +				ypos += y_inc; +				 +				addText(xpos, ypos, llformat("%d/%d Mesh HTTP Requests/Retries", LLMeshRepository::sHTTPRequestCount, +					LLMeshRepository::sHTTPRetryCount)); +				 +				ypos += y_inc; -			addText(xpos, ypos, llformat("%.3f/%.3f MB Mesh Cache Read/Write ", LLMeshRepository::sCacheBytesRead/(1024.f*1024.f), LLMeshRepository::sCacheBytesWritten/(1024.f*1024.f))); +				addText(xpos, ypos, llformat("%.3f/%.3f MB Mesh Cache Read/Write ", LLMeshRepository::sCacheBytesRead/(1024.f*1024.f), LLMeshRepository::sCacheBytesWritten/(1024.f*1024.f))); -			ypos += y_inc; +				ypos += y_inc; +			}  			addText(xpos, ypos, llformat("Selection Triangle Count: %.3f Ktris ", LLSelectMgr::getInstance()->getSelection()->getSelectedObjectTriangleCount()/1000.f)); | 
