From b0d773bc181a4b885d0732ee2393b4473f90689e Mon Sep 17 00:00:00 2001
From: Mnikolenko ProductEngine <mnikolenko@productengine.com>
Date: Mon, 21 Jul 2014 10:53:01 +0300
Subject: MAINT-4254 FIXED Don't change selection in Inventory panel when
 image's uuid is null.

---
 indra/newview/lltexturectrl.cpp | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

(limited to 'indra/newview')

diff --git a/indra/newview/lltexturectrl.cpp b/indra/newview/lltexturectrl.cpp
index c12753acb0..b9eb68556d 100755
--- a/indra/newview/lltexturectrl.cpp
+++ b/indra/newview/lltexturectrl.cpp
@@ -240,7 +240,7 @@ void LLFloaterTexturePicker::setImageID(const LLUUID& image_id)
 		mViewModel->setDirty(); // *TODO: shouldn't we be using setValue() here?
 		mImageAssetID = image_id; 
 		LLUUID item_id = findItemID(mImageAssetID, FALSE);
-		if (item_id.isNull())
+		if (image_id.isNull())
 		{
 			mInventoryPanel->getRootFolder()->clearSelection();
 		}
@@ -461,7 +461,10 @@ BOOL LLFloaterTexturePicker::postBuild()
 
 		// don't put keyboard focus on selected item, because the selection callback
 		// will assume that this was user input
-		mInventoryPanel->setSelection(findItemID(mImageAssetID, FALSE), TAKE_FOCUS_NO);
+		if(!mImageAssetID.isNull())
+		{
+			mInventoryPanel->setSelection(findItemID(mImageAssetID, FALSE), TAKE_FOCUS_NO);
+		}
 	}
 
 	mModeSelector = getChild<LLRadioGroup>("mode_selection");
-- 
cgit v1.2.3


From 673afb955b6f22244e7af100bcfbece6a688aef3 Mon Sep 17 00:00:00 2001
From: Mnikolenko ProductEngine <mnikolenko@productengine.com>
Date: Tue, 22 Jul 2014 11:36:27 +0300
Subject: MAINT-4253 FIXED Don't call setSelection() twice.

---
 indra/newview/lltexturectrl.cpp | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

(limited to 'indra/newview')

diff --git a/indra/newview/lltexturectrl.cpp b/indra/newview/lltexturectrl.cpp
index b9eb68556d..a426669b5e 100755
--- a/indra/newview/lltexturectrl.cpp
+++ b/indra/newview/lltexturectrl.cpp
@@ -118,7 +118,7 @@ public:
 	/*virtual*/ void	onClose(bool app_settings);
 	
 	// New functions
-	void setImageID( const LLUUID& image_asset_id);
+	void setImageID( const LLUUID& image_asset_id, bool set_selection = true);
 	void updateImageStats();
 	const LLUUID& getAssetID() { return mImageAssetID; }
 	const LLUUID& findItemID(const LLUUID& asset_id, BOOL copyable_only);
@@ -232,7 +232,7 @@ LLFloaterTexturePicker::~LLFloaterTexturePicker()
 {
 }
 
-void LLFloaterTexturePicker::setImageID(const LLUUID& image_id)
+void LLFloaterTexturePicker::setImageID(const LLUUID& image_id, bool set_selection /*=true*/)
 {
 	if( mImageAssetID != image_id && mActive)
 	{
@@ -240,7 +240,7 @@ void LLFloaterTexturePicker::setImageID(const LLUUID& image_id)
 		mViewModel->setDirty(); // *TODO: shouldn't we be using setValue() here?
 		mImageAssetID = image_id; 
 		LLUUID item_id = findItemID(mImageAssetID, FALSE);
-		if (image_id.isNull())
+		if (item_id.isNull())
 		{
 			mInventoryPanel->getRootFolder()->clearSelection();
 		}
@@ -253,6 +253,10 @@ void LLFloaterTexturePicker::setImageID(const LLUUID& image_id)
 				getChild<LLUICtrl>("apply_immediate_check")->setValue(FALSE);
 				mNoCopyTextureSelected = TRUE;
 			}
+		}
+
+		if (set_selection)
+		{
 			mInventoryPanel->setSelection(item_id, TAKE_FOCUS_NO);
 		}
 	}
@@ -823,7 +827,7 @@ void LLFloaterTexturePicker::onSelectionChange(const std::deque<LLFolderViewItem
 			{
 				mNoCopyTextureSelected = TRUE;
 			}
-			setImageID(itemp->getAssetUUID());
+			setImageID(itemp->getAssetUUID(),false);
 			mViewModel->setDirty(); // *TODO: shouldn't we be using setValue() here?
 			if (user_action && mCanPreview)
 			{
-- 
cgit v1.2.3


From 1874170f4f2bc826a6ea03473ab52c0952a7247d Mon Sep 17 00:00:00 2001
From: andreykproductengine <akleshchev@productengine.com>
Date: Tue, 22 Jul 2014 15:43:18 +0300
Subject: MAINT-4255 FIXED In the Edit menu when opening the texture picker for
 normal map selection and clicking Cancel the already applied texture is
 changed to None even with or without any prior change or if the prior applied
 texture was full perms.

---
 indra/newview/llpanelface.cpp | 2 ++
 1 file changed, 2 insertions(+)

(limited to 'indra/newview')

diff --git a/indra/newview/llpanelface.cpp b/indra/newview/llpanelface.cpp
index e3be1312e4..02e05d3d9a 100755
--- a/indra/newview/llpanelface.cpp
+++ b/indra/newview/llpanelface.cpp
@@ -1848,6 +1848,8 @@ void LLPanelFace::onCancelNormalTexture(const LLSD& data)
 	U8 bumpy = 0;
 	bool identical_bumpy = false;
 	LLSelectedTE::getBumpmap(bumpy, identical_bumpy);
+	LLUUID spec_map_id = getChild<LLTextureCtrl>("bumpytexture control")->getImageAssetID();
+	bumpy = spec_map_id.isNull() ? bumpy : BUMPY_TEXTURE;
 	sendBump(bumpy);
 }
 
-- 
cgit v1.2.3


From 01ad2bcd04a4d35b38e2d23487f20fee9ba9975d Mon Sep 17 00:00:00 2001
From: Mnikolenko ProductEngine <mnikolenko@productengine.com>
Date: Wed, 23 Jul 2014 11:34:55 +0300
Subject: MAINT-4238 FIXED Accept new types of tokens/delimiters as well as
 TT_WORD

---
 indra/newview/llpreviewscript.cpp | 26 +++++++++++++++++++++++---
 indra/newview/llpreviewscript.h   |  1 +
 2 files changed, 24 insertions(+), 3 deletions(-)

(limited to 'indra/newview')

diff --git a/indra/newview/llpreviewscript.cpp b/indra/newview/llpreviewscript.cpp
index 8eea5ea73e..a41986373e 100755
--- a/indra/newview/llpreviewscript.cpp
+++ b/indra/newview/llpreviewscript.cpp
@@ -663,12 +663,13 @@ void LLScriptEdCore::updateDynamicHelp(BOOL immediate)
 	LLTextSegmentPtr segment = NULL;
 	std::vector<LLTextSegmentPtr> selected_segments;
 	mEditor->getSelectedSegments(selected_segments);
-
+	LLKeywordToken* token;
 	// try segments in selection range first
 	std::vector<LLTextSegmentPtr>::iterator segment_iter;
 	for (segment_iter = selected_segments.begin(); segment_iter != selected_segments.end(); ++segment_iter)
 	{
-		if((*segment_iter)->getToken() && (*segment_iter)->getToken()->getType() == LLKeywordToken::TT_WORD)
+		token = (*segment_iter)->getToken();
+		if(token && isKeyword(token))
 		{
 			segment = *segment_iter;
 			break;
@@ -679,7 +680,8 @@ void LLScriptEdCore::updateDynamicHelp(BOOL immediate)
 	if (!segment)
 	{
 		const LLTextSegmentPtr test_segment = mEditor->getPreviousSegment();
-		if(test_segment->getToken() && test_segment->getToken()->getType() == LLKeywordToken::TT_WORD)
+		token = test_segment->getToken();
+		if(token && isKeyword(token))
 		{
 			segment = test_segment;
 		}
@@ -708,6 +710,24 @@ void LLScriptEdCore::updateDynamicHelp(BOOL immediate)
 	}
 }
 
+bool LLScriptEdCore::isKeyword(LLKeywordToken* token)
+{
+	switch(token->getType())
+	{
+		case LLKeywordToken::TT_CONSTANT:
+		case LLKeywordToken::TT_CONTROL:
+		case LLKeywordToken::TT_EVENT:
+		case LLKeywordToken::TT_FUNCTION:
+		case LLKeywordToken::TT_SECTION:
+		case LLKeywordToken::TT_TYPE:
+		case LLKeywordToken::TT_WORD:
+			return true;
+
+		default:
+			return false;
+	}
+}
+
 void LLScriptEdCore::setHelpPage(const std::string& help_string)
 {
 	LLFloater* help_floater = mLiveHelpHandle.get();
diff --git a/indra/newview/llpreviewscript.h b/indra/newview/llpreviewscript.h
index 515f277c4a..66727bceee 100755
--- a/indra/newview/llpreviewscript.h
+++ b/indra/newview/llpreviewscript.h
@@ -133,6 +133,7 @@ protected:
 	void deleteBridges();
 	void setHelpPage(const std::string& help_string);
 	void updateDynamicHelp(BOOL immediate = FALSE);
+	bool isKeyword(LLKeywordToken* token);
 	void addHelpItemToHistory(const std::string& help_string);
 	static void onErrorList(LLUICtrl*, void* user_data);
 
-- 
cgit v1.2.3


From 7ef544a07f6f23c553e94b10931dc14e2a0f26b2 Mon Sep 17 00:00:00 2001
From: Mnikolenko ProductEngine <mnikolenko@productengine.com>
Date: Wed, 23 Jul 2014 17:49:43 +0300
Subject: MAINT-1849 FIXED Disable 'Rename' menu item when multiple items are
 selected.

---
 indra/newview/llpanelobjectinventory.cpp | 4 ++++
 1 file changed, 4 insertions(+)

(limited to 'indra/newview')

diff --git a/indra/newview/llpanelobjectinventory.cpp b/indra/newview/llpanelobjectinventory.cpp
index 6b74d90708..6354b5a02b 100755
--- a/indra/newview/llpanelobjectinventory.cpp
+++ b/indra/newview/llpanelobjectinventory.cpp
@@ -698,6 +698,10 @@ void LLTaskInvFVBridge::buildContextMenu(LLMenuGL& menu, U32 flags)
 	if(isItemRenameable())
 	{
 		items.push_back(std::string("Task Rename"));
+		if ((flags & FIRST_SELECTED_ITEM) == 0)
+		{
+			disabled_items.push_back(std::string("Task Rename"));
+		}
 	}
 	if(isItemRemovable())
 	{
-- 
cgit v1.2.3


From c4433e4fc8b35b3403503a9e5062e169c35258f5 Mon Sep 17 00:00:00 2001
From: ruslantproductengine <ruslantproductengine@lindenlab.com>
Date: Wed, 9 Jul 2014 18:02:01 +0300
Subject: MAINT-4092 FIXED Prim faces with opaque diffuse maps, with material
 set to ALPHA_MODE_BLEND, do not render when ALM is enabled

---
 indra/newview/lldrawpool.cpp          |  2 +-
 indra/newview/lldrawpool.h            |  2 +-
 indra/newview/lldrawpoolmaterials.cpp |  2 +-
 indra/newview/llspatialpartition.cpp  |  2 +-
 indra/newview/llvovolume.cpp          | 17 ++++++++++++++---
 5 files changed, 18 insertions(+), 7 deletions(-)

(limited to 'indra/newview')

diff --git a/indra/newview/lldrawpool.cpp b/indra/newview/lldrawpool.cpp
index 5b151bdcda..f74164aea6 100755
--- a/indra/newview/lldrawpool.cpp
+++ b/indra/newview/lldrawpool.cpp
@@ -443,7 +443,7 @@ void LLRenderPass::pushMaskBatches(U32 type, U32 mask, BOOL texture, BOOL batch_
 	}
 }
 
-void LLRenderPass::applyModelMatrix(LLDrawInfo& params)
+void LLRenderPass::applyModelMatrix(const LLDrawInfo& params)
 {
 	if (params.mModelMatrix != gGLLastMatrix)
 	{
diff --git a/indra/newview/lldrawpool.h b/indra/newview/lldrawpool.h
index 3bde0d29be..bc299cc89f 100755
--- a/indra/newview/lldrawpool.h
+++ b/indra/newview/lldrawpool.h
@@ -168,7 +168,7 @@ public:
 	BOOL isDead() { return FALSE; }
 	void resetDrawOrders() { }
 
-	static void applyModelMatrix(LLDrawInfo& params);
+	static void applyModelMatrix(const LLDrawInfo& params);
 	virtual void pushBatches(U32 type, U32 mask, BOOL texture = TRUE, BOOL batch_textures = FALSE);
 	virtual void pushMaskBatches(U32 type, U32 mask, BOOL texture = TRUE, BOOL batch_textures = FALSE);
 	virtual void pushBatch(LLDrawInfo& params, U32 mask, BOOL texture, BOOL batch_textures = FALSE);
diff --git a/indra/newview/lldrawpoolmaterials.cpp b/indra/newview/lldrawpoolmaterials.cpp
index 514411aef5..f92320490a 100644
--- a/indra/newview/lldrawpoolmaterials.cpp
+++ b/indra/newview/lldrawpoolmaterials.cpp
@@ -96,7 +96,7 @@ void LLDrawPoolMaterials::endDeferredPass(S32 pass)
 
 void LLDrawPoolMaterials::renderDeferred(S32 pass)
 {
-	U32 type_list[] = 
+	static const U32 type_list[] = 
 	{
 		LLRenderPass::PASS_MATERIAL,
 		//LLRenderPass::PASS_MATERIAL_ALPHA,
diff --git a/indra/newview/llspatialpartition.cpp b/indra/newview/llspatialpartition.cpp
index 0a8257f42b..5e342099d7 100755
--- a/indra/newview/llspatialpartition.cpp
+++ b/indra/newview/llspatialpartition.cpp
@@ -1632,7 +1632,7 @@ void pushVertsColorCoded(LLSpatialGroup* group, U32 mask)
 {
 	LLDrawInfo* params = NULL;
 
-	LLColor4 colors[] = {
+	static const LLColor4 colors[] = {
 		LLColor4::green,
 		LLColor4::green1,
 		LLColor4::green2,
diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp
index a83e2e020e..c25722b635 100755
--- a/indra/newview/llvovolume.cpp
+++ b/indra/newview/llvovolume.cpp
@@ -2040,7 +2040,18 @@ S32 LLVOVolume::setTEMaterialID(const U8 te, const LLMaterialID& pMaterialID)
 
 S32 LLVOVolume::setTEMaterialParams(const U8 te, const LLMaterialPtr pMaterialParams)
 {
-	S32 res = LLViewerObject::setTEMaterialParams(te, pMaterialParams);
+	S32 res = 0;
+	
+	if (pMaterialParams && getTEImage(te) && 3 == getTEImage(te)->getComponents() && pMaterialParams->getDiffuseAlphaMode()) 
+	{
+		LLViewerObject::setTEMaterialID(te, LLMaterialID::null);
+		res = LLViewerObject::setTEMaterialParams(te, nullptr);
+	}
+	else 
+	{
+		res = LLViewerObject::setTEMaterialParams(te, pMaterialParams);
+	}
+
 	LL_DEBUGS("MaterialTEs") << "te " << (S32)te << " material " << ((pMaterialParams) ? pMaterialParams->asLLSD() : LLSD("null")) << " res " << res
 							 << ( LLSelectMgr::getInstance()->getSelection()->contains(const_cast<LLVOVolume*>(this), te) ? " selected" : " not selected" )
 							 << LL_ENDL;
@@ -4328,7 +4339,7 @@ void LLVolumeGeometryManager::registerFace(LLSpatialGroup* group, LLFace* facep,
 		draw_info->mBump  = bump;
 		draw_info->mShiny = shiny;
 
-		float alpha[4] =
+		static const float alpha[4] =
 		{
 			0.00f,
 			0.25f,
@@ -5652,7 +5663,7 @@ void LLVolumeGeometryManager::genDrawInfo(LLSpatialGroup* group, U32 mask, LLFac
 
 				if (material_pass)
 				{
-					U32 pass[] = 
+					static const U32 pass[] = 
 					{
 						LLRenderPass::PASS_MATERIAL,
 						LLRenderPass::PASS_ALPHA, //LLRenderPass::PASS_MATERIAL_ALPHA,
-- 
cgit v1.2.3


From f40dd76521c9ddab1fcd3ddca029802cf3bdd99b Mon Sep 17 00:00:00 2001
From: ruslantproductengine <ruslantproductengine@lindenlab.com>
Date: Thu, 24 Jul 2014 00:38:18 +0300
Subject: MAINT-4092 FIXED Prim faces with opaque diffuse maps, with material
 set to ALPHA_MODE_BLEND, do not render when ALM is enabled : replace nullptr
 to NULL (please use modern compilers)

---
 indra/newview/llvovolume.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'indra/newview')

diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp
index c25722b635..4295ea02d5 100755
--- a/indra/newview/llvovolume.cpp
+++ b/indra/newview/llvovolume.cpp
@@ -2045,7 +2045,7 @@ S32 LLVOVolume::setTEMaterialParams(const U8 te, const LLMaterialPtr pMaterialPa
 	if (pMaterialParams && getTEImage(te) && 3 == getTEImage(te)->getComponents() && pMaterialParams->getDiffuseAlphaMode()) 
 	{
 		LLViewerObject::setTEMaterialID(te, LLMaterialID::null);
-		res = LLViewerObject::setTEMaterialParams(te, nullptr);
+		res = LLViewerObject::setTEMaterialParams(te, NULL);
 	}
 	else 
 	{
-- 
cgit v1.2.3


From 906e2024580cd824e10e8c6799f13453fb2acd89 Mon Sep 17 00:00:00 2001
From: andreykproductengine <akleshchev@productengine.com>
Date: Fri, 25 Jul 2014 17:27:38 +0300
Subject: MAINT-4086 FIXED Limit the number items "Replace Current Outfit" or
 "Wear" applies to COF folder is also limited now.

---
 indra/newview/llinventorybridge.cpp | 23 +++++++++++++++++++++++
 1 file changed, 23 insertions(+)

(limited to 'indra/newview')

diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp
index 13236ea7d9..33e557cddd 100755
--- a/indra/newview/llinventorybridge.cpp
+++ b/indra/newview/llinventorybridge.cpp
@@ -2279,6 +2279,29 @@ BOOL LLFolderBridge::dragCategoryIntoFolder(LLInventoryCategory* inv_cat,
 				}
 			}
 		}
+		U32 max_items_to_wear = gSavedSettings.getU32("WearFolderLimit");
+		if (is_movable
+			&& move_is_into_current_outfit
+			&& descendent_items.size() > max_items_to_wear)
+		{
+			LLInventoryModel::cat_array_t cats;
+			LLInventoryModel::item_array_t items;
+			LLFindWearablesEx not_worn(/*is_worn=*/ false, /*include_body_parts=*/ false);
+			gInventory.collectDescendentsIf(cat_id,
+				cats,
+				items,
+				LLInventoryModel::EXCLUDE_TRASH,
+				not_worn);
+
+			if (items.size() > max_items_to_wear)
+			{
+				// Can't move 'large' folders into current outfit: MAINT-4086
+				is_movable = FALSE;
+				LLStringUtil::format_map_t args;
+				args["AMOUNT"] = llformat("%d", max_items_to_wear);
+				tooltip_msg = LLTrans::getString("TooltipTooManyWearables",args);
+			}
+		}
 		if (is_movable && move_is_into_trash)
 		{
 			for (S32 i=0; i < descendent_items.size(); ++i)
-- 
cgit v1.2.3


From 7d8b90ce98e0b88cf8cfb5c6f6d4e0ce31eaaf64 Mon Sep 17 00:00:00 2001
From: andreykproductengine <akleshchev@productengine.com>
Date: Tue, 29 Jul 2014 17:55:06 +0300
Subject: MAINT-4289 FIXED [BEAR] Recent Items "Reset Filters" not working
 correctly

---
 indra/newview/llfolderviewmodelinventory.cpp | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

(limited to 'indra/newview')

diff --git a/indra/newview/llfolderviewmodelinventory.cpp b/indra/newview/llfolderviewmodelinventory.cpp
index 11d49ff784..7615c12043 100755
--- a/indra/newview/llfolderviewmodelinventory.cpp
+++ b/indra/newview/llfolderviewmodelinventory.cpp
@@ -129,15 +129,13 @@ void LLFolderViewModelItemInventory::requestSort()
 
 void LLFolderViewModelItemInventory::setPassedFilter(bool passed, S32 filter_generation, std::string::size_type string_offset, std::string::size_type string_size)
 {
-	bool init_state = getLastFilterGeneration() < 0;
 	LLFolderViewModelItemCommon::setPassedFilter(passed, filter_generation, string_offset, string_size);
 	bool before = mPrevPassedAllFilters;
 	mPrevPassedAllFilters = passedFilter(filter_generation);
 
-	if (before != mPrevPassedAllFilters || (init_state && before && !mFolderViewItem->getVisible()))
+	if (before != mPrevPassedAllFilters)
 	{
 		// Need to rearrange the folder if the filtered state of the item changed
-		// or folder was hidden during update as filter-dirty (MAINT-4218)
 		LLFolderViewFolder* parent_folder = mFolderViewItem->getParentFolder();
 		if (parent_folder)
 		{
-- 
cgit v1.2.3


From 33178d576647d89199b6017dfedee7d99540179a Mon Sep 17 00:00:00 2001
From: Mnikolenko ProductEngine <mnikolenko@productengine.com>
Date: Mon, 4 Aug 2014 12:11:48 +0300
Subject: MAINT-4317 FIXED the Joystick Configuration help link does not point
 to the correct page.

---
 indra/newview/skins/default/xui/en/floater_joystick.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'indra/newview')

diff --git a/indra/newview/skins/default/xui/en/floater_joystick.xml b/indra/newview/skins/default/xui/en/floater_joystick.xml
index 259acccb68..3dfdf8e1a5 100755
--- a/indra/newview/skins/default/xui/en/floater_joystick.xml
+++ b/indra/newview/skins/default/xui/en/floater_joystick.xml
@@ -4,7 +4,7 @@
  height="500"
  layout="topleft"
  name="Joystick"
- help_topic="joystick"
+ help_topic="Viewerhelp:Joystick_Configuration"
  title="JOYSTICK CONFIGURATION"
  width="569">
     <floater.string
-- 
cgit v1.2.3


From 6fe7dab04434dbb21ef11afbb0ce9afd2cc3a70e Mon Sep 17 00:00:00 2001
From: andreykproductengine <akleshchev@productengine.com>
Date: Mon, 4 Aug 2014 17:16:02 +0300
Subject: MAINT-4304 FIXED Avatar stuck running if releasing shift during
 double-tap strafe

---
 indra/newview/llviewerkeyboard.cpp | 37 +++++++++++++++++++++++++++----------
 1 file changed, 27 insertions(+), 10 deletions(-)

(limited to 'indra/newview')

diff --git a/indra/newview/llviewerkeyboard.cpp b/indra/newview/llviewerkeyboard.cpp
index b0f4802e20..a4a05587d3 100755
--- a/indra/newview/llviewerkeyboard.cpp
+++ b/indra/newview/llviewerkeyboard.cpp
@@ -88,18 +88,25 @@ void agent_push_down( EKeystate s )
 	gAgent.moveUp(-1);
 }
 
+static void agent_check_temporary_run(LLAgent::EDoubleTapRunMode mode)
+{
+	if (gAgent.mDoubleTapRunMode == mode &&
+		gAgent.getRunning() &&
+		!gAgent.getAlwaysRun())
+	{
+		// Turn off temporary running.
+		gAgent.clearRunning();
+		gAgent.sendWalkRun(gAgent.getRunning());
+	}
+}
+
 static void agent_handle_doubletap_run(EKeystate s, LLAgent::EDoubleTapRunMode mode)
 {
 	if (KEYSTATE_UP == s)
 	{
-		if (gAgent.mDoubleTapRunMode == mode &&
-		    gAgent.getRunning() &&
-		    !gAgent.getAlwaysRun())
-		{
-			// Turn off temporary running.
-			gAgent.clearRunning();
-			gAgent.sendWalkRun(gAgent.getRunning());
-		}
+		// Note: in case shift is already released, slide left/right run
+		// will be released in agent_turn_left()/agent_turn_right()
+		agent_check_temporary_run(mode);
 	}
 	else if (gSavedSettings.getBOOL("AllowTapTapHoldRun") &&
 		 KEYSTATE_DOWN == s &&
@@ -218,7 +225,12 @@ void agent_turn_left( EKeystate s )
 	}
 	else
 	{
-		if (KEYSTATE_UP == s) return;
+		if (KEYSTATE_UP == s)
+		{
+			// Check temporary running. In case user released 'left' key with shift already released.
+			agent_check_temporary_run(LLAgent::DOUBLETAP_SLIDELEFT);
+			return;
+		}
 		F32 time = gKeyboard->getCurKeyElapsedTime();
 		gAgent.moveYaw( LLFloaterMove::getYawRate( time ) );
 	}
@@ -241,7 +253,12 @@ void agent_turn_right( EKeystate s )
 	}
 	else
 	{
-		if (KEYSTATE_UP == s) return;
+		if (KEYSTATE_UP == s)
+		{
+			// Check temporary running. In case user released 'right' key with shift already released.
+			agent_check_temporary_run(LLAgent::DOUBLETAP_SLIDERIGHT);
+			return;
+		}
 		F32 time = gKeyboard->getCurKeyElapsedTime();
 		gAgent.moveYaw( -LLFloaterMove::getYawRate( time ) );
 	}
-- 
cgit v1.2.3


From 3aa0359b2f11c6b9183cd09ba7cd2ce542a536eb Mon Sep 17 00:00:00 2001
From: "Brad Payne (Vir Linden)" <vir@lindenlab.com>
Date: Wed, 6 Aug 2014 16:10:30 -0400
Subject: SL-90 FIX - support folder_name option in wear_folder SLURL

---
 indra/newview/llappearancemgr.cpp | 36 ++++++++++++++++++++++++++----------
 1 file changed, 26 insertions(+), 10 deletions(-)

(limited to 'indra/newview')

diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp
index 29534a4382..e35cf011c7 100755
--- a/indra/newview/llappearancemgr.cpp
+++ b/indra/newview/llappearancemgr.cpp
@@ -4056,17 +4056,33 @@ public:
 	bool handle(const LLSD& tokens, const LLSD& query_map,
 				LLMediaCtrl* web)
 	{
-		LLPointer<LLInventoryCategory> category = new LLInventoryCategory(query_map["folder_id"],
-																		  LLUUID::null,
-																		  LLFolderType::FT_CLOTHING,
-																		  "Quick Appearance");
-		LLSD::UUID folder_uuid = query_map["folder_id"].asUUID();
-		if ( gInventory.getCategory( folder_uuid ) != NULL )
-		{
-			LLAppearanceMgr::getInstance()->wearInventoryCategory(category, true, false);
+		LLSD::UUID folder_uuid;
 
-			// *TODOw: This may not be necessary if initial outfit is chosen already -- josh
-			gAgent.setOutfitChosen(TRUE);
+		if (folder_uuid.isNull() && query_map.has("folder_name"))
+		{
+			std::string outfit_folder_name = query_map["folder_name"];
+			folder_uuid = findDescendentCategoryIDByName(
+				gInventory.getLibraryRootFolderID(),
+				outfit_folder_name);	
+		}
+		if (folder_uuid.isNull() && query_map.has("folder_id"))
+		{
+			folder_uuid = query_map["folder_id"].asUUID();
+		}
+		
+		if (folder_uuid.notNull())
+		{
+			LLPointer<LLInventoryCategory> category = new LLInventoryCategory(folder_uuid,
+																			  LLUUID::null,
+																			  LLFolderType::FT_CLOTHING,
+																			  "Quick Appearance");
+			if ( gInventory.getCategory( folder_uuid ) != NULL )
+			{
+				LLAppearanceMgr::getInstance()->wearInventoryCategory(category, true, false);
+				
+				// *TODOw: This may not be necessary if initial outfit is chosen already -- josh
+				gAgent.setOutfitChosen(TRUE);
+			}
 		}
 
 		// release avatar picker keyboard focus
-- 
cgit v1.2.3


From c9d24fefc0794bc8828db1deb97aac2308cab067 Mon Sep 17 00:00:00 2001
From: andreykproductengine <akleshchev@productengine.com>
Date: Mon, 11 Aug 2014 15:36:42 +0300
Subject: MAINT-4086 FIXED Limit the number items "Replace Current Outfit" or
 "Wear" applies to Nested folders fix

---
 indra/newview/llinventorybridge.cpp | 33 +++++++++++++++------------------
 indra/newview/lltooldraganddrop.cpp | 31 ++++++++++++++-----------------
 2 files changed, 29 insertions(+), 35 deletions(-)

(limited to 'indra/newview')

diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp
index 33e557cddd..8e6ac20eaa 100755
--- a/indra/newview/llinventorybridge.cpp
+++ b/indra/newview/llinventorybridge.cpp
@@ -3779,24 +3779,21 @@ void LLFolderBridge::modifyOutfit(BOOL append)
 
 	// checking amount of items to wear
 	U32 max_items = gSavedSettings.getU32("WearFolderLimit");
-	if (cat->getDescendentCount() > max_items)
-	{
-		LLInventoryModel::cat_array_t cats;
-		LLInventoryModel::item_array_t items;
-		LLFindWearablesEx not_worn(/*is_worn=*/ false, /*include_body_parts=*/ false);
-		gInventory.collectDescendentsIf(cat->getUUID(),
-			cats,
-			items,
-			LLInventoryModel::EXCLUDE_TRASH,
-			not_worn);
-
-		if (items.size() > max_items)
-		{
-			LLSD args;
-			args["AMOUNT"] = llformat("%d", max_items);
-			LLNotificationsUtil::add("TooManyWearables", args);
-			return;
-		}
+	LLInventoryModel::cat_array_t cats;
+	LLInventoryModel::item_array_t items;
+	LLFindWearablesEx not_worn(/*is_worn=*/ false, /*include_body_parts=*/ false);
+	gInventory.collectDescendentsIf(cat->getUUID(),
+		cats,
+		items,
+		LLInventoryModel::EXCLUDE_TRASH,
+		not_worn);
+
+	if (items.size() > max_items)
+	{
+		LLSD args;
+		args["AMOUNT"] = llformat("%d", max_items);
+		LLNotificationsUtil::add("TooManyWearables", args);
+		return;
 	}
 
 	LLAppearanceMgr::instance().wearInventoryCategory( cat, FALSE, append );
diff --git a/indra/newview/lltooldraganddrop.cpp b/indra/newview/lltooldraganddrop.cpp
index 575e5c5c52..8561d265de 100755
--- a/indra/newview/lltooldraganddrop.cpp
+++ b/indra/newview/lltooldraganddrop.cpp
@@ -2173,23 +2173,20 @@ EAcceptance LLToolDragAndDrop::dad3dWearCategory(
 	}
 
 	U32 max_items = gSavedSettings.getU32("WearFolderLimit");
-	if (category->getDescendentCount()>max_items)
-	{
-		LLInventoryModel::cat_array_t cats;
-		LLInventoryModel::item_array_t items;
-		LLFindWearablesEx not_worn(/*is_worn=*/ false, /*include_body_parts=*/ false);
-		gInventory.collectDescendentsIf(category->getUUID(),
-			cats,
-			items,
-			LLInventoryModel::EXCLUDE_TRASH,
-			not_worn);
-		if (items.size() > max_items)
-		{
-			LLStringUtil::format_map_t args;
-			args["AMOUNT"] = llformat("%d", max_items);
-			mCustomMsg = LLTrans::getString("TooltipTooManyWearables",args);
-			return ACCEPT_NO_CUSTOM;
-		}
+	LLInventoryModel::cat_array_t cats;
+	LLInventoryModel::item_array_t items;
+	LLFindWearablesEx not_worn(/*is_worn=*/ false, /*include_body_parts=*/ false);
+	gInventory.collectDescendentsIf(category->getUUID(),
+		cats,
+		items,
+		LLInventoryModel::EXCLUDE_TRASH,
+		not_worn);
+	if (items.size() > max_items)
+	{
+		LLStringUtil::format_map_t args;
+		args["AMOUNT"] = llformat("%d", max_items);
+		mCustomMsg = LLTrans::getString("TooltipTooManyWearables",args);
+		return ACCEPT_NO_CUSTOM;
 	}
 
 	if(mSource == SOURCE_AGENT)
-- 
cgit v1.2.3


From 55fa4b1c37ced0a3f0b38cb17bd6da5dfbc0b69c Mon Sep 17 00:00:00 2001
From: andreykproductengine <akleshchev@productengine.com>
Date: Mon, 18 Aug 2014 16:06:20 +0300
Subject: MAINT-4334 FIXED Request confirmation from the user when paying
 another avatar to ensure that the destination avatar and L$ amount is correct
 and intended before the money is sent

---
 indra/newview/llfloaterpay.cpp                     |  75 ++++++--
 indra/newview/skins/default/xui/en/floater_pay.xml | 187 ++++++++++++--------
 .../skins/default/xui/en/floater_pay_object.xml    | 194 +++++++++++++--------
 .../newview/skins/default/xui/en/notifications.xml |  13 ++
 4 files changed, 303 insertions(+), 166 deletions(-)

(limited to 'indra/newview')

diff --git a/indra/newview/llfloaterpay.cpp b/indra/newview/llfloaterpay.cpp
index f0c010b545..a4d13ce1d5 100755
--- a/indra/newview/llfloaterpay.cpp
+++ b/indra/newview/llfloaterpay.cpp
@@ -40,8 +40,10 @@
 #include "lltextbox.h"
 #include "lllineeditor.h"
 #include "llmutelist.h"
+#include "llnotificationsutil.h"
 #include "llfloaterreporter.h"
 #include "llslurl.h"
+#include "llstatusbar.h"
 #include "llviewerobject.h"
 #include "llviewerobjectlist.h"
 #include "llviewerregion.h"
@@ -90,6 +92,9 @@ public:
 	static void payDirectly(money_callback callback,
 							const LLUUID& target_id,
 							bool is_group);
+	static bool payConfirmationCallback(const LLSD& notification,
+										const LLSD& response,
+										LLGiveMoneyInfo* info);
 
 private:
 	static void onCancel(void* data);
@@ -111,14 +116,12 @@ protected:
 	LLGiveMoneyInfo* mQuickPayInfo[MAX_PAY_BUTTONS];
 
 	LLSafeHandle<LLObjectSelection> mObjectSelection;
-
-	static S32 sLastAmount;
 };
 
 
-S32 LLFloaterPay::sLastAmount = 0;
 const S32 MAX_AMOUNT_LENGTH = 10;
 const S32 FASTPAY_BUTTON_WIDTH = 80;
+const S32 PAY_AMOUNT_NOTIFICATION = 200;
 
 LLFloaterPay::LLFloaterPay(const LLSD& key)
 	: LLFloater(key),
@@ -188,17 +191,9 @@ BOOL LLFloaterPay::postBuild()
 
 
 	getChildView("amount text")->setVisible(FALSE);	
-
-	std::string last_amount;
-	if(sLastAmount > 0)
-	{
-		last_amount = llformat("%d", sLastAmount);
-	}
-
 	getChildView("amount")->setVisible(FALSE);
 
 	getChild<LLLineEditor>("amount")->setKeystrokeCallback(&LLFloaterPay::onKeystroke, this);
-	getChild<LLUICtrl>("amount")->setValue(last_amount);
 	getChild<LLLineEditor>("amount")->setPrevalidate(LLTextValidate::validateNonNegativeS32);
 
 	info = new LLGiveMoneyInfo(this, 0);
@@ -207,7 +202,7 @@ BOOL LLFloaterPay::postBuild()
 	childSetAction("pay btn",&LLFloaterPay::onGive,info);
 	setDefaultBtn("pay btn");
 	getChildView("pay btn")->setVisible(FALSE);
-	getChildView("pay btn")->setEnabled((sLastAmount > 0));
+	getChildView("pay btn")->setEnabled(FALSE);
 
 	childSetAction("cancel btn",&LLFloaterPay::onCancel,this);
 
@@ -419,7 +414,24 @@ void LLFloaterPay::payDirectly(money_callback callback,
 	
 	floater->finishPayUI(target_id, is_group);
 }
-	
+
+bool LLFloaterPay::payConfirmationCallback(const LLSD& notification, const LLSD& response, LLGiveMoneyInfo* info)
+{
+	if (!info || !info->mFloater)
+	{
+		return false;
+	}
+
+	S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
+	if (option == 0)
+	{
+		info->mFloater->give(info->mAmount);
+		info->mFloater->closeFloater();
+	}
+
+	return false;
+}
+
 void LLFloaterPay::finishPayUI(const LLUUID& target_id, BOOL is_group)
 {
 	std::string slurl;
@@ -470,10 +482,40 @@ void LLFloaterPay::onKeystroke(LLLineEditor*, void* data)
 void LLFloaterPay::onGive(void* data)
 {
 	LLGiveMoneyInfo* info = reinterpret_cast<LLGiveMoneyInfo*>(data);
-	if(info && info->mFloater)
+	LLFloaterPay* floater = info->mFloater;
+	if(info && floater)
 	{
-		info->mFloater->give(info->mAmount);
-		info->mFloater->closeFloater();
+		S32 amount = info->mAmount;
+		if(amount == 0)
+		{
+			amount = atoi(floater->getChild<LLUICtrl>("amount")->getValue().asString().c_str());
+		}
+		if (amount > PAY_AMOUNT_NOTIFICATION && gStatusBar && gStatusBar->getBalance() > amount)
+		{
+			LLUUID payee_id;
+			BOOL is_group;
+			if (floater->mObjectSelection.notNull())
+			{
+				LLSelectNode* node = floater->mObjectSelection->getFirstRootNode();
+				node->mPermissions->getOwnership(payee_id, is_group);
+			}
+			else
+			{
+				is_group = floater->mTargetIsGroup;
+				payee_id = floater->mTargetUUID;
+			}
+
+			LLSD args;
+			args["TARGET"] = LLSLURL( is_group ? "group" : "agent", payee_id, "completename").getSLURLString();
+			args["AMOUNT"] = amount;
+
+			LLNotificationsUtil::add("PayConfirmation", args, LLSD(), boost::bind(&LLFloaterPay::payConfirmationCallback, _1, _2, info));
+		}
+		else
+		{
+			floater->give(amount);
+			floater->closeFloater();
+		}
 	}
 }
 
@@ -487,7 +529,6 @@ void LLFloaterPay::give(S32 amount)
 		{
 			amount = atoi(getChild<LLUICtrl>("amount")->getValue().asString().c_str());
 		}
-		sLastAmount = amount;
 
 		// Try to pay an object.
 		if (mObjectSelection.notNull())
diff --git a/indra/newview/skins/default/xui/en/floater_pay.xml b/indra/newview/skins/default/xui/en/floater_pay.xml
index 41a7134b1d..9d91f801a6 100755
--- a/indra/newview/skins/default/xui/en/floater_pay.xml
+++ b/indra/newview/skins/default/xui/en/floater_pay.xml
@@ -2,12 +2,12 @@
 <floater
  legacy_header_height="18"
  can_minimize="false"
- height="200"
+ height="186"
  layout="topleft"
  name="Give Money"
  help_topic="give_money"
  save_rect="true"
- width="250">
+ width="261">
    <string
     name="payee_group">
         Pay Group
@@ -21,88 +21,129 @@
      type="string"
      length="1"
      follows="left|top"
-     font="SansSerifSmall"
      height="16"
      layout="topleft"
      left="10"
-     name="payee_name"
-     top="25" 
-     use_ellipses="true"
-     width="230">
-        Test Name That Is Extremely Long To Check Clipping
+     top="24"
+     name="paying_text"
+     width="180">
+     You are paying:
     </text>
-    <button
-     height="23"
-     label="L$1"
-     label_selected="L$1"
-     layout="topleft"
-     left="35"
-     name="fastpay 1"
-     top_pad="8"
-     width="80" />
-    <button
-     height="23"
-     label="L$5"
-     label_selected="L$5"
-     layout="topleft"
-     left_pad="15"
-     name="fastpay 5"
-     width="80" />
-    <button
-     height="23"
-     label="L$10"
-     label_selected="L$10"
-     layout="topleft"
-     left="35"
-     name="fastpay 10"
-     top_pad="8"
-     width="80" />
-    <button
-     height="23"
-     label="L$20"
-     label_selected="L$20"
-     layout="topleft"
-     left_pad="15"
-     name="fastpay 20"
-     width="80" />
     <text
      type="string"
      length="1"
      follows="left|top"
-     height="18"
+     font="SansSerifSmall"
+     height="16"
      layout="topleft"
-     left="35"
-     name="amount text"
-     top_pad="8"
+     left="10"
+     top_pad="5"
+     name="payee_name"
+     use_ellipses="true"
      width="180">
-        Or, choose amount:
+        Test Name That Is Extremely Long To Check Clipping
     </text>
-    <line_editor
-     border_style="line"
-     follows="left|top|right"
-     height="19"
-     top_pad="0"
-     layout="topleft"
-     left="130"
-     max_length_bytes="9"
-     name="amount"
-     width="80" />
-    <button
-     enabled="false"
-     height="23"
-     label="Pay"
-     label_selected="Pay"
-     layout="topleft"
-     left="20"
-     name="pay btn"
-     top_pad="15"
-     width="100" />
-    <button
-     height="23"
-     label="Cancel"
-     label_selected="Cancel"
+    <panel
+     border_thickness="0"
+     height="104"
+     label="Search"
      layout="topleft"
+     left="0"
+     top_pad="10"
+     help_topic="avatarpicker"
+     name="PatternsPanel"
+     width="120">
+      <button
+       height="23"
+       label="Pay L$ 1"
+       label_selected="Pay L$ 1"
+       layout="topleft"
+       left="10"
+       top="0"
+       name="fastpay 1"
+       width="110" />
+      <button
+       height="23"
+       label="Pay L$ 5"
+       label_selected="Pay L$ 5"
+       layout="topleft"
+       left="10"
+       top_pad="4"
+       name="fastpay 5"
+       width="110" />
+      <button
+       height="23"
+       label="Pay L$ 10"
+       label_selected="Pay L$ 10"
+       layout="topleft"
+       left="10"
+       top_pad="4"
+       name="fastpay 10"
+       width="110" />
+      <button
+       height="23"
+       label="Pay L$ 20"
+       label_selected="Pay L$ 20"
+       layout="topleft"
+       left="10"
+       top_pad="4"
+       name="fastpay 20"
+       width="110" />
+    </panel>
+    <view_border
+     bevel_style="in"
+     width="1"
+     height="104"
      left_pad="10"
-     name="cancel btn"
-     width="100" />
+     layout="topleft" />
+    <panel
+     border_thickness="0"
+     height="104"
+     label="Search"
+     layout="topleft"
+     left_pad="0"
+     name="InputPanel"
+     width="120">
+      <text
+       type="string"
+       length="1"
+       follows="left|top"
+       height="18"
+       layout="topleft"
+       left="10"
+       top="0"
+       name="amount text"
+       width="110">
+        Other amount:
+      </text>
+      <line_editor
+       border_style="line"
+       follows="left|top|right"
+       height="19"
+       layout="topleft"
+       left="10"
+       top_pad="0"
+       max_length_bytes="9"
+       name="amount"
+       width="90" />
+      <button
+       enabled="false"
+       height="23"
+       label="Pay"
+       label_selected="Pay"
+       layout="topleft"
+       left="10"
+       top_pad="17"
+       name="pay btn"
+       width="110" />
+      <button
+       height="23"
+       label="Cancel"
+       label_selected="Cancel"
+       layout="topleft"
+       left="10"
+       top_pad="4"
+       name="cancel btn"
+       width="110" />
+    </panel>
 </floater>
diff --git a/indra/newview/skins/default/xui/en/floater_pay_object.xml b/indra/newview/skins/default/xui/en/floater_pay_object.xml
index d3a35c2051..f1e27b918e 100755
--- a/indra/newview/skins/default/xui/en/floater_pay_object.xml
+++ b/indra/newview/skins/default/xui/en/floater_pay_object.xml
@@ -2,12 +2,12 @@
 <floater
  legacy_header_height="18"
  can_minimize="false"
- height="225"
+ height="228"
  layout="topleft"
  name="Give Money"
  help_topic="give_money"
  save_rect="true"
- width="250">
+ width="261">
     <string
      name="payee_group">
         Pay Group
@@ -16,12 +16,25 @@
      name="payee_resident">
         Pay Resident
     </string>
+
     <text
+     type="string"
+     length="1"
      follows="left|top"
      height="16"
      layout="topleft"
      left="10"
-     top_pad="24"
+     top="24"
+     name="paying_text"
+     width="180">
+      You are paying:
+    </text>
+    <text
+     follows="left|top"
+     height="16"
+     layout="topleft"
+     left="10"
+     top_pad="5"
      name="payee_name"
      use_ellipses="true" 
      width="225">
@@ -40,7 +53,7 @@
      width="180">
         Via object:
     </text>
-   <icon
+    <icon
      height="16"
      width="16"
      image_name="Inv_Object"
@@ -64,78 +77,107 @@
      width="188">
         My awesome object with a really damn long name
     </text>
-   <button
-     height="23"
-     label="L$1"
-     label_selected="L$1"
-     layout="topleft"
-     left="25"
-     name="fastpay 1"
-     top_pad="8"
-     width="80" />
-    <button
-     height="23"
-     label="L$5"
-     label_selected="L$5"
-     layout="topleft"
-     left_pad="15"
-     name="fastpay 5"
-     width="80" />
-    <button
-     height="23"
-     label="L$10"
-     label_selected="L$10"
-     layout="topleft"
-     left="25"
-     name="fastpay 10"
-     top_pad="8"
-     width="80" />
-    <button
-     height="23"
-     label="L$20"
-     label_selected="L$20"
+    <panel
+     border_thickness="0"
+     height="104"
+     label="Search"
      layout="topleft"
-     left_pad="15"
-     name="fastpay 20"
-     width="80" />
-    <text
-     type="string"
-     length="1"
-     follows="left|top"
-     height="14"
-     layout="topleft"
-     left="25"
-     name="amount text"
-     top_pad="8"
-     width="180">
-        Or, choose amount:
-    </text>
-    <line_editor
-     border_style="line"
-     follows="left|top|right"
-     height="21"
-     top_pad="0"
-     layout="topleft"
-     left="120"
-     max_length_bytes="9"
-     name="amount"
-     width="80" />
-    <button
-     enabled="false"
-     height="23"
-     label="Pay"
-     label_selected="Pay"
-     layout="topleft"
-     left="10"
-     name="pay btn"
-     top_pad="5"
-     width="100" />
-    <button
-     height="23"
-     label="Cancel"
-     label_selected="Cancel"
+     left="0"
+     top_pad="10"
+     help_topic="avatarpicker"
+     name="PatternsPanel"
+     width="120">
+      <button
+       height="23"
+       label="Pay L$ 1"
+       label_selected="Pay L$ 1"
+       layout="topleft"
+       left="10"
+       top="0"
+       name="fastpay 1"
+       width="110" />
+      <button
+       height="23"
+       label="Pay L$ 5"
+       label_selected="Pay L$ 5"
+       layout="topleft"
+       left="10"
+       top_pad="4"
+       name="fastpay 5"
+       width="110" />
+      <button
+       height="23"
+       label="Pay L$ 10"
+       label_selected="Pay L$ 10"
+       layout="topleft"
+       left="10"
+       top_pad="4"
+       name="fastpay 10"
+       width="110" />
+      <button
+       height="23"
+       label="Pay L$ 20"
+       label_selected="Pay L$ 20"
+       layout="topleft"
+       left="10"
+       top_pad="4"
+       name="fastpay 20"
+       width="110" />
+    </panel>
+    <view_border
+     bevel_style="in"
+     width="1"
+     height="104"
+     left_pad="10"
+     layout="topleft" />
+    <panel
+     border_thickness="0"
+     height="104"
+     label="Search"
      layout="topleft"
-     left_pad="5"
-     name="cancel btn"
-     width="100" />
+     left_pad="0"
+     name="InputPanel"
+     width="120">
+      <text
+       type="string"
+       length="1"
+       follows="left|top"
+       height="18"
+       layout="topleft"
+       left="10"
+       top="0"
+       name="amount text"
+       width="180">
+        Other amount:
+      </text>
+      <line_editor
+       border_style="line"
+       follows="left|top|right"
+       height="19"
+       layout="topleft"
+       left="10"
+       top_pad="0"
+       max_length_bytes="9"
+       name="amount"
+       width="90" />
+      <button
+       enabled="false"
+       height="23"
+       label="Pay"
+       label_selected="Pay"
+       layout="topleft"
+       left="10"
+       top_pad="17"
+       name="pay btn"
+       width="110" />
+      <button
+       height="23"
+       label="Cancel"
+       label_selected="Cancel"
+       layout="topleft"
+       left="10"
+       top_pad="4"
+       name="cancel btn"
+       width="110" />
+    </panel>
 </floater>
diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml
index d606893fc7..55e421ebe0 100755
--- a/indra/newview/skins/default/xui/en/notifications.xml
+++ b/indra/newview/skins/default/xui/en/notifications.xml
@@ -5173,6 +5173,19 @@ Warning: The &apos;Pay object&apos; click action has been set, but it will only
     </form>
   </notification>
 
+  <notification
+   icon="alertmodal.tga"
+   name="PayConfirmation"
+   type="alertmodal">
+    Confirm that you want to pay L$[AMOUNT] to [TARGET].
+    <tag>confirm</tag>
+    <usetemplate
+     ignoretext="Confirm before paying"
+     name="okcancelignore"
+     notext="Cancel"
+     yestext="Pay"/>
+  </notification>
+
   <notification
    icon="alertmodal.tga"
    name="OpenObjectCannotCopy"
-- 
cgit v1.2.3


From c64544afe9cfc8204137fc7a68f2d70e4830c056 Mon Sep 17 00:00:00 2001
From: andreykproductengine <akleshchev@productengine.com>
Date: Tue, 19 Aug 2014 15:02:36 +0300
Subject: MAINT-3391 FIXED Sounds no longer play directly when double clicking
 in inventory.

---
 indra/newview/llinventorybridge.cpp                 | 21 ++++++++++++++++++++-
 indra/newview/llinventorybridge.h                   |  1 +
 .../newview/skins/default/xui/en/menu_inventory.xml |  2 +-
 3 files changed, 22 insertions(+), 2 deletions(-)

(limited to 'indra/newview')

diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp
index 8e6ac20eaa..d6f2803fc2 100755
--- a/indra/newview/llinventorybridge.cpp
+++ b/indra/newview/llinventorybridge.cpp
@@ -87,6 +87,8 @@ void copy_slurl_to_clipboard_callback_inv(const std::string& slurl);
 typedef std::pair<LLUUID, LLUUID> two_uuids_t;
 typedef std::list<two_uuids_t> two_uuids_list_t;
 
+const F32 SOUND_GAIN = 1.0f;
+
 struct LLMoveInv
 {
 	LLUUID mObjectID;
@@ -4523,6 +4525,23 @@ void LLSoundBridge::buildContextMenu(LLMenuGL& menu, U32 flags)
 	hide_context_entries(menu, items, disabled_items);
 }
 
+void LLSoundBridge::performAction(LLInventoryModel* model, std::string action)
+{
+	if ("sound_play" == action)
+	{
+		LLViewerInventoryItem* item = getItem();
+		if(item)
+		{
+			send_sound_trigger(item->getAssetUUID(), SOUND_GAIN);
+		}
+	}
+	else if ("open" == action)
+	{
+		openSoundPreview((void*)this);
+	}
+	else LLItemBridge::performAction(model, action);
+}
+
 // +=================================================+
 // |        LLLandmarkBridge                         |
 // +=================================================+
@@ -6135,7 +6154,7 @@ public:
 		LLViewerInventoryItem* item = getItem();
 		if (item)
 		{
-			LLFloaterReg::showInstance("preview_sound", LLSD(mUUID), TAKE_FOCUS_YES);
+			send_sound_trigger(item->getAssetUUID(), SOUND_GAIN);
 		}
 		LLInvFVBridgeAction::doIt();
 	}
diff --git a/indra/newview/llinventorybridge.h b/indra/newview/llinventorybridge.h
index 833fbbadbb..e8d5db4437 100755
--- a/indra/newview/llinventorybridge.h
+++ b/indra/newview/llinventorybridge.h
@@ -389,6 +389,7 @@ public:
 		LLItemBridge(inventory, root, uuid) {}
 	virtual void openItem();
 	virtual void buildContextMenu(LLMenuGL& menu, U32 flags);
+	virtual void performAction(LLInventoryModel* model, std::string action);
 	static void openSoundPreview(void*);
 };
 
diff --git a/indra/newview/skins/default/xui/en/menu_inventory.xml b/indra/newview/skins/default/xui/en/menu_inventory.xml
index 6fa45d7d66..7099db63ab 100755
--- a/indra/newview/skins/default/xui/en/menu_inventory.xml
+++ b/indra/newview/skins/default/xui/en/menu_inventory.xml
@@ -531,7 +531,7 @@
      name="Sound Play">
         <menu_item_call.on_click
          function="Inventory.DoToSelected"
-         parameter="open" />
+         parameter="sound_play" />
     </menu_item_call>
     <menu_item_separator
      layout="topleft"
-- 
cgit v1.2.3


From a14ba78dbbfc925c94f1e8ed94b52bc08e626e3d Mon Sep 17 00:00:00 2001
From: andreykproductengine <akleshchev@productengine.com>
Date: Tue, 12 Aug 2014 19:45:53 +0300
Subject: MAINT-4218 FIXED Adding clothing from inventory closes THAT clothing
 folder and hides THAT folder

---
 indra/newview/llfolderviewmodelinventory.cpp | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

(limited to 'indra/newview')

diff --git a/indra/newview/llfolderviewmodelinventory.cpp b/indra/newview/llfolderviewmodelinventory.cpp
index 7615c12043..2eca2a8974 100755
--- a/indra/newview/llfolderviewmodelinventory.cpp
+++ b/indra/newview/llfolderviewmodelinventory.cpp
@@ -129,13 +129,18 @@ void LLFolderViewModelItemInventory::requestSort()
 
 void LLFolderViewModelItemInventory::setPassedFilter(bool passed, S32 filter_generation, std::string::size_type string_offset, std::string::size_type string_size)
 {
+	bool generation_skip = mMarkedDirtyGeneration >= 0
+		&& mPrevPassedAllFilters
+		&& mMarkedDirtyGeneration < mRootViewModel.getFilter().getFirstSuccessGeneration();
 	LLFolderViewModelItemCommon::setPassedFilter(passed, filter_generation, string_offset, string_size);
 	bool before = mPrevPassedAllFilters;
 	mPrevPassedAllFilters = passedFilter(filter_generation);
 
-	if (before != mPrevPassedAllFilters)
+	if (before != mPrevPassedAllFilters || generation_skip)
 	{
-		// Need to rearrange the folder if the filtered state of the item changed
+		// Need to rearrange the folder if the filtered state of the item changed,
+		// previously passed item skipped filter generation changes while being dirty
+		// or previously passed not yet filtered item was marked dirty
 		LLFolderViewFolder* parent_folder = mFolderViewItem->getParentFolder();
 		if (parent_folder)
 		{
-- 
cgit v1.2.3


From 75406641836fee796428216df82b7e29ad24443a Mon Sep 17 00:00:00 2001
From: Aura Linden <aura@lindenlab.com>
Date: Wed, 13 Aug 2014 18:12:25 -0700
Subject: Ported from defective branch.

---
 indra/newview/app_settings/settings.xml | 33 ++++++++++++++++++++++-----------
 indra/newview/llappviewer.cpp           |  5 ++++-
 indra/newview/llvoicevivox.cpp          | 32 ++++++++++++++++++++++++++------
 indra/newview/llvoicevivox.h            |  2 ++
 4 files changed, 54 insertions(+), 18 deletions(-)

(limited to 'indra/newview')

diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml
index 000362ebfd..757539ee74 100755
--- a/indra/newview/app_settings/settings.xml
+++ b/indra/newview/app_settings/settings.xml
@@ -6118,16 +6118,16 @@
     <integer>0</integer>
   </map>
   <key>MemoryLogFrequency</key>
-  <map>
-    <key>Comment</key>
-    <string>Seconds between display of Memory in log (0 for never)</string>
-    <key>Persist</key>
-    <integer>1</integer>
-    <key>Type</key>
-    <string>F32</string>
-    <key>Value</key>
-    <real>30.0</real>
-  </map>
+        <map>
+        <key>Comment</key>
+            <string>Seconds between display of Memory in log (0 for never)</string>
+        <key>Persist</key>
+            <integer>1</integer>
+        <key>Type</key>
+            <string>F32</string>
+        <key>Value</key>
+            <real>600.0</real>
+        </map>
     <key>MemoryPrivatePoolEnabled</key>
     <map>
       <key>Comment</key>
@@ -13501,7 +13501,7 @@
     <key>VivoxDebugLevel</key>
     <map>
       <key>Comment</key>
-      <string>Logging level to use when launching the vivox daemon</string>
+      <string>Logging level to use when launching the vivox daemon SPATTERS FIX VALUE BEFORE CHECKIN</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
@@ -13509,6 +13509,17 @@
       <key>Value</key>
       <string>0</string>
     </map>
+    <key>VivoxShutdownTimeout</key>
+    <map>
+      <key>Comment</key>
+      <string>shutdown timeout in miliseconds.  The amount of time to wait for the service to shutdown gracefully after the last disconnect</string>
+      <key>Persist</key>
+      <integer>1</integer>
+      <key>Type</key>
+      <string>String</string>
+      <key>Value</key>
+      <string>500</string>
+    </map>
     <key>VivoxDebugSIPURIHostName</key>
     <map>
       <key>Comment</key>
diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp
index 24150daea4..29b883aef1 100755
--- a/indra/newview/llappviewer.cpp
+++ b/indra/newview/llappviewer.cpp
@@ -4896,7 +4896,10 @@ void LLAppViewer::idle()
 	// Handle the regular UI idle callbacks as well as
 	// hover callbacks
 	//
-
+    
+#ifdef LL_DARWIN   SPATTERS may want to make this mac-only.  Test on Windows.
+	if (mQuitRequested)  //MAINT-4243
+#endif
 	{
 // 		LL_RECORD_BLOCK_TIME(FTM_IDLE_CB);
 
diff --git a/indra/newview/llvoicevivox.cpp b/indra/newview/llvoicevivox.cpp
index 54b4119331..48d458b142 100755
--- a/indra/newview/llvoicevivox.cpp
+++ b/indra/newview/llvoicevivox.cpp
@@ -476,10 +476,9 @@ void LLVivoxVoiceClient::connectorCreate()
 
 	std::string savedLogLevel = gSavedSettings.getString("VivoxDebugLevel");
 		
-	if(savedLogLevel != "-0")
+	if(savedLogLevel != "0")
 	{
 		LL_DEBUGS("Voice") << "creating connector with logging enabled" << LL_ENDL;
-		loglevel = "0";
 	}
 	
 	stream 
@@ -788,15 +787,29 @@ void LLVivoxVoiceClient::stateMachine()
 						// vivox executable exists.  Build the command line and launch the daemon.
 						LLProcess::Params params;
 						params.executable = exe_path;
-						// SLIM SDK: these arguments are no longer necessary.
-//						std::string args = " -p tcp -h -c";
+
 						std::string loglevel = gSavedSettings.getString("VivoxDebugLevel");
+						std::string shutdown_timeout = gSavedSettings.getString("VivoxShutdownTimeout");
 						if(loglevel.empty())
 						{
 							loglevel = "0";	// turn logging off completely
 						}
+							
 						params.args.add("-ll");
 						params.args.add(loglevel);
+
+						//if (loglevel != "0") //SPATTERS
+						{
+							std::string log_folder = gDirUtilp->getExpandedFilename(LL_PATH_LOGS, "");
+							params.args.add("-lf");
+							params.args.add(log_folder);
+						}
+
+						if(!shutdown_timeout.empty())
+						{
+							params.args.add("-st");
+							params.args.add(shutdown_timeout);
+						}
 						params.cwd = gDirUtilp->getAppRODataDir();
 						sGatewayPtr = LLProcess::create(params);
 
@@ -1334,7 +1347,7 @@ void LLVivoxVoiceClient::stateMachine()
 				{
 					// Connect to a session by URI
 					sessionCreateSendMessage(mAudioSession, true, false);
-				}
+				}  
 
 				notifyStatusObservers(LLVoiceClientStatusObserver::STATUS_JOINING);
 				setState(stateJoiningSession);
@@ -1510,7 +1523,7 @@ void LLVivoxVoiceClient::stateMachine()
 			// Always reset the terminate request flag when we get here.
 			mSessionTerminateRequested = false;
 
-			if((mVoiceEnabled || !mIsInitialized) && !mRelogRequested)
+			if((mVoiceEnabled || !mIsInitialized) && !mRelogRequested  && !LLApp::isExiting())
 			{				
 				// Just leaving a channel, go back to stateNoChannel (the "logged in but have no channel" state).
 				setState(stateNoChannel);
@@ -1529,6 +1542,7 @@ void LLVivoxVoiceClient::stateMachine()
 		//MARK: stateLoggingOut
 		case stateLoggingOut:			// waiting for logout response
 			// The handler for the AccountLoginStateChangeEvent will transition from here to stateLoggedOut.
+			LL_INFOS() << "SPATTERS do I need to stay alive here?" << LL_ENDL;
 		break;
 		
 		//MARK: stateLoggedOut
@@ -2318,6 +2332,12 @@ static void oldSDKTransform (LLVector3 &left, LLVector3 &up, LLVector3 &at, LLVe
 #endif
 }
 
+void LLVivoxVoiceClient::setHidden(bool hidden)
+{
+    mHidden = hidden;
+    return;
+}
+
 void LLVivoxVoiceClient::sendPositionalUpdate(void)
 {	
 	std::ostringstream stream;
diff --git a/indra/newview/llvoicevivox.h b/indra/newview/llvoicevivox.h
index 5e876fa2ef..8829d9e1b4 100755
--- a/indra/newview/llvoicevivox.h
+++ b/indra/newview/llvoicevivox.h
@@ -747,6 +747,7 @@ private:
 	std::string getAudioSessionURI();
 	std::string getAudioSessionHandle();
 			
+    void setHidden(bool hidden);
 	void sendPositionalUpdate(void);
 	
 	void buildSetCaptureDevice(std::ostringstream &stream);
@@ -775,6 +776,7 @@ private:
 	
 	bool		mMuteMic;
 	bool		mMuteMicDirty;
+    bool        mHidden;       //Set to true during teleport to hide the agent's position.
 			
 	// Set to true when the friends list is known to have changed.
 	bool		mFriendsListDirty;
-- 
cgit v1.2.3


From 0fdfd3ceec14d3ffd6aa6268964ec91df44002a3 Mon Sep 17 00:00:00 2001
From: "Brad Payne (Vir Linden)" <vir@lindenlab.com>
Date: Fri, 15 Aug 2014 10:38:46 -0400
Subject: MAINT-4158 WIP - fix for at least some forms of distortion. I can't
 repro the drastic height changes, so not positive it addresses that.

---
 indra/newview/llvoavatar.cpp | 9 +++++++++
 1 file changed, 9 insertions(+)

(limited to 'indra/newview')

diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp
index 9f42776d78..c548a65fe7 100755
--- a/indra/newview/llvoavatar.cpp
+++ b/indra/newview/llvoavatar.cpp
@@ -7676,6 +7676,15 @@ void LLVOAvatar::dumpArchetypeXML(const std::string& prefix, bool group_by_weara
 		}
 
 	}
+	avatar_joint_list_t::iterator iter = mSkeleton.begin();
+	avatar_joint_list_t::iterator end  = mSkeleton.end();
+	for (; iter != end; ++iter)
+	{
+		LLJoint* pJoint = (*iter);
+		const LLVector3& pos = pJoint->getPosition();
+		apr_file_printf( file, "\t\t<joint name=\"%s\" position=\"%f %f %f\"/>\n", pJoint->getName().c_str(), pos[0], pos[1], pos[2]);
+	}
+
 	apr_file_printf( file, "\t</archetype>\n" );
 	apr_file_printf( file, "\n</linden_genepool>\n" );
 
-- 
cgit v1.2.3


From b99d57fbdeda3f012e090bb610f9d3fb44f4248f Mon Sep 17 00:00:00 2001
From: "Brad Payne (Vir Linden)" <vir@lindenlab.com>
Date: Thu, 23 Oct 2014 06:20:10 -0400
Subject: MAINT-4196 WIP, including clearer inventory warnings for attachment
 errors

---
 indra/newview/llappearancemgr.cpp              |  7 ++++++-
 indra/newview/llinventorybridge.cpp            | 20 ++++++++++++--------
 indra/newview/llviewerinventory.cpp            | 16 ++++++++++++----
 indra/newview/llviewerinventory.h              |  6 ++++--
 indra/newview/llvoavatarself.cpp               | 18 +++++++++++++++---
 indra/newview/llvoavatarself.h                 |  2 +-
 indra/newview/llwearableitemslist.cpp          | 10 ++++++++--
 indra/newview/skins/default/xui/en/strings.xml |  8 ++++++--
 8 files changed, 64 insertions(+), 23 deletions(-)

(limited to 'indra/newview')

diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp
index 29534a4382..fba2b9d3a4 100755
--- a/indra/newview/llappearancemgr.cpp
+++ b/indra/newview/llappearancemgr.cpp
@@ -2699,7 +2699,12 @@ void LLAppearanceMgr::removeCOFItemLinks(const LLUUID& item_id, LLPointer<LLInve
 		const LLInventoryItem* item = item_array.at(i).get();
 		if (item->getIsLinkType() && item->getLinkedUUID() == item_id)
 		{
-			remove_inventory_item(item->getUUID(), cb);
+			bool immediate_delete = false;
+			if (item->getType() == LLAssetType::AT_OBJECT)
+			{
+				immediate_delete = true;
+			}
+			remove_inventory_item(item->getUUID(), cb, immediate_delete);
 		}
 	}
 }
diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp
index 33e557cddd..1b44049067 100755
--- a/indra/newview/llinventorybridge.cpp
+++ b/indra/newview/llinventorybridge.cpp
@@ -5326,16 +5326,20 @@ std::string LLObjectBridge::getLabelSuffix() const
 		{
 			return LLItemBridge::getLabelSuffix() + LLTrans::getString("worn");
 		}
-		std::string attachment_point_name = gAgentAvatarp->getAttachedPointName(mUUID);
-		if (attachment_point_name == LLStringUtil::null) // Error condition, invalid attach point
+		std::string attachment_point_name;
+		if (gAgentAvatarp->getAttachedPointName(mUUID, attachment_point_name))
 		{
-			attachment_point_name = "Invalid Attachment";
-		}
-		// e.g. "(worn on ...)" / "(attached to ...)"
-		LLStringUtil::format_map_t args;
-		args["[ATTACHMENT_POINT]"] =  LLTrans::getString(attachment_point_name);
+			LLStringUtil::format_map_t args;
+			args["[ATTACHMENT_POINT]"] =  LLTrans::getString(attachment_point_name);
 
-		return LLItemBridge::getLabelSuffix() + LLTrans::getString("WornOnAttachmentPoint", args);
+			return LLItemBridge::getLabelSuffix() + LLTrans::getString("WornOnAttachmentPoint", args);
+		}
+		else
+		{
+			LLStringUtil::format_map_t args;
+			args["[ATTACHMENT_ERROR]"] =  LLTrans::getString(attachment_point_name);
+			return LLItemBridge::getLabelSuffix() + LLTrans::getString("AttachmentErrorMessage", args);
+		}
 	}
 	return LLItemBridge::getLabelSuffix();
 }
diff --git a/indra/newview/llviewerinventory.cpp b/indra/newview/llviewerinventory.cpp
index 4e4c3471be..39267e8834 100755
--- a/indra/newview/llviewerinventory.cpp
+++ b/indra/newview/llviewerinventory.cpp
@@ -1450,7 +1450,8 @@ void update_inventory_category(
 
 void remove_inventory_items(
 	LLInventoryObject::object_list_t& items_to_kill,
-	LLPointer<LLInventoryCallback> cb)
+	LLPointer<LLInventoryCallback> cb
+	)
 {
 	for (LLInventoryObject::object_list_t::iterator it = items_to_kill.begin();
 		 it != items_to_kill.end();
@@ -1462,12 +1463,13 @@ void remove_inventory_items(
 
 void remove_inventory_item(
 	const LLUUID& item_id,
-	LLPointer<LLInventoryCallback> cb)
+	LLPointer<LLInventoryCallback> cb,
+	bool immediate_delete)
 {
 	LLPointer<LLInventoryObject> obj = gInventory.getItem(item_id);
 	if (obj)
 	{
-		remove_inventory_item(obj, cb);
+		remove_inventory_item(obj, cb, immediate_delete);
 	}
 	else
 	{
@@ -1477,7 +1479,8 @@ void remove_inventory_item(
 
 void remove_inventory_item(
 	LLPointer<LLInventoryObject> obj,
-	LLPointer<LLInventoryCallback> cb)
+	LLPointer<LLInventoryCallback> cb,
+	bool immediate_delete)
 {
 	if(obj)
 	{
@@ -1487,6 +1490,11 @@ void remove_inventory_item(
 		{
 			LLPointer<AISCommand> cmd_ptr = new RemoveItemCommand(item_id, cb);
 			cmd_ptr->run_command();
+
+			if (immediate_delete)
+			{
+				gInventory.onObjectDeletedFromServer(item_id);
+			}
 		}
 		else // no cap
 		{
diff --git a/indra/newview/llviewerinventory.h b/indra/newview/llviewerinventory.h
index d345c49cfb..ca92565600 100755
--- a/indra/newview/llviewerinventory.h
+++ b/indra/newview/llviewerinventory.h
@@ -394,11 +394,13 @@ void remove_inventory_items(
 
 void remove_inventory_item(
 	LLPointer<LLInventoryObject> obj,
-	LLPointer<LLInventoryCallback> cb);
+	LLPointer<LLInventoryCallback> cb,
+	bool immediate_delete = false);
 
 void remove_inventory_item(
 	const LLUUID& item_id,
-	LLPointer<LLInventoryCallback> cb);
+	LLPointer<LLInventoryCallback> cb,
+	bool immediate_delete = false);
 	
 void remove_inventory_category(
 	const LLUUID& cat_id,
diff --git a/indra/newview/llvoavatarself.cpp b/indra/newview/llvoavatarself.cpp
index 42a7c2e576..ccc30c448d 100755
--- a/indra/newview/llvoavatarself.cpp
+++ b/indra/newview/llvoavatarself.cpp
@@ -1093,9 +1093,19 @@ LLViewerObject* LLVOAvatarSelf::getWornAttachment(const LLUUID& inv_item_id)
 	return NULL;
 }
 
-const std::string LLVOAvatarSelf::getAttachedPointName(const LLUUID& inv_item_id) const
+bool LLVOAvatarSelf::getAttachedPointName(const LLUUID& inv_item_id, std::string& name) const
 {
+	if (!gInventory.getItem(inv_item_id))
+	{
+		name = "ATTACHMENT_MISSING_ITEM";
+		return false;
+	}
 	const LLUUID& base_inv_item_id = gInventory.getLinkedItemID(inv_item_id);
+	if (!gInventory.getItem(base_inv_item_id))
+	{
+		name = "ATTACHMENT_MISSING_BASE_ITEM";
+		return false;
+	}
 	for (attachment_map_t::const_iterator iter = mAttachmentPoints.begin(); 
 		 iter != mAttachmentPoints.end(); 
 		 ++iter)
@@ -1103,11 +1113,13 @@ const std::string LLVOAvatarSelf::getAttachedPointName(const LLUUID& inv_item_id
 		const LLViewerJointAttachment* attachment = iter->second;
 		if (attachment->getAttachedObject(base_inv_item_id))
 		{
-			return attachment->getName();
+			name = attachment->getName();
+			return true;
 		}
 	}
 
-	return LLStringUtil::null;
+	name = "ATTACHMENT_NOT_ATTACHED";
+	return false;
 }
 
 //virtual
diff --git a/indra/newview/llvoavatarself.h b/indra/newview/llvoavatarself.h
index e03de9fa0b..369c15d0f9 100755
--- a/indra/newview/llvoavatarself.h
+++ b/indra/newview/llvoavatarself.h
@@ -293,7 +293,7 @@ public:
 	void				addAttachmentRequest(const LLUUID& inv_item_id);
 	void				removeAttachmentRequest(const LLUUID& inv_item_id);
 	LLViewerObject* 	getWornAttachment(const LLUUID& inv_item_id);
-	const std::string   getAttachedPointName(const LLUUID& inv_item_id) const;
+	bool				getAttachedPointName(const LLUUID& inv_item_id, std::string& name) const;
 	/*virtual*/ const LLViewerJointAttachment *attachObject(LLViewerObject *viewer_object);
 	/*virtual*/ BOOL 	detachObject(LLViewerObject *viewer_object);
 	static BOOL			detachAttachmentIntoInventory(const LLUUID& item_id);
diff --git a/indra/newview/llwearableitemslist.cpp b/indra/newview/llwearableitemslist.cpp
index ca60b79f9d..fac0fd63ee 100755
--- a/indra/newview/llwearableitemslist.cpp
+++ b/indra/newview/llwearableitemslist.cpp
@@ -364,8 +364,14 @@ void LLPanelAttachmentListItem::updateItem(const std::string& name,
 	LLViewerInventoryItem* inv_item = getItem();
 	if (inv_item && isAgentAvatarValid() && gAgentAvatarp->isWearingAttachment(inv_item->getLinkedUUID()))
 	{
-		std::string joint = LLTrans::getString(gAgentAvatarp->getAttachedPointName(inv_item->getLinkedUUID()));
-		title_joint =  title_joint + " (" + joint + ")";
+		std::string found_name;
+		bool found = gAgentAvatarp->getAttachedPointName(inv_item->getLinkedUUID(),found_name);
+		std::string trans_name = LLTrans::getString(found_name);
+		if (!found)
+		{
+			LL_WARNS() << "invalid attachment joint, err " << found_name << LL_ENDL;
+		}
+		title_joint =  title_joint + " (" + trans_name + ")";
 	}
 
 	LLPanelInventoryListItemBase::updateItem(title_joint, item_state);
diff --git a/indra/newview/skins/default/xui/en/strings.xml b/indra/newview/skins/default/xui/en/strings.xml
index 5dcb8e2cdf..945a77c071 100755
--- a/indra/newview/skins/default/xui/en/strings.xml
+++ b/indra/newview/skins/default/xui/en/strings.xml
@@ -2307,6 +2307,7 @@ The [[MARKETPLACE_CREATE_STORE_URL] Marketplace store] is returning errors.
 	<string name="LoadingContents">Loading contents...</string>
 	<string name="NoContents">No contents</string>
 	<string name="WornOnAttachmentPoint" value=" (worn on [ATTACHMENT_POINT])" />
+	<string name="AttachmentErrorMessage" value=" ([ATTACHMENT_ERROR])" />
 	<string name="ActiveGesture" value="[GESLABEL] (active)"/>
 	<!-- Inventory permissions -->
 	<string name="PermYes">Yes</string>
@@ -2433,9 +2434,12 @@ The [[MARKETPLACE_CREATE_STORE_URL] Marketplace store] is returning errors.
 	<string name="Stomach">Stomach</string>
 	<string name="Left Pec">Left Pec</string>
 	<string name="Right Pec">Right Pec</string>
-    <string name="Neck">Neck</string>
-    <string name="Avatar Center">Avatar Center</string>
+        <string name="Neck">Neck</string>
+        <string name="Avatar Center">Avatar Center</string>
 	<string name="Invalid Attachment">Invalid Attachment Point</string>
+	<string name="ATTACHMENT_MISSING_ITEM">Error: missing item</string>
+	<string name="ATTACHMENT_MISSING_BASE_ITEM">Error: missing base item</string>
+	<string name="ATTACHMENT_NOT_ATTACHED">Error: object is in current outfit but not attached</string>
 
   <!-- Avatar age computation, see LLDateUtil::ageFromDate -->
   <string name="YearsMonthsOld">[AGEYEARS] [AGEMONTHS] old</string>
-- 
cgit v1.2.3


From aa96b808981d9453c49d749308a98173ce1864bb Mon Sep 17 00:00:00 2001
From: "Brad Payne (Vir Linden)" <vir@lindenlab.com>
Date: Fri, 15 Aug 2014 10:38:46 -0400
Subject: MAINT-4158 WIP - fix for at least some forms of distortion. I can't
 repro the drastic height changes, so not positive it addresses that.

---
 indra/newview/llvoavatar.cpp | 9 +++++++++
 1 file changed, 9 insertions(+)

(limited to 'indra/newview')

diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp
index 22b979aa09..6987f69b7e 100755
--- a/indra/newview/llvoavatar.cpp
+++ b/indra/newview/llvoavatar.cpp
@@ -7676,6 +7676,15 @@ void LLVOAvatar::dumpArchetypeXML(const std::string& prefix, bool group_by_weara
 		}
 
 	}
+	avatar_joint_list_t::iterator iter = mSkeleton.begin();
+	avatar_joint_list_t::iterator end  = mSkeleton.end();
+	for (; iter != end; ++iter)
+	{
+		LLJoint* pJoint = (*iter);
+		const LLVector3& pos = pJoint->getPosition();
+		apr_file_printf( file, "\t\t<joint name=\"%s\" position=\"%f %f %f\"/>\n", pJoint->getName().c_str(), pos[0], pos[1], pos[2]);
+	}
+
 	apr_file_printf( file, "\t</archetype>\n" );
 	apr_file_printf( file, "\n</linden_genepool>\n" );
 
-- 
cgit v1.2.3


From 1fa233e35e25cdf98b604caa88fb4b8ef9727383 Mon Sep 17 00:00:00 2001
From: "Brad Payne (Vir Linden)" <vir@lindenlab.com>
Date: Fri, 15 Aug 2014 15:50:51 -0400
Subject: more joint info in ArchetypeXML dump file

---
 indra/newview/llvoavatar.cpp | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

(limited to 'indra/newview')

diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp
index c548a65fe7..509de74ac3 100755
--- a/indra/newview/llvoavatar.cpp
+++ b/indra/newview/llvoavatar.cpp
@@ -7682,7 +7682,9 @@ void LLVOAvatar::dumpArchetypeXML(const std::string& prefix, bool group_by_weara
 	{
 		LLJoint* pJoint = (*iter);
 		const LLVector3& pos = pJoint->getPosition();
-		apr_file_printf( file, "\t\t<joint name=\"%s\" position=\"%f %f %f\"/>\n", pJoint->getName().c_str(), pos[0], pos[1], pos[2]);
+		const LLVector3& scale = pJoint->getScale();
+		apr_file_printf( file, "\t\t<joint name=\"%s\" position=\"%f %f %f\" scale=\"%f %f %f\"/>\n", 
+						 pJoint->getName().c_str(), pos[0], pos[1], pos[2], scale[0], scale[1], scale[2]);
 	}
 
 	apr_file_printf( file, "\t</archetype>\n" );
-- 
cgit v1.2.3


From ba95b8badea1fe97546a050d9fa2ccffe3983a1e Mon Sep 17 00:00:00 2001
From: "Brad Payne (Vir Linden)" <vir@lindenlab.com>
Date: Fri, 15 Aug 2014 15:50:51 -0400
Subject: more joint info in ArchetypeXML dump file

---
 indra/newview/llvoavatar.cpp | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

(limited to 'indra/newview')

diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp
index 6987f69b7e..c32a44b779 100755
--- a/indra/newview/llvoavatar.cpp
+++ b/indra/newview/llvoavatar.cpp
@@ -7682,7 +7682,9 @@ void LLVOAvatar::dumpArchetypeXML(const std::string& prefix, bool group_by_weara
 	{
 		LLJoint* pJoint = (*iter);
 		const LLVector3& pos = pJoint->getPosition();
-		apr_file_printf( file, "\t\t<joint name=\"%s\" position=\"%f %f %f\"/>\n", pJoint->getName().c_str(), pos[0], pos[1], pos[2]);
+		const LLVector3& scale = pJoint->getScale();
+		apr_file_printf( file, "\t\t<joint name=\"%s\" position=\"%f %f %f\" scale=\"%f %f %f\"/>\n", 
+						 pJoint->getName().c_str(), pos[0], pos[1], pos[2], scale[0], scale[1], scale[2]);
 	}
 
 	apr_file_printf( file, "\t</archetype>\n" );
-- 
cgit v1.2.3


From 7060527bbc9a7a76cbc3b4b9bb772cb90542fd60 Mon Sep 17 00:00:00 2001
From: Aura Linden <aura@lindenlab.com>
Date: Fri, 15 Aug 2014 17:30:09 -0700
Subject: Added delay to Windows shutdown to let SLVoice die a good death.

---
 indra/newview/app_settings/settings.xml |  4 ++--
 indra/newview/llappviewer.cpp           |  2 +-
 indra/newview/llvoicevivox.cpp          | 13 ++++++-------
 3 files changed, 9 insertions(+), 10 deletions(-)

(limited to 'indra/newview')

diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml
index 757539ee74..fa348e0bcd 100755
--- a/indra/newview/app_settings/settings.xml
+++ b/indra/newview/app_settings/settings.xml
@@ -13501,7 +13501,7 @@
     <key>VivoxDebugLevel</key>
     <map>
       <key>Comment</key>
-      <string>Logging level to use when launching the vivox daemon SPATTERS FIX VALUE BEFORE CHECKIN</string>
+      <string>Logging level to use when launching the vivox daemon</string>
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
@@ -13518,7 +13518,7 @@
       <key>Type</key>
       <string>String</string>
       <key>Value</key>
-      <string>500</string>
+      <string>5</string>
     </map>
     <key>VivoxDebugSIPURIHostName</key>
     <map>
diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp
index 29b883aef1..bf1a0a4173 100755
--- a/indra/newview/llappviewer.cpp
+++ b/indra/newview/llappviewer.cpp
@@ -4897,7 +4897,7 @@ void LLAppViewer::idle()
 	// hover callbacks
 	//
     
-#ifdef LL_DARWIN   SPATTERS may want to make this mac-only.  Test on Windows.
+#ifdef LL_DARWIN   
 	if (mQuitRequested)  //MAINT-4243
 #endif
 	{
diff --git a/indra/newview/llvoicevivox.cpp b/indra/newview/llvoicevivox.cpp
index 48d458b142..2bee176b8d 100755
--- a/indra/newview/llvoicevivox.cpp
+++ b/indra/newview/llvoicevivox.cpp
@@ -798,12 +798,9 @@ void LLVivoxVoiceClient::stateMachine()
 						params.args.add("-ll");
 						params.args.add(loglevel);
 
-						//if (loglevel != "0") //SPATTERS
-						{
-							std::string log_folder = gDirUtilp->getExpandedFilename(LL_PATH_LOGS, "");
-							params.args.add("-lf");
-							params.args.add(log_folder);
-						}
+						std::string log_folder = gDirUtilp->getExpandedFilename(LL_PATH_LOGS, "");
+						params.args.add("-lf");
+						params.args.add(log_folder);
 
 						if(!shutdown_timeout.empty())
 						{
@@ -1542,7 +1539,6 @@ void LLVivoxVoiceClient::stateMachine()
 		//MARK: stateLoggingOut
 		case stateLoggingOut:			// waiting for logout response
 			// The handler for the AccountLoginStateChangeEvent will transition from here to stateLoggedOut.
-			LL_INFOS() << "SPATTERS do I need to stay alive here?" << LL_ENDL;
 		break;
 		
 		//MARK: stateLoggedOut
@@ -1646,6 +1642,9 @@ void LLVivoxVoiceClient::stateMachine()
 
 void LLVivoxVoiceClient::closeSocket(void)
 {
+#ifdef LL_WINDOWS
+	_sleep(3000);	//Wait a moment for socket to close.  SPATTERS
+#endif  
 	mSocket.reset();
 	mConnected = false;
 	mConnectorHandle.clear();
-- 
cgit v1.2.3


From 370aa671c66cfd5e2a338602d2e9765e9ea103f8 Mon Sep 17 00:00:00 2001
From: Aura Linden <aura@lindenlab.com>
Date: Fri, 15 Aug 2014 18:49:54 -0700
Subject: Allegedly hides voice position on teleport.  Needs testing.

---
 indra/newview/llagent.cpp       |  8 ++++++++
 indra/newview/llappviewer.cpp   |  4 ++--
 indra/newview/llvoiceclient.cpp |  7 +++++++
 indra/newview/llvoiceclient.h   |  3 +++
 indra/newview/llvoicevivox.cpp  | 27 +++++++++++++++++++++++++--
 indra/newview/llvoicevivox.h    |  2 +-
 6 files changed, 46 insertions(+), 5 deletions(-)

(limited to 'indra/newview')

diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp
index bd6025feea..059f21e91e 100755
--- a/indra/newview/llagent.cpp
+++ b/indra/newview/llagent.cpp
@@ -3802,6 +3802,10 @@ void LLAgent::restartFailedTeleportRequest()
 
 void LLAgent::clearTeleportRequest()
 {
+    if(LLVoiceClient::instanceExists())
+    {
+        LLVoiceClient::getInstance()->setHidden(FALSE);
+    }
 	mTeleportRequest.reset();
 }
 
@@ -3820,6 +3824,10 @@ bool LLAgent::hasPendingTeleportRequest()
 
 void LLAgent::startTeleportRequest()
 {
+    if(LLVoiceClient::instanceExists())
+    {
+        LLVoiceClient::getInstance()->setHidden(TRUE);
+    }
 	if (hasPendingTeleportRequest())
 	{
 		if  (!isMaturityPreferenceSyncedWithServer())
diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp
index 29b883aef1..9cc21ad22e 100755
--- a/indra/newview/llappviewer.cpp
+++ b/indra/newview/llappviewer.cpp
@@ -4897,8 +4897,8 @@ void LLAppViewer::idle()
 	// hover callbacks
 	//
     
-#ifdef LL_DARWIN   SPATTERS may want to make this mac-only.  Test on Windows.
-	if (mQuitRequested)  //MAINT-4243
+#ifdef LL_DARWIN   //SPATTERS may want to make this mac-only.  Test on Windows.
+	if (!mQuitRequested)  //MAINT-4243
 #endif
 	{
 // 		LL_RECORD_BLOCK_TIME(FTM_IDLE_CB);
diff --git a/indra/newview/llvoiceclient.cpp b/indra/newview/llvoiceclient.cpp
index 815965fb0a..2d195be0eb 100755
--- a/indra/newview/llvoiceclient.cpp
+++ b/indra/newview/llvoiceclient.cpp
@@ -160,6 +160,13 @@ void LLVoiceClient::userAuthorized(const std::string& user_id, const LLUUID &age
 	mVoiceModule->userAuthorized(user_id, agentID);
 }
 
+void LLVoiceClient::setHidden(bool hidden)
+{
+    if (mVoiceModule)
+    {
+        mVoiceModule->setHidden(hidden);
+    }
+}
 
 void LLVoiceClient::terminate()
 {
diff --git a/indra/newview/llvoiceclient.h b/indra/newview/llvoiceclient.h
index 1e20a814a0..fb387301be 100755
--- a/indra/newview/llvoiceclient.h
+++ b/indra/newview/llvoiceclient.h
@@ -105,6 +105,8 @@ public:
 	virtual void updateSettings()=0; // call after loading settings and whenever they change
 	
 	virtual bool isVoiceWorking() const = 0; // connected to a voice server and voice channel
+    
+    virtual void setHidden(bool hidden)=0;  //  Hides the user from voice.
 
 	virtual const LLVoiceVersionInfo& getVersion()=0;
 	
@@ -342,6 +344,7 @@ public:
 
 	void setCaptureDevice(const std::string& name);
 	void setRenderDevice(const std::string& name);
+    void setHidden(bool hidden);
 
 	const LLVoiceDeviceList& getCaptureDevices();
 	const LLVoiceDeviceList& getRenderDevices();
diff --git a/indra/newview/llvoicevivox.cpp b/indra/newview/llvoicevivox.cpp
index 48d458b142..1eb0ac6ae0 100755
--- a/indra/newview/llvoicevivox.cpp
+++ b/indra/newview/llvoicevivox.cpp
@@ -70,6 +70,7 @@
 #include "apr_base64.h"
 
 #define USE_SESSION_GROUPS 0
+#define VX_NULL_POSITION -2147483648.0 /*The Silence*/
 
 extern LLMenuBarGL* gMenuBarView;
 extern void handle_voice_morphing_subscribe();
@@ -2334,7 +2335,9 @@ static void oldSDKTransform (LLVector3 &left, LLVector3 &up, LLVector3 &at, LLVe
 
 void LLVivoxVoiceClient::setHidden(bool hidden)
 {
+    //SPATTERS hide me
     mHidden = hidden;
+    sendPositionalUpdate();
     return;
 }
 
@@ -2359,7 +2362,17 @@ void LLVivoxVoiceClient::sendPositionalUpdate(void)
 		l = mAvatarRot.getLeftRow();
 		u = mAvatarRot.getUpRow();
 		a = mAvatarRot.getFwdRow();
-		pos = mAvatarPosition;
+        if (mHidden)
+        {
+            for (int i=0;i<3;++i)
+            {
+                pos.mdV[i] = VX_NULL_POSITION;
+            }
+        }
+        else
+        {
+            pos = mAvatarPosition;
+        }
 		vel = mAvatarVelocity;
 
 		// SLIM SDK: the old SDK was doing a transform on the passed coordinates that the new one doesn't do anymore.
@@ -2426,7 +2439,17 @@ void LLVivoxVoiceClient::sendPositionalUpdate(void)
 		l = earRot.getLeftRow();
 		u = earRot.getUpRow();
 		a = earRot.getFwdRow();
-		pos = earPosition;
+        if (mHidden)
+        {
+            for (int i=0;i<3;++i)
+            {
+                pos.mdV[i] = VX_NULL_POSITION;
+            }
+        }
+        else
+        {
+            pos = earPosition;
+        }
 		vel = earVelocity;
 
 //		LL_DEBUGS("Voice") << "Sending listener position " << earPosition << LL_ENDL;
diff --git a/indra/newview/llvoicevivox.h b/indra/newview/llvoicevivox.h
index 8829d9e1b4..10ebac730d 100755
--- a/indra/newview/llvoicevivox.h
+++ b/indra/newview/llvoicevivox.h
@@ -747,7 +747,7 @@ private:
 	std::string getAudioSessionURI();
 	std::string getAudioSessionHandle();
 			
-    void setHidden(bool hidden);
+    void setHidden(bool hidden); //virtual
 	void sendPositionalUpdate(void);
 	
 	void buildSetCaptureDevice(std::ostringstream &stream);
-- 
cgit v1.2.3


From c0457d18fde5ad6c12a470ba607c2c80d94e7cc3 Mon Sep 17 00:00:00 2001
From: andreykproductengine <akleshchev@productengine.com>
Date: Thu, 21 Aug 2014 19:32:16 +0300
Subject: MAINT-4293 FIXED Very slow inventory fetch

---
 indra/newview/llinventoryfilter.cpp | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

(limited to 'indra/newview')

diff --git a/indra/newview/llinventoryfilter.cpp b/indra/newview/llinventoryfilter.cpp
index 370392b2f2..47b14811a8 100755
--- a/indra/newview/llinventoryfilter.cpp
+++ b/indra/newview/llinventoryfilter.cpp
@@ -124,13 +124,6 @@ bool LLInventoryFilter::checkFolder(const LLFolderViewModelItem* item) const
 
 bool LLInventoryFilter::checkFolder(const LLUUID& folder_id) const
 {
-	// when applying a filter, matching folders get their contents downloaded first
-	if (isNotDefault()
-		&& !gInventory.isCategoryComplete(folder_id))
-	{
-		LLInventoryModelBackgroundFetch::instance().start(folder_id);
-	}
-
 	// Always check against the clipboard
 	const BOOL passed_clipboard = checkAgainstClipboard(folder_id);
 	
@@ -140,6 +133,13 @@ bool LLInventoryFilter::checkFolder(const LLUUID& folder_id) const
 		return passed_clipboard;
 	}
 
+	// when applying a filter, matching folders get their contents downloaded first
+	if (mFilterSubString.size()
+		&& !gInventory.isCategoryComplete(folder_id))
+	{
+		LLInventoryModelBackgroundFetch::instance().start(folder_id);
+	}
+
 	// show folder links
 	LLViewerInventoryItem* item = gInventory.getItem(folder_id);
 	if (item && item->getActualType() == LLAssetType::AT_LINK_FOLDER)
-- 
cgit v1.2.3


From 23e2dcce9d2f4290e1f192d4fbcdc26ff4d4c8c3 Mon Sep 17 00:00:00 2001
From: andreykproductengine <akleshchev@productengine.com>
Date: Thu, 21 Aug 2014 20:59:48 +0300
Subject: fixing merge conflicts

---
 indra/newview/llfolderviewmodelinventory.cpp | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

(limited to 'indra/newview')

diff --git a/indra/newview/llfolderviewmodelinventory.cpp b/indra/newview/llfolderviewmodelinventory.cpp
index 7bac47a317..3271a40ea0 100755
--- a/indra/newview/llfolderviewmodelinventory.cpp
+++ b/indra/newview/llfolderviewmodelinventory.cpp
@@ -129,13 +129,18 @@ void LLFolderViewModelItemInventory::requestSort()
 
 void LLFolderViewModelItemInventory::setPassedFilter(bool passed, S32 filter_generation, std::string::size_type string_offset, std::string::size_type string_size)
 {
+	bool generation_skip = mMarkedDirtyGeneration >= 0
+		&& mPrevPassedAllFilters
+		&& mMarkedDirtyGeneration < mRootViewModel.getFilter().getFirstSuccessGeneration();
 	LLFolderViewModelItemCommon::setPassedFilter(passed, filter_generation, string_offset, string_size);
 	bool before = mPrevPassedAllFilters;
 	mPrevPassedAllFilters = passedFilter(filter_generation);
 
-	if (before != mPrevPassedAllFilters)
+	if (before != mPrevPassedAllFilters || generation_skip)
 	{
-		// Need to rearrange the folder if the filtered state of the item changed
+		// Need to rearrange the folder if the filtered state of the item changed,
+		// previously passed item skipped filter generation changes while being dirty
+		// or previously passed not yet filtered item was marked dirty
 		LLFolderViewFolder* parent_folder = mFolderViewItem->getParentFolder();
 		if (parent_folder)
 		{
-- 
cgit v1.2.3


From 892f99af3b51ea08e6e77d5945e6e9ca24d4223d Mon Sep 17 00:00:00 2001
From: "Brad Payne (Vir Linden)" <vir@lindenlab.com>
Date: Thu, 21 Aug 2014 14:18:35 -0400
Subject: MAINT-4158 WIP - fix for bug caused by multiple wearables with the
 same asset id

---
 indra/newview/llagentwearables.cpp | 5 +++++
 indra/newview/llvoavatar.cpp       | 2 +-
 2 files changed, 6 insertions(+), 1 deletion(-)

(limited to 'indra/newview')

diff --git a/indra/newview/llagentwearables.cpp b/indra/newview/llagentwearables.cpp
index 890fc9a8d9..215699dcc9 100755
--- a/indra/newview/llagentwearables.cpp
+++ b/indra/newview/llagentwearables.cpp
@@ -1009,6 +1009,10 @@ void LLAgentWearables::setWearableOutfit(const LLInventoryItem::item_array_t& it
 			continue;
 		}
 
+		// Don't care about this case - ordering of wearables with the same asset id has no effect.
+		// Causes the two-alphas error case in MAINT-4158.
+		// We should actually disallow wearing two wearables with the same asset id.
+#if 0
 		if (curr_wearable->getName() != new_item->getName() ||
 			curr_wearable->getItemID() != new_item->getUUID())
 		{
@@ -1019,6 +1023,7 @@ void LLAgentWearables::setWearableOutfit(const LLInventoryItem::item_array_t& it
 			mismatched++;
 			continue;
 		}
+#endif
 		// If we got here, everything matches.
 		matched++;
 	}
diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp
index 509de74ac3..e5473e92d9 100755
--- a/indra/newview/llvoavatar.cpp
+++ b/indra/newview/llvoavatar.cpp
@@ -5625,7 +5625,7 @@ const LLViewerJointAttachment *LLVOAvatar::attachObject(LLViewerObject *viewer_o
 }
 
 //-----------------------------------------------------------------------------
-// attachObject()
+// getNumAttachments()
 //-----------------------------------------------------------------------------
 U32 LLVOAvatar::getNumAttachments() const
 {
-- 
cgit v1.2.3


From e7266a31d8c8b8191ea265069f65a4279f7cc188 Mon Sep 17 00:00:00 2001
From: Maestro Linden <maestro@lindenlab.com>
Date: Mon, 25 Aug 2014 22:14:12 +0000
Subject: Please restore 'Region Debug Console' to viewer menu, under Develop
 -> Consoles Added the region debug console menu item to Develop->Consoles. 
 Reviewed by Simon.

---
 indra/newview/skins/default/xui/en/menu_viewer.xml | 12 ++++++++++++
 1 file changed, 12 insertions(+)

(limited to 'indra/newview')

diff --git a/indra/newview/skins/default/xui/en/menu_viewer.xml b/indra/newview/skins/default/xui/en/menu_viewer.xml
index de441983d0..560f81a6fd 100755
--- a/indra/newview/skins/default/xui/en/menu_viewer.xml
+++ b/indra/newview/skins/default/xui/en/menu_viewer.xml
@@ -2104,6 +2104,18 @@
                function="Floater.Toggle"
                parameter="notifications_console" />
             </menu_item_call>
+            <menu_item_check
+             label="Region Debug Console"
+             name="Region Debug Console"
+             shortcut="control|shift|`"
+             use_mac_ctrl="true">
+                <menu_item_check.on_check
+                 function="Floater.Visible"
+                 parameter="region_debug_console" />
+                <menu_item_check.on_click
+                 function="Floater.Toggle"
+                 parameter="region_debug_console" />
+            </menu_item_check>
             <menu_item_check
              label="Fast Timers"
              name="Fast Timers"
-- 
cgit v1.2.3


From e8adc1d008fbe704798f3b5820fca38ba9abeb48 Mon Sep 17 00:00:00 2001
From: Mnikolenko ProductEngine <mnikolenko@productengine.com>
Date: Tue, 26 Aug 2014 11:53:57 +0300
Subject: MAINT-4322 FIXED Re-assert DND tag animation if it was cancelled by
 script, when DND mode is still active

---
 indra/newview/llagent.cpp    | 4 ++--
 indra/newview/llvoavatar.cpp | 6 ++++++
 2 files changed, 8 insertions(+), 2 deletions(-)

(limited to 'indra/newview')

diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp
index e5a90e8a28..ef1d528aa2 100755
--- a/indra/newview/llagent.cpp
+++ b/indra/newview/llagent.cpp
@@ -4116,8 +4116,8 @@ void LLAgent::stopCurrentAnimations()
 		      anim_it != gAgentAvatarp->mPlayingAnimations.end();
 		      anim_it++)
 		{
-			if (anim_it->first ==
-			    ANIM_AGENT_SIT_GROUND_CONSTRAINED)
+			if ((anim_it->first == ANIM_AGENT_DO_NOT_DISTURB)||
+				(anim_it->first == ANIM_AGENT_SIT_GROUND_CONSTRAINED))
 			{
 				// don't cancel a ground-sit anim, as viewers
 				// use this animation's status in
diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp
index 22b979aa09..d6c03b6888 100755
--- a/indra/newview/llvoavatar.cpp
+++ b/indra/newview/llvoavatar.cpp
@@ -4884,6 +4884,12 @@ BOOL LLVOAvatar::processSingleAnimationStateChange( const LLUUID& anim_id, BOOL
 		{
 			sitDown(FALSE);
 		}
+		if ((anim_id == ANIM_AGENT_DO_NOT_DISTURB) && gAgent.isDoNotDisturb())
+		{
+			// re-assert DND tag animation
+			gAgent.sendAnimationRequest(ANIM_AGENT_DO_NOT_DISTURB, ANIM_REQUEST_START);
+			return result;
+		}
 		stopMotion(anim_id);
 		result = TRUE;
 	}
-- 
cgit v1.2.3


From 94f945c2c65fcd791bf86c58168fd457837e2acd Mon Sep 17 00:00:00 2001
From: "Brad Payne (Vir Linden)" <vir@lindenlab.com>
Date: Wed, 27 Aug 2014 16:52:52 -0400
Subject: WIP on attachment offset management in joints

---
 indra/newview/llfloatermodelpreview.cpp |  3 ++-
 indra/newview/llviewerobject.cpp        | 11 +++++++++++
 indra/newview/llviewerobject.h          |  2 ++
 indra/newview/llvoavatar.cpp            | 14 +++++++-------
 indra/newview/llvoavatar.h              |  2 +-
 indra/newview/llvovolume.cpp            |  4 +++-
 6 files changed, 26 insertions(+), 10 deletions(-)

(limited to 'indra/newview')

diff --git a/indra/newview/llfloatermodelpreview.cpp b/indra/newview/llfloatermodelpreview.cpp
index b17ce97a2e..039ff848cb 100755
--- a/indra/newview/llfloatermodelpreview.cpp
+++ b/indra/newview/llfloatermodelpreview.cpp
@@ -1935,7 +1935,8 @@ bool LLModelLoader::doLoadModel()
 										LLJoint* pJoint = mPreview->getPreviewAvatar()->getJoint( lookingForJoint );
 										if ( pJoint )
 										{   
-											pJoint->storeCurrentXform( jointTransform.getTranslation() );												
+											LL_WARNS() << "Aieee, now what!" << LL_ENDL;
+											//pJoint->storeCurrentXform( jointTransform.getTranslation() );												
 										}
 										else
 										{
diff --git a/indra/newview/llviewerobject.cpp b/indra/newview/llviewerobject.cpp
index 80592f01ce..2d42c68357 100755
--- a/indra/newview/llviewerobject.cpp
+++ b/indra/newview/llviewerobject.cpp
@@ -6190,6 +6190,17 @@ const LLUUID &LLViewerObject::extractAttachmentItemID()
 	return getAttachmentItemID();
 }
 
+const std::string& LLViewerObject::getAttachmentItemName()
+{
+	static std::string empty;
+	LLInventoryItem *item = gInventory.getItem(getAttachmentItemID());
+	if (isAttachment() && item)
+	{
+		return item->getName();
+	}
+	return empty;
+}
+
 //virtual
 LLVOAvatar* LLViewerObject::getAvatar() const
 {
diff --git a/indra/newview/llviewerobject.h b/indra/newview/llviewerobject.h
index bab107cc57..22ac4ce0db 100755
--- a/indra/newview/llviewerobject.h
+++ b/indra/newview/llviewerobject.h
@@ -170,6 +170,8 @@ public:
 	void			setOnActiveList(BOOL on_active)		{ mOnActiveList = on_active; }
 
 	virtual BOOL	isAttachment() const { return FALSE; }
+	const std::string& getAttachmentItemName();
+
 	virtual LLVOAvatar* getAvatar() const;  //get the avatar this object is attached to, or NULL if object is not an attachment
 	virtual BOOL	isHUDAttachment() const { return FALSE; }
 	virtual BOOL	isTempAttachment() const;
diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp
index e5473e92d9..fea1c0f521 100755
--- a/indra/newview/llvoavatar.cpp
+++ b/indra/newview/llvoavatar.cpp
@@ -5058,9 +5058,9 @@ LLJoint *LLVOAvatar::getJoint( const std::string &name )
 	return jointp;
 }
 //-----------------------------------------------------------------------------
-// resetJointPositionsToDefault
+// resetJointPositionsOnDetach
 //-----------------------------------------------------------------------------
-void LLVOAvatar::resetJointPositionsToDefault( void )
+void LLVOAvatar::resetJointPositionsOnDetach(const std::string& attachment_name)
 {	
 	//Subsequent joints are relative to pelvis
 	avatar_joint_list_t::iterator iter = mSkeleton.begin();
@@ -5072,17 +5072,16 @@ void LLVOAvatar::resetJointPositionsToDefault( void )
 	{
 		LLJoint* pJoint = (*iter);
 		//Reset joints except for pelvis
-		if ( pJoint && pJoint != pJointPelvis && pJoint->doesJointNeedToBeReset() )
+		if ( pJoint && pJoint != pJointPelvis)
 		{			
 			pJoint->setId( LLUUID::null );
-			pJoint->restoreOldXform();
+			pJoint->removeAttachmentPosOverride(attachment_name);
 		}		
 		else
-		if ( pJoint && pJoint == pJointPelvis && pJoint->doesJointNeedToBeReset() )
+		if ( pJoint && pJoint == pJointPelvis)
 		{
 			pJoint->setId( LLUUID::null );
 			pJoint->setPosition( LLVector3( 0.0f, 0.0f, 0.0f) );
-			pJoint->setJointResetFlag( false );
 		}		
 	}	
 		
@@ -5746,7 +5745,8 @@ void LLVOAvatar::cleanupAttachedMesh( LLViewerObject* pVO )
 				&& pSkinData->mJointNames.size() > JOINT_COUNT_REQUIRED_FOR_FULLRIG	// full rig
 				&& pSkinData->mAlternateBindMatrix.size() > 0 )
 					{				
-						LLVOAvatar::resetJointPositionsToDefault();							
+						const std::string& attachment_name = pVO->getAttachmentItemName();
+						LLVOAvatar::resetJointPositionsOnDetach(attachment_name);							
 						//Need to handle the repositioning of the cam, updating rig data etc during outfit editing 
 						//This handles the case where we detach a replacement rig.
 						if ( gAgentCamera.cameraCustomizeAvatar() )
diff --git a/indra/newview/llvoavatar.h b/indra/newview/llvoavatar.h
index 42ff7bff92..66a357ff62 100755
--- a/indra/newview/llvoavatar.h
+++ b/indra/newview/llvoavatar.h
@@ -199,7 +199,7 @@ public:
 
 	virtual LLJoint*		getJoint(const std::string &name);
 	
-	void					resetJointPositionsToDefault( void );
+	void					resetJointPositionsOnDetach(const std::string& attachment_name);
 	
 	/*virtual*/ const LLUUID&	getID() const;
 	/*virtual*/ void			addDebugText(const std::string& text);
diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp
index a83e2e020e..0ef48c4c70 100755
--- a/indra/newview/llvovolume.cpp
+++ b/indra/newview/llvovolume.cpp
@@ -4626,7 +4626,9 @@ void LLVolumeGeometryManager::rebuildGeom(LLSpatialGroup* group)
 											const LLVector3& jointPos = pSkinData->mAlternateBindMatrix[i].getTranslation();									
 											
 											//Set the joint position
-											pJoint->storeCurrentXform( jointPos );					
+											const std::string& attachment_name = drawablep->getVObj()->getAttachmentItemName();
+											//pJoint->storeCurrentXform( jointPos );					
+											pJoint->addAttachmentPosOverride( jointPos, attachment_name );
 									
 											//If joint is a pelvis then handle old/new pelvis to foot values
 											if ( lookingForJoint == "mPelvis" )
-- 
cgit v1.2.3


From 3656d80cf873a8e2852b262d6b5ed88608fdc49b Mon Sep 17 00:00:00 2001
From: Mnikolenko ProductEngine <mnikolenko@productengine.com>
Date: Fri, 29 Aug 2014 12:00:11 +0300
Subject: MAINT-4239 FIXED Buttons are added to Object contents floater

---
 indra/newview/llfloateropenobject.cpp              | 23 +++++++++--
 indra/newview/llfloateropenobject.h                |  7 +++-
 indra/newview/llinventorybridge.cpp                | 10 +++--
 .../skins/default/xui/en/floater_openobject.xml    | 47 +++++++++++++++++-----
 4 files changed, 67 insertions(+), 20 deletions(-)

(limited to 'indra/newview')

diff --git a/indra/newview/llfloateropenobject.cpp b/indra/newview/llfloateropenobject.cpp
index 9986bdbd7f..ef746d308d 100755
--- a/indra/newview/llfloateropenobject.cpp
+++ b/indra/newview/llfloateropenobject.cpp
@@ -58,6 +58,8 @@ LLFloaterOpenObject::LLFloaterOpenObject(const LLSD& key)
 {
 	mCommitCallbackRegistrar.add("OpenObject.MoveToInventory",	boost::bind(&LLFloaterOpenObject::onClickMoveToInventory, this));
 	mCommitCallbackRegistrar.add("OpenObject.MoveAndWear",		boost::bind(&LLFloaterOpenObject::onClickMoveAndWear, this));
+	mCommitCallbackRegistrar.add("OpenObject.ReplaceOutfit",	boost::bind(&LLFloaterOpenObject::onClickReplace, this));
+	mCommitCallbackRegistrar.add("OpenObject.Cancel",			boost::bind(&LLFloaterOpenObject::onClickCancel, this));
 }
 
 LLFloaterOpenObject::~LLFloaterOpenObject()
@@ -115,6 +117,7 @@ void LLFloaterOpenObject::refresh()
 	getChild<LLUICtrl>("object_name")->setTextArg("[DESC]", name);
 	getChildView("copy_to_inventory_button")->setEnabled(enabled);
 	getChildView("copy_and_wear_button")->setEnabled(enabled);
+	getChildView("copy_and_replace_button")->setEnabled(enabled);
 
 }
 
@@ -135,7 +138,7 @@ void LLFloaterOpenObject::dirty()
 
 
 
-void LLFloaterOpenObject::moveToInventory(bool wear)
+void LLFloaterOpenObject::moveToInventory(bool wear, bool replace)
 {
 	if (mObjectSelection->getRootObjectCount() != 1)
 	{
@@ -163,7 +166,7 @@ void LLFloaterOpenObject::moveToInventory(bool wear)
 		parent_category_id = gInventory.getRootFolderID();
 	}
 
-	inventory_func_type func = boost::bind(LLFloaterOpenObject::callbackCreateInventoryCategory,_1,object_id,wear);
+	inventory_func_type func = boost::bind(LLFloaterOpenObject::callbackCreateInventoryCategory,_1,object_id,wear,replace);
 	LLUUID category_id = gInventory.createNewCategory(parent_category_id, 
 													  LLFolderType::FT_NONE, 
 													  name,
@@ -177,6 +180,7 @@ void LLFloaterOpenObject::moveToInventory(bool wear)
 		data->mCatID = category_id;
 		data->mWear = wear;
 		data->mFolderResponded = false;
+		data->mReplace = replace;
 
 		// Copy and/or move the items into the newly created folder.
 		// Ignore any "you're going to break this item" messages.
@@ -194,13 +198,14 @@ void LLFloaterOpenObject::moveToInventory(bool wear)
 }
 
 // static
-void LLFloaterOpenObject::callbackCreateInventoryCategory(const LLUUID& category_id, LLUUID object_id, bool wear)
+void LLFloaterOpenObject::callbackCreateInventoryCategory(const LLUUID& category_id, LLUUID object_id, bool wear, bool replace)
 {
 	LLCatAndWear* wear_data = new LLCatAndWear;
 
 	wear_data->mCatID = category_id;
 	wear_data->mWear = wear;
 	wear_data->mFolderResponded = true;
+	wear_data->mReplace = replace;
 	
 	// Copy and/or move the items into the newly created folder.
 	// Ignore any "you're going to break this item" messages.
@@ -241,7 +246,17 @@ void LLFloaterOpenObject::onClickMoveToInventory()
 
 void LLFloaterOpenObject::onClickMoveAndWear()
 {
-	moveToInventory(true);
+	moveToInventory(true, false);
 	closeFloater();
 }
 
+void LLFloaterOpenObject::onClickReplace()
+{
+	moveToInventory(true, true);
+	closeFloater();
+}
+
+void LLFloaterOpenObject::onClickCancel()
+{
+	closeFloater();
+}
diff --git a/indra/newview/llfloateropenobject.h b/indra/newview/llfloateropenobject.h
index 8e472804a4..2e761f99bf 100755
--- a/indra/newview/llfloateropenobject.h
+++ b/indra/newview/llfloateropenobject.h
@@ -50,6 +50,7 @@ public:
 		LLUUID mCatID;
 		bool mWear;
 		bool mFolderResponded;
+		bool mReplace;
 	};
 
 protected:
@@ -59,11 +60,13 @@ protected:
 	void draw();
 	virtual void onOpen(const LLSD& key);
 
-	void moveToInventory(bool wear);
+	void moveToInventory(bool wear, bool replace = false);
 
 	void onClickMoveToInventory();
 	void onClickMoveAndWear();
-	static void callbackCreateInventoryCategory(const LLUUID& category_id, LLUUID object_id, bool wear);
+	void onClickReplace();
+	void onClickCancel();
+	static void callbackCreateInventoryCategory(const LLUUID& category_id, LLUUID object_id, bool wear, bool replace = false);
 	static void callbackMoveInventory(S32 result, void* data);
 
 private:
diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp
index d6f2803fc2..085986dc68 100755
--- a/indra/newview/llinventorybridge.cpp
+++ b/indra/newview/llinventorybridge.cpp
@@ -2787,8 +2787,8 @@ void LLRightClickInventoryFetchDescendentsObserver::execute(bool clear_observer)
 class LLInventoryCopyAndWearObserver : public LLInventoryObserver
 {
 public:
-	LLInventoryCopyAndWearObserver(const LLUUID& cat_id, int count, bool folder_added=false) :
-		mCatID(cat_id), mContentsCount(count), mFolderAdded(folder_added) {}
+	LLInventoryCopyAndWearObserver(const LLUUID& cat_id, int count, bool folder_added=false, bool replace=false) :
+		mCatID(cat_id), mContentsCount(count), mFolderAdded(folder_added), mReplace(replace){}
 	virtual ~LLInventoryCopyAndWearObserver() {}
 	virtual void changed(U32 mask);
 
@@ -2796,6 +2796,7 @@ protected:
 	LLUUID mCatID;
 	int    mContentsCount;
 	bool   mFolderAdded;
+	bool   mReplace;
 };
 
 
@@ -2834,7 +2835,7 @@ void LLInventoryCopyAndWearObserver::changed(U32 mask)
 				    mContentsCount)
 				{
 					gInventory.removeObserver(this);
-					LLAppearanceMgr::instance().wearInventoryCategory(category, FALSE, TRUE);
+					LLAppearanceMgr::instance().wearInventoryCategory(category, FALSE, !mReplace);
 					delete this;
 				}
 			}
@@ -3815,7 +3816,8 @@ bool move_task_inventory_callback(const LLSD& notification, const LLSD& response
 			LLInventoryObject::object_list_t inventory_objects;
 			object->getInventoryContents(inventory_objects);
 			int contents_count = inventory_objects.size()-1; //subtract one for containing folder
-			LLInventoryCopyAndWearObserver* inventoryObserver = new LLInventoryCopyAndWearObserver(cat_and_wear->mCatID, contents_count, cat_and_wear->mFolderResponded);
+			LLInventoryCopyAndWearObserver* inventoryObserver = new LLInventoryCopyAndWearObserver(cat_and_wear->mCatID, contents_count, cat_and_wear->mFolderResponded,
+																									cat_and_wear->mReplace);
 			
 			gInventory.addObserver(inventoryObserver);
 		}
diff --git a/indra/newview/skins/default/xui/en/floater_openobject.xml b/indra/newview/skins/default/xui/en/floater_openobject.xml
index bf6e0c4917..a130439baa 100755
--- a/indra/newview/skins/default/xui/en/floater_openobject.xml
+++ b/indra/newview/skins/default/xui/en/floater_openobject.xml
@@ -6,7 +6,7 @@
  height="350"
  layout="topleft"
  min_height="160"
- min_width="280"
+ min_width="285"
  name="objectcontents"
  help_topic="objectcontents"
  save_rect="true"
@@ -31,36 +31,63 @@
      background_visible="false"
      draw_border="false"
      follows="all"
-     height="276"
+     height="250"
      layout="topleft"
      left="10"
      name="object_contents"
      top_pad="0"
      width="284" />
+     
+ 	<button
+     follows="bottom|left"
+     height="23"
+     label="Copy and add to outfit"
+     label_selected="Copy and add to outfit"
+     layout="topleft"
+ 	 left="15"    
+     name="copy_and_wear_button"
+ 	 top_pad="5"	
+     width="135">
+        <button.commit_callback
+         function="OpenObject.MoveAndWear" />
+    </button>
+	<button
+     follows="bottom|left"
+     height="23"
+     label="Replace outfit"
+     label_selected="Replace outfit"
+     layout="topleft"
+     left_pad="5"
+     name="copy_and_replace_button"
+     width="120">
+        <button.commit_callback
+         function="OpenObject.ReplaceOutfit" />
+    </button>  
+ 
     <button
      follows="bottom|left"
      height="23"
-     label="Copy to inventory"
-     label_selected="Copy to inventory"
+     label="Only copy to inventory"
+     label_selected="Only copy to inventory"
      layout="topleft"
      left="15"
      name="copy_to_inventory_button"
      tab_group="1"
      top_pad="5"
-     width="120">
+     width="135">
         <button.commit_callback
          function="OpenObject.MoveToInventory" />
     </button>
     <button
      follows="bottom|left"
      height="23"
-     label="Copy and add to outfit"
-     label_selected="Copy and add to outfit"
+     label="Cancel"
+     label_selected="Cancel"
      layout="topleft"
      left_pad="5"
-     name="copy_and_wear_button"
-     width="135">
+     name="cancel_button"
+     width="120">
         <button.commit_callback
-         function="OpenObject.MoveAndWear" />
+         function="OpenObject.Cancel" />
     </button>
 </floater>
-- 
cgit v1.2.3


From 8b88633761b0ebffebdec24be038868b439971f3 Mon Sep 17 00:00:00 2001
From: "Brad Payne (Vir Linden)" <vir@lindenlab.com>
Date: Thu, 28 Aug 2014 17:32:22 -0400
Subject: MAINT-4158 WIP - track position overrides requested by attachments so
 they can be undone intelligently

---
 indra/newview/llfloatermodelpreview.cpp | 3 ++-
 indra/newview/llvovolume.cpp            | 3 +--
 2 files changed, 3 insertions(+), 3 deletions(-)

(limited to 'indra/newview')

diff --git a/indra/newview/llfloatermodelpreview.cpp b/indra/newview/llfloatermodelpreview.cpp
index 039ff848cb..93c18c5c8b 100755
--- a/indra/newview/llfloatermodelpreview.cpp
+++ b/indra/newview/llfloatermodelpreview.cpp
@@ -1935,7 +1935,8 @@ bool LLModelLoader::doLoadModel()
 										LLJoint* pJoint = mPreview->getPreviewAvatar()->getJoint( lookingForJoint );
 										if ( pJoint )
 										{   
-											LL_WARNS() << "Aieee, now what!" << LL_ENDL;
+											pJoint->addAttachmentPosOverride( jointTransform.getTranslation(), mFilename);
+											//LL_WARNS() << "Aieee, now what!" << LL_ENDL;
 											//pJoint->storeCurrentXform( jointTransform.getTranslation() );												
 										}
 										else
diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp
index 0ef48c4c70..0dc5ae5058 100755
--- a/indra/newview/llvovolume.cpp
+++ b/indra/newview/llvovolume.cpp
@@ -4626,8 +4626,7 @@ void LLVolumeGeometryManager::rebuildGeom(LLSpatialGroup* group)
 											const LLVector3& jointPos = pSkinData->mAlternateBindMatrix[i].getTranslation();									
 											
 											//Set the joint position
-											const std::string& attachment_name = drawablep->getVObj()->getAttachmentItemName();
-											//pJoint->storeCurrentXform( jointPos );					
+											const std::string& attachment_name = drawablep->getVObj()->getAttachmentItemName();				
 											pJoint->addAttachmentPosOverride( jointPos, attachment_name );
 									
 											//If joint is a pelvis then handle old/new pelvis to foot values
-- 
cgit v1.2.3


From 6efd9d09b91f5bbecfcde68c8a59f8fc56b89ad8 Mon Sep 17 00:00:00 2001
From: Mnikolenko ProductEngine <mnikolenko@productengine.com>
Date: Mon, 1 Sep 2014 11:33:55 +0300
Subject: MAINT-2699 FIXED Disable voice and release mic button when status is
 changed to STATUS_VOICE_DISABLED.

---
 indra/newview/llvoicechannel.cpp | 2 ++
 indra/newview/llvoicevivox.cpp   | 5 +++--
 2 files changed, 5 insertions(+), 2 deletions(-)

(limited to 'indra/newview')

diff --git a/indra/newview/llvoicechannel.cpp b/indra/newview/llvoicechannel.cpp
index 9a84cae403..426ca332e4 100755
--- a/indra/newview/llvoicechannel.cpp
+++ b/indra/newview/llvoicechannel.cpp
@@ -725,6 +725,8 @@ void LLVoiceChannelProximal::handleStatusChange(EStatusType status)
 		// do not notify user when leaving proximal channel
 		return;
 	case STATUS_VOICE_DISABLED:
+		LLVoiceClient::getInstance()->setUserPTTState(false);
+		gAgent.setVoiceConnected(false);
 		//skip showing "Voice not available at your current location" when agent voice is disabled (EXT-4749)
 		if(LLVoiceClient::getInstance()->voiceEnabled() && LLVoiceClient::getInstance()->isVoiceWorking())
 		{
diff --git a/indra/newview/llvoicevivox.cpp b/indra/newview/llvoicevivox.cpp
index 54b4119331..2f3cd4d24c 100755
--- a/indra/newview/llvoicevivox.cpp
+++ b/indra/newview/llvoicevivox.cpp
@@ -3169,7 +3169,7 @@ void LLVivoxVoiceClient::mediaStreamUpdatedEvent(
 				session->mErrorStatusCode = statusCode;
 			break;
 		}
-		
+
 		switch(state)
 		{
 			case streamStateIdle:
@@ -5433,7 +5433,8 @@ void LLVivoxVoiceClient::notifyStatusObservers(LLVoiceClientStatusObserver::ESta
 
 	// skipped to avoid speak button blinking
 	if (   status != LLVoiceClientStatusObserver::STATUS_JOINING
-		&& status != LLVoiceClientStatusObserver::STATUS_LEFT_CHANNEL)
+		&& status != LLVoiceClientStatusObserver::STATUS_LEFT_CHANNEL
+		&& status != LLVoiceClientStatusObserver::STATUS_VOICE_DISABLED)
 	{
 		bool voice_status = LLVoiceClient::getInstance()->voiceEnabled() && LLVoiceClient::getInstance()->isVoiceWorking();
 
-- 
cgit v1.2.3


From 9ffa7471bb9e611440e3c12e654b83dfbead2e83 Mon Sep 17 00:00:00 2001
From: andreykproductengine <akleshchev@productengine.com>
Date: Wed, 3 Sep 2014 18:26:04 +0300
Subject: MAINT-4363 FIXED In-use script dialogs and pending inventory offers
 are forced out of view and into their chiclet every time a new conversation
 is started by another resident or a new group chat session opens

---
 indra/newview/llfloaterimsessiontab.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'indra/newview')

diff --git a/indra/newview/llfloaterimsessiontab.cpp b/indra/newview/llfloaterimsessiontab.cpp
index fbdaca0e6f..2864f018b2 100755
--- a/indra/newview/llfloaterimsessiontab.cpp
+++ b/indra/newview/llfloaterimsessiontab.cpp
@@ -47,7 +47,7 @@
 const F32 REFRESH_INTERVAL = 1.0f;
 
 LLFloaterIMSessionTab::LLFloaterIMSessionTab(const LLSD& session_id)
-:	LLTransientDockableFloater(NULL, true, session_id),
+:	LLTransientDockableFloater(NULL, false, session_id),
 	mIsP2PChat(false),
 	mExpandCollapseBtn(NULL),
 	mTearOffBtn(NULL),
-- 
cgit v1.2.3


From c053dbe02c301b92c151eb835f6c770b61a46859 Mon Sep 17 00:00:00 2001
From: Mnikolenko ProductEngine <mnikolenko@productengine.com>
Date: Fri, 5 Sep 2014 15:47:11 +0300
Subject: MAINT-1192 FIXED Empty folders remain in the recent items tab of
 inventory until relog

---
 indra/newview/llpanelmaininventory.cpp | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

(limited to 'indra/newview')

diff --git a/indra/newview/llpanelmaininventory.cpp b/indra/newview/llpanelmaininventory.cpp
index 90dfb24377..e8a006d0be 100755
--- a/indra/newview/llpanelmaininventory.cpp
+++ b/indra/newview/llpanelmaininventory.cpp
@@ -151,7 +151,9 @@ BOOL LLPanelMainInventory::postBuild()
 		recent_items_panel->setSinceLogoff(TRUE);
 		recent_items_panel->setSortOrder(LLInventoryFilter::SO_DATE);
 		recent_items_panel->setShowFolderState(LLInventoryFilter::SHOW_NON_EMPTY_FOLDERS);
-		recent_items_panel->getFilter().markDefault();
+		LLInventoryFilter& recent_filter = recent_items_panel->getFilter();
+		recent_filter.setFilterObjectTypes(recent_filter.getFilterObjectTypes() & ~(0x1 << LLInventoryType::IT_CATEGORY));
+		recent_filter.markDefault();
 		recent_items_panel->setSelectCallback(boost::bind(&LLPanelMainInventory::onSelectionChange, this, recent_items_panel, _1, _2));
 	}
 
@@ -825,9 +827,9 @@ void LLFloaterInventoryFinder::draw()
 		filtered_by_all_types = FALSE;
 	}
 
-	if (!filtered_by_all_types)
+	if (!filtered_by_all_types || (mPanelMainInventory->getPanel()->getFilter().getFilterTypes() & LLInventoryFilter::FILTERTYPE_DATE))
 	{
-		// don't include folders in filter, unless I've selected everything
+		// don't include folders in filter, unless I've selected everything or filtering by date
 		filter &= ~(0x1 << LLInventoryType::IT_CATEGORY);
 	}
 
-- 
cgit v1.2.3


From deddf0f3d97ed1ab6c8dc9f1592c5e4c4a4a273a Mon Sep 17 00:00:00 2001
From: "Brad Payne (Vir Linden)" <vir@lindenlab.com>
Date: Fri, 5 Sep 2014 15:05:51 -0400
Subject: MAINT-4158 cleanup

---
 indra/newview/llfloatermodelpreview.cpp | 2 --
 1 file changed, 2 deletions(-)

(limited to 'indra/newview')

diff --git a/indra/newview/llfloatermodelpreview.cpp b/indra/newview/llfloatermodelpreview.cpp
index 93c18c5c8b..195a7f5ffe 100755
--- a/indra/newview/llfloatermodelpreview.cpp
+++ b/indra/newview/llfloatermodelpreview.cpp
@@ -1936,8 +1936,6 @@ bool LLModelLoader::doLoadModel()
 										if ( pJoint )
 										{   
 											pJoint->addAttachmentPosOverride( jointTransform.getTranslation(), mFilename);
-											//LL_WARNS() << "Aieee, now what!" << LL_ENDL;
-											//pJoint->storeCurrentXform( jointTransform.getTranslation() );												
 										}
 										else
 										{
-- 
cgit v1.2.3


From 2802a0e8392169ba77edd79544b6c8a2ec1851b8 Mon Sep 17 00:00:00 2001
From: callum_linden <none@none>
Date: Fri, 5 Sep 2014 16:00:10 -0700
Subject: MAINT-3440 (Refix) Viewer freezes and not responding after trying to
 open 5 new media browsers tabs directed to yahoo.com link

---
 indra/newview/llfloaterwebcontent.cpp | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

(limited to 'indra/newview')

diff --git a/indra/newview/llfloaterwebcontent.cpp b/indra/newview/llfloaterwebcontent.cpp
index 3f3d87b564..024e315632 100755
--- a/indra/newview/llfloaterwebcontent.cpp
+++ b/indra/newview/llfloaterwebcontent.cpp
@@ -293,6 +293,7 @@ void LLFloaterWebContent::onOpen(const LLSD& key)
 void LLFloaterWebContent::onClose(bool app_quitting)
 {
     // If we close the web browsing window showing the facebook login, we need to signal to this object that the connection will not happen
+	// MAINT-3440 note change here to use findInstance and not getInstance - latter creates an instance if it's not there which is bad.
     LLFloater* fbc_web = LLFloaterReg::findInstance("fbc_web");
     if (fbc_web == this)
     {
@@ -302,7 +303,8 @@ void LLFloaterWebContent::onClose(bool app_quitting)
         }
     }
 	// Same with Flickr
-	LLFloater* flickr_web = LLFloaterReg::getInstance("flickr_web");
+	// MAINT-3440 note change here to use findInstance and not getInstance - latter creates an instance if it's not there which is bad.
+	LLFloater* flickr_web = LLFloaterReg::findInstance("flickr_web");
     if (flickr_web == this)
     {
         if (!LLFlickrConnect::instance().isConnected())
@@ -311,7 +313,8 @@ void LLFloaterWebContent::onClose(bool app_quitting)
         }
     }
 	// And Twitter
-	LLFloater* twitter_web = LLFloaterReg::getInstance("twitter_web");
+	// MAINT-3440 note change here to use findInstance and not getInstance - latter creates an instance if it's not there which is bad.
+	LLFloater* twitter_web = LLFloaterReg::findInstance("twitter_web");
     if (twitter_web == this)
     {
         if (!LLTwitterConnect::instance().isConnected())
-- 
cgit v1.2.3


From 32282f8d9e0cd3652a68c1cea8a552f52ef8f631 Mon Sep 17 00:00:00 2001
From: Mnikolenko ProductEngine <mnikolenko@productengine.com>
Date: Mon, 8 Sep 2014 10:56:31 +0300
Subject: MAINT-4422 FIXED Inventory re-sorts itself if any of the Filters are
 enabled and you detach an item from your Avatar

---
 indra/newview/llinventorypanel.cpp | 29 ++++++++++-------------------
 1 file changed, 10 insertions(+), 19 deletions(-)

(limited to 'indra/newview')

diff --git a/indra/newview/llinventorypanel.cpp b/indra/newview/llinventorypanel.cpp
index ce7d4f50ad..db540b6199 100755
--- a/indra/newview/llinventorypanel.cpp
+++ b/indra/newview/llinventorypanel.cpp
@@ -537,12 +537,13 @@ void LLInventoryPanel::modelChanged(U32 mask)
 			// This item already exists in both memory and UI.  It was probably reparented.
 			else if (model_item && view_item)
 			{
+				LLFolderViewFolder* old_parent = view_item->getParentFolder();
 				// Don't process the item if it is the root
-				if (view_item->getParentFolder())
+				if (old_parent)
 				{
 					LLFolderViewFolder* new_parent =   (LLFolderViewFolder*)getItemByID(model_item->getParentUUID());
 					// Item has been moved.
-					if (view_item->getParentFolder() != new_parent)
+					if (old_parent != new_parent)
 					{
 						if (new_parent != NULL)
 						{
@@ -568,6 +569,7 @@ void LLInventoryPanel::modelChanged(U32 mask)
 							// doesn't include trash).  Just remove the item's UI.
 							view_item->destroyView();
 						}
+						old_parent->getViewModelItem()->dirtyDescendantsFilter();
 					}
 				}
 			}
@@ -578,27 +580,16 @@ void LLInventoryPanel::modelChanged(U32 mask)
 			else if (!model_item && view_item && viewmodel_item)
 			{
 				// Remove the item's UI.
-                removeItemID(viewmodel_item->getUUID());
+				LLFolderViewFolder* parent = view_item->getParentFolder();
+				removeItemID(viewmodel_item->getUUID());
 				view_item->destroyView();
+				if(parent)
+				{
+					parent->getViewModelItem()->dirtyDescendantsFilter();
+				}
 			}
 		}
 	}
-
-	if (mask & (LLInventoryObserver::STRUCTURE | LLInventoryObserver::REMOVE))
-	{
-		// STRUCTURE and REMOVE model changes usually fail to update (clean)
-		// mMostFilteredDescendantGeneration of parent folder and dirtyFilter()
-		// is not sufficient for successful filter update, so we need to check
-		// all already passed element over again to remove obsolete elements.
-		// New items or moved items should be sufficiently covered by
-		// dirtyFilter().
-		LLInventoryFilter& filter = getFilter();
-		if (filter.getFilterTypes() & LLInventoryFilter::FILTERTYPE_DATE
-			|| filter.isNotDefault())
-		{
-			filter.setModified(LLFolderViewFilter::FILTER_MORE_RESTRICTIVE);
-		}
-	}
 }
 
 LLUUID LLInventoryPanel::getRootFolderID()
-- 
cgit v1.2.3


From 136a20f155d0f89accce0b24446e5a2c62935ab6 Mon Sep 17 00:00:00 2001
From: Mnikolenko ProductEngine <mnikolenko@productengine.com>
Date: Tue, 9 Sep 2014 10:46:56 +0300
Subject: MAINT-4432 FIXED Packets Lost under Help -> About Second Life does
 not display correctly

---
 indra/newview/skins/default/xui/fr/strings.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'indra/newview')

diff --git a/indra/newview/skins/default/xui/fr/strings.xml b/indra/newview/skins/default/xui/fr/strings.xml
index 46fcbe005f..35b373f13a 100755
--- a/indra/newview/skins/default/xui/fr/strings.xml
+++ b/indra/newview/skins/default/xui/fr/strings.xml
@@ -71,7 +71,7 @@ Version Qt Webkit : [QT_WEBKIT_VERSION]
 Version serveur vocal : [VOICE_VERSION]
 	</string>
 	<string name="AboutTraffic">
-		Paquets perdus : [PACKETS_LOST,nombre,0]/[PACKETS_IN,nombre,0] ([PACKETS_PCT,nombre,1]%)
+		Paquets perdus : [PACKETS_LOST,number,0]/[PACKETS_IN,number,0] ([PACKETS_PCT,number,1]%)
 	</string>
 	<string name="ErrorFetchingServerReleaseNotesURL">
 		Erreur lors de la récupération de l&apos;URL des notes de version du serveur.
-- 
cgit v1.2.3


From 87a2cccb3ea7da76c8c8fd508b79b7da3b5c6504 Mon Sep 17 00:00:00 2001
From: andreykproductengine <akleshchev@productengine.com>
Date: Wed, 10 Sep 2014 13:49:13 +0300
Subject: MAINT-4334 modified ignoretext for notification

---
 indra/newview/skins/default/xui/en/notifications.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'indra/newview')

diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml
index 570ecf241e..ea1bc66236 100755
--- a/indra/newview/skins/default/xui/en/notifications.xml
+++ b/indra/newview/skins/default/xui/en/notifications.xml
@@ -5251,7 +5251,7 @@ Warning: The &apos;Pay object&apos; click action has been set, but it will only
     Confirm that you want to pay L$[AMOUNT] to [TARGET].
     <tag>confirm</tag>
     <usetemplate
-     ignoretext="Confirm before paying"
+     ignoretext="Confirm before paying (sums over L$200)"
      name="okcancelignore"
      notext="Cancel"
      yestext="Pay"/>
-- 
cgit v1.2.3


From d47efdfe03095d2b33fe8a1e6c3adccd25dfdc8b Mon Sep 17 00:00:00 2001
From: ruslantproductengine <ruslantproductengine@lindenlab.com>
Date: Wed, 10 Sep 2014 21:08:08 +0300
Subject: MAINT-3964 FIXED Textures with Alpha won't Animate on Rigged Mesh
 when worn : fix in shader (mul texcoord to tex matrix), array's optimization

---
 indra/newview/app_settings/shaders/class1/deferred/alphaV.glsl | 5 ++---
 indra/newview/lldrawpoolavatar.cpp                             | 2 +-
 2 files changed, 3 insertions(+), 4 deletions(-)

(limited to 'indra/newview')

diff --git a/indra/newview/app_settings/shaders/class1/deferred/alphaV.glsl b/indra/newview/app_settings/shaders/class1/deferred/alphaV.glsl
index b40785bbd7..506118d381 100755
--- a/indra/newview/app_settings/shaders/class1/deferred/alphaV.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/alphaV.glsl
@@ -111,10 +111,9 @@ void main()
 
 #ifdef USE_INDEXED_TEX
 	passTextureIndex();
-	vary_texcoord0 = (texture_matrix0 * vec4(texcoord0,0,1)).xy;
-#else
-	vary_texcoord0 = texcoord0;
 #endif
+
+	vary_texcoord0 = (texture_matrix0 * vec4(texcoord0,0,1)).xy;
 	
 	vary_norm = norm;
 	vary_position = pos.xyz;
diff --git a/indra/newview/lldrawpoolavatar.cpp b/indra/newview/lldrawpoolavatar.cpp
index 90e6dfe351..afd5b84537 100755
--- a/indra/newview/lldrawpoolavatar.cpp
+++ b/indra/newview/lldrawpoolavatar.cpp
@@ -375,7 +375,7 @@ void LLDrawPoolAvatar::endPostDeferredAlpha()
 
 void LLDrawPoolAvatar::renderPostDeferred(S32 pass)
 {
-	const S32 actual_pass[] =
+	static const S32 actual_pass[] =
 	{ //map post deferred pass numbers to what render() expects
 		2, //skinned
 		4, // rigged fullbright
-- 
cgit v1.2.3


From a4fc0b26b07e739348555ef936257bc25352279b Mon Sep 17 00:00:00 2001
From: ruslantproductengine <ruslantproductengine@lindenlab.com>
Date: Mon, 18 Aug 2014 15:12:16 +0300
Subject: MAINT-3511 FIXED When one surface of mesh object is set transparent
 all object is invisible : compare rotation quaternions with predefined
 epsilon

---
 indra/newview/llviewerobject.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'indra/newview')

diff --git a/indra/newview/llviewerobject.cpp b/indra/newview/llviewerobject.cpp
index 97cefaf33c..33b442815d 100755
--- a/indra/newview/llviewerobject.cpp
+++ b/indra/newview/llviewerobject.cpp
@@ -2274,7 +2274,7 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys,
 		}
 	}
 
-	if ((new_rot != getRotation())
+	if ((new_rot.isNotEqualEps(getRotation(), F_ALMOST_ZERO))
 		|| (new_angv != old_angv))
 	{
 		if (new_rot != mPreviousRotation)
-- 
cgit v1.2.3


From eba76107ba2d40998f28582d85d6b9f5b6188263 Mon Sep 17 00:00:00 2001
From: Aura Linden <aura@lindenlab.com>
Date: Tue, 19 Aug 2014 15:38:56 -0700
Subject: Set null position before value gets transformed.

---
 indra/newview/llvoicevivox.cpp | 44 ++++++++++++++++++++----------------------
 1 file changed, 21 insertions(+), 23 deletions(-)

(limited to 'indra/newview')

diff --git a/indra/newview/llvoicevivox.cpp b/indra/newview/llvoicevivox.cpp
index 4f89972192..efe4f15b00 100755
--- a/indra/newview/llvoicevivox.cpp
+++ b/indra/newview/llvoicevivox.cpp
@@ -1644,7 +1644,7 @@ void LLVivoxVoiceClient::stateMachine()
 void LLVivoxVoiceClient::closeSocket(void)
 {
 #ifdef LL_WINDOWS
-	_sleep(3000);	//Wait a moment for socket to close.  SPATTERS
+	_sleep(3000);	//Wait a moment for socket to close.
 #endif  
 	mSocket.reset();
 	mConnected = false;
@@ -2334,8 +2334,8 @@ static void oldSDKTransform (LLVector3 &left, LLVector3 &up, LLVector3 &at, LLVe
 
 void LLVivoxVoiceClient::setHidden(bool hidden)
 {
-    //SPATTERS hide me
     mHidden = hidden;
+    
     sendPositionalUpdate();
     return;
 }
@@ -2361,6 +2361,14 @@ void LLVivoxVoiceClient::sendPositionalUpdate(void)
 		l = mAvatarRot.getLeftRow();
 		u = mAvatarRot.getUpRow();
 		a = mAvatarRot.getFwdRow();
+
+        pos = mAvatarPosition;
+		vel = mAvatarVelocity;
+
+		// SLIM SDK: the old SDK was doing a transform on the passed coordinates that the new one doesn't do anymore.
+		// The old transform is replicated by this function.
+		oldSDKTransform(l, u, a, pos, vel);
+        
         if (mHidden)
         {
             for (int i=0;i<3;++i)
@@ -2368,17 +2376,8 @@ void LLVivoxVoiceClient::sendPositionalUpdate(void)
                 pos.mdV[i] = VX_NULL_POSITION;
             }
         }
-        else
-        {
-            pos = mAvatarPosition;
-        }
-		vel = mAvatarVelocity;
-
-		// SLIM SDK: the old SDK was doing a transform on the passed coordinates that the new one doesn't do anymore.
-		// The old transform is replicated by this function.
-		oldSDKTransform(l, u, a, pos, vel);
 		
-		stream 
+		stream
 			<< "<Position>"
 				<< "<X>" << pos.mdV[VX] << "</X>"
 				<< "<Y>" << pos.mdV[VY] << "</Y>"
@@ -2438,6 +2437,14 @@ void LLVivoxVoiceClient::sendPositionalUpdate(void)
 		l = earRot.getLeftRow();
 		u = earRot.getUpRow();
 		a = earRot.getFwdRow();
+
+        pos = earPosition;
+		vel = earVelocity;
+
+//		LL_DEBUGS("Voice") << "Sending listener position " << earPosition << LL_ENDL;
+		
+		oldSDKTransform(l, u, a, pos, vel);
+		
         if (mHidden)
         {
             for (int i=0;i<3;++i)
@@ -2445,17 +2452,8 @@ void LLVivoxVoiceClient::sendPositionalUpdate(void)
                 pos.mdV[i] = VX_NULL_POSITION;
             }
         }
-        else
-        {
-            pos = earPosition;
-        }
-		vel = earVelocity;
-
-//		LL_DEBUGS("Voice") << "Sending listener position " << earPosition << LL_ENDL;
-		
-		oldSDKTransform(l, u, a, pos, vel);
-		
-		stream 
+        
+		stream
 			<< "<Position>"
 				<< "<X>" << pos.mdV[VX] << "</X>"
 				<< "<Y>" << pos.mdV[VY] << "</Y>"
-- 
cgit v1.2.3


From 86e2bd75bc6a04fa175a0ac9df51371498355f58 Mon Sep 17 00:00:00 2001
From: Aura Linden <aura@lindenlab.com>
Date: Wed, 20 Aug 2014 14:02:48 -0700
Subject: Wait for response from SLVoice when sending shutdown.

---
 indra/newview/llvoicevivox.cpp | 15 +++++++++++----
 indra/newview/llvoicevivox.h   |  1 +
 2 files changed, 12 insertions(+), 4 deletions(-)

(limited to 'indra/newview')

diff --git a/indra/newview/llvoicevivox.cpp b/indra/newview/llvoicevivox.cpp
index efe4f15b00..642c6c1f76 100755
--- a/indra/newview/llvoicevivox.cpp
+++ b/indra/newview/llvoicevivox.cpp
@@ -323,6 +323,7 @@ LLVivoxVoiceClient::LLVivoxVoiceClient() :
 	mCaptureBufferRecording(false),
 	mCaptureBufferRecorded(false),
 	mCaptureBufferPlaying(false),
+	mShutdownComplete(true),
 	mPlayRequestCount(0),
 
 	mAvatarNameCacheConnection()
@@ -377,7 +378,14 @@ void LLVivoxVoiceClient::terminate()
 	if(mConnected)
 	{
 		logout();
-		connectorShutdown();
+		connectorShutdown(); 
+		int count=0;
+		while (!mShutdownComplete && 10 > count++)
+		{
+			stateMachine();
+			_sleep(1000);
+		}
+
 		closeSocket();		// Need to do this now -- bad things happen if the destructor does it later.
 		cleanUp();
 	}
@@ -512,6 +520,7 @@ void LLVivoxVoiceClient::connectorShutdown()
 		<< "</Request>"
 		<< "\n\n\n";
 		
+		mShutdownComplete = false;
 		mConnectorHandle.clear();
 		
 		writeString(stream.str());
@@ -1564,6 +1573,7 @@ void LLVivoxVoiceClient::stateMachine()
 		//MARK: stateConnectorStopping
 		case stateConnectorStopping:	// waiting for connector stop
 			// The handler for the Connector.InitiateShutdown response will transition from here to stateConnectorStopped.
+			mShutdownComplete = true;
 		break;
 
 		//MARK: stateConnectorStopped
@@ -1643,9 +1653,6 @@ void LLVivoxVoiceClient::stateMachine()
 
 void LLVivoxVoiceClient::closeSocket(void)
 {
-#ifdef LL_WINDOWS
-	_sleep(3000);	//Wait a moment for socket to close.
-#endif  
 	mSocket.reset();
 	mConnected = false;
 	mConnectorHandle.clear();
diff --git a/indra/newview/llvoicevivox.h b/indra/newview/llvoicevivox.h
index 10ebac730d..a4ec9f2a69 100755
--- a/indra/newview/llvoicevivox.h
+++ b/indra/newview/llvoicevivox.h
@@ -723,6 +723,7 @@ private:
 	bool mRenderDeviceDirty;
 
 	bool mIsInitialized;
+	bool mShutdownComplete;
 	
 	
 	bool checkParcelChanged(bool update = false);
-- 
cgit v1.2.3


From e77f33f8de63d2de2738f2e9af9cb797adc115c9 Mon Sep 17 00:00:00 2001
From: Aura Linden <aura@lindenlab.com>
Date: Wed, 20 Aug 2014 14:04:53 -0700
Subject: Windows only.

---
 indra/newview/llvoicevivox.cpp | 2 ++
 1 file changed, 2 insertions(+)

(limited to 'indra/newview')

diff --git a/indra/newview/llvoicevivox.cpp b/indra/newview/llvoicevivox.cpp
index 642c6c1f76..0387b18673 100755
--- a/indra/newview/llvoicevivox.cpp
+++ b/indra/newview/llvoicevivox.cpp
@@ -379,6 +379,7 @@ void LLVivoxVoiceClient::terminate()
 	{
 		logout();
 		connectorShutdown(); 
+#ifdef LL_WINDOWS
 		int count=0;
 		while (!mShutdownComplete && 10 > count++)
 		{
@@ -386,6 +387,7 @@ void LLVivoxVoiceClient::terminate()
 			_sleep(1000);
 		}
 
+#endif
 		closeSocket();		// Need to do this now -- bad things happen if the destructor does it later.
 		cleanUp();
 	}
-- 
cgit v1.2.3


From 79bb641310775c56cb742c5ea938d5681117585c Mon Sep 17 00:00:00 2001
From: "Brad Payne (Vir Linden)" <vir@lindenlab.com>
Date: Thu, 21 Aug 2014 14:18:35 -0400
Subject: MAINT-4158 WIP - fix for bug caused by multiple wearables with the
 same asset id

---
 indra/newview/llagentwearables.cpp | 5 +++++
 indra/newview/llvoavatar.cpp       | 2 +-
 2 files changed, 6 insertions(+), 1 deletion(-)

(limited to 'indra/newview')

diff --git a/indra/newview/llagentwearables.cpp b/indra/newview/llagentwearables.cpp
index 49fedb8df8..3928bbadc8 100755
--- a/indra/newview/llagentwearables.cpp
+++ b/indra/newview/llagentwearables.cpp
@@ -1009,6 +1009,10 @@ void LLAgentWearables::setWearableOutfit(const LLInventoryItem::item_array_t& it
 			continue;
 		}
 
+		// Don't care about this case - ordering of wearables with the same asset id has no effect.
+		// Causes the two-alphas error case in MAINT-4158.
+		// We should actually disallow wearing two wearables with the same asset id.
+#if 0
 		if (curr_wearable->getName() != new_item->getName() ||
 			curr_wearable->getItemID() != new_item->getUUID())
 		{
@@ -1019,6 +1023,7 @@ void LLAgentWearables::setWearableOutfit(const LLInventoryItem::item_array_t& it
 			mismatched++;
 			continue;
 		}
+#endif
 		// If we got here, everything matches.
 		matched++;
 	}
diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp
index c32a44b779..53da1dbfb8 100755
--- a/indra/newview/llvoavatar.cpp
+++ b/indra/newview/llvoavatar.cpp
@@ -5625,7 +5625,7 @@ const LLViewerJointAttachment *LLVOAvatar::attachObject(LLViewerObject *viewer_o
 }
 
 //-----------------------------------------------------------------------------
-// attachObject()
+// getNumAttachments()
 //-----------------------------------------------------------------------------
 U32 LLVOAvatar::getNumAttachments() const
 {
-- 
cgit v1.2.3


From 33f66ac2344f996a2310b179173232b98c8bd026 Mon Sep 17 00:00:00 2001
From: "Brad Payne (Vir Linden)" <vir@lindenlab.com>
Date: Wed, 27 Aug 2014 16:52:52 -0400
Subject: WIP on attachment offset management in joints

---
 indra/newview/llfloatermodelpreview.cpp |  3 ++-
 indra/newview/llviewerobject.cpp        | 11 +++++++++++
 indra/newview/llviewerobject.h          |  2 ++
 indra/newview/llvoavatar.cpp            | 14 +++++++-------
 indra/newview/llvoavatar.h              |  2 +-
 indra/newview/llvovolume.cpp            |  4 +++-
 6 files changed, 26 insertions(+), 10 deletions(-)

(limited to 'indra/newview')

diff --git a/indra/newview/llfloatermodelpreview.cpp b/indra/newview/llfloatermodelpreview.cpp
index b17ce97a2e..039ff848cb 100755
--- a/indra/newview/llfloatermodelpreview.cpp
+++ b/indra/newview/llfloatermodelpreview.cpp
@@ -1935,7 +1935,8 @@ bool LLModelLoader::doLoadModel()
 										LLJoint* pJoint = mPreview->getPreviewAvatar()->getJoint( lookingForJoint );
 										if ( pJoint )
 										{   
-											pJoint->storeCurrentXform( jointTransform.getTranslation() );												
+											LL_WARNS() << "Aieee, now what!" << LL_ENDL;
+											//pJoint->storeCurrentXform( jointTransform.getTranslation() );												
 										}
 										else
 										{
diff --git a/indra/newview/llviewerobject.cpp b/indra/newview/llviewerobject.cpp
index 4f992fc184..97cefaf33c 100755
--- a/indra/newview/llviewerobject.cpp
+++ b/indra/newview/llviewerobject.cpp
@@ -6193,6 +6193,17 @@ const LLUUID &LLViewerObject::extractAttachmentItemID()
 	return getAttachmentItemID();
 }
 
+const std::string& LLViewerObject::getAttachmentItemName()
+{
+	static std::string empty;
+	LLInventoryItem *item = gInventory.getItem(getAttachmentItemID());
+	if (isAttachment() && item)
+	{
+		return item->getName();
+	}
+	return empty;
+}
+
 //virtual
 LLVOAvatar* LLViewerObject::getAvatar() const
 {
diff --git a/indra/newview/llviewerobject.h b/indra/newview/llviewerobject.h
index bab107cc57..22ac4ce0db 100755
--- a/indra/newview/llviewerobject.h
+++ b/indra/newview/llviewerobject.h
@@ -170,6 +170,8 @@ public:
 	void			setOnActiveList(BOOL on_active)		{ mOnActiveList = on_active; }
 
 	virtual BOOL	isAttachment() const { return FALSE; }
+	const std::string& getAttachmentItemName();
+
 	virtual LLVOAvatar* getAvatar() const;  //get the avatar this object is attached to, or NULL if object is not an attachment
 	virtual BOOL	isHUDAttachment() const { return FALSE; }
 	virtual BOOL	isTempAttachment() const;
diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp
index 53da1dbfb8..6bd6570589 100755
--- a/indra/newview/llvoavatar.cpp
+++ b/indra/newview/llvoavatar.cpp
@@ -5058,9 +5058,9 @@ LLJoint *LLVOAvatar::getJoint( const std::string &name )
 	return jointp;
 }
 //-----------------------------------------------------------------------------
-// resetJointPositionsToDefault
+// resetJointPositionsOnDetach
 //-----------------------------------------------------------------------------
-void LLVOAvatar::resetJointPositionsToDefault( void )
+void LLVOAvatar::resetJointPositionsOnDetach(const std::string& attachment_name)
 {	
 	//Subsequent joints are relative to pelvis
 	avatar_joint_list_t::iterator iter = mSkeleton.begin();
@@ -5072,17 +5072,16 @@ void LLVOAvatar::resetJointPositionsToDefault( void )
 	{
 		LLJoint* pJoint = (*iter);
 		//Reset joints except for pelvis
-		if ( pJoint && pJoint != pJointPelvis && pJoint->doesJointNeedToBeReset() )
+		if ( pJoint && pJoint != pJointPelvis)
 		{			
 			pJoint->setId( LLUUID::null );
-			pJoint->restoreOldXform();
+			pJoint->removeAttachmentPosOverride(attachment_name);
 		}		
 		else
-		if ( pJoint && pJoint == pJointPelvis && pJoint->doesJointNeedToBeReset() )
+		if ( pJoint && pJoint == pJointPelvis)
 		{
 			pJoint->setId( LLUUID::null );
 			pJoint->setPosition( LLVector3( 0.0f, 0.0f, 0.0f) );
-			pJoint->setJointResetFlag( false );
 		}		
 	}	
 		
@@ -5746,7 +5745,8 @@ void LLVOAvatar::cleanupAttachedMesh( LLViewerObject* pVO )
 				&& pSkinData->mJointNames.size() > JOINT_COUNT_REQUIRED_FOR_FULLRIG	// full rig
 				&& pSkinData->mAlternateBindMatrix.size() > 0 )
 					{				
-						LLVOAvatar::resetJointPositionsToDefault();							
+						const std::string& attachment_name = pVO->getAttachmentItemName();
+						LLVOAvatar::resetJointPositionsOnDetach(attachment_name);							
 						//Need to handle the repositioning of the cam, updating rig data etc during outfit editing 
 						//This handles the case where we detach a replacement rig.
 						if ( gAgentCamera.cameraCustomizeAvatar() )
diff --git a/indra/newview/llvoavatar.h b/indra/newview/llvoavatar.h
index 42ff7bff92..66a357ff62 100755
--- a/indra/newview/llvoavatar.h
+++ b/indra/newview/llvoavatar.h
@@ -199,7 +199,7 @@ public:
 
 	virtual LLJoint*		getJoint(const std::string &name);
 	
-	void					resetJointPositionsToDefault( void );
+	void					resetJointPositionsOnDetach(const std::string& attachment_name);
 	
 	/*virtual*/ const LLUUID&	getID() const;
 	/*virtual*/ void			addDebugText(const std::string& text);
diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp
index a83e2e020e..0ef48c4c70 100755
--- a/indra/newview/llvovolume.cpp
+++ b/indra/newview/llvovolume.cpp
@@ -4626,7 +4626,9 @@ void LLVolumeGeometryManager::rebuildGeom(LLSpatialGroup* group)
 											const LLVector3& jointPos = pSkinData->mAlternateBindMatrix[i].getTranslation();									
 											
 											//Set the joint position
-											pJoint->storeCurrentXform( jointPos );					
+											const std::string& attachment_name = drawablep->getVObj()->getAttachmentItemName();
+											//pJoint->storeCurrentXform( jointPos );					
+											pJoint->addAttachmentPosOverride( jointPos, attachment_name );
 									
 											//If joint is a pelvis then handle old/new pelvis to foot values
 											if ( lookingForJoint == "mPelvis" )
-- 
cgit v1.2.3


From 2cb14c7fdcf835816176d6edc0c05b99bcb39873 Mon Sep 17 00:00:00 2001
From: "Brad Payne (Vir Linden)" <vir@lindenlab.com>
Date: Thu, 28 Aug 2014 17:32:22 -0400
Subject: MAINT-4158 WIP - track position overrides requested by attachments so
 they can be undone intelligently

---
 indra/newview/llfloatermodelpreview.cpp | 3 ++-
 indra/newview/llvovolume.cpp            | 3 +--
 2 files changed, 3 insertions(+), 3 deletions(-)

(limited to 'indra/newview')

diff --git a/indra/newview/llfloatermodelpreview.cpp b/indra/newview/llfloatermodelpreview.cpp
index 039ff848cb..93c18c5c8b 100755
--- a/indra/newview/llfloatermodelpreview.cpp
+++ b/indra/newview/llfloatermodelpreview.cpp
@@ -1935,7 +1935,8 @@ bool LLModelLoader::doLoadModel()
 										LLJoint* pJoint = mPreview->getPreviewAvatar()->getJoint( lookingForJoint );
 										if ( pJoint )
 										{   
-											LL_WARNS() << "Aieee, now what!" << LL_ENDL;
+											pJoint->addAttachmentPosOverride( jointTransform.getTranslation(), mFilename);
+											//LL_WARNS() << "Aieee, now what!" << LL_ENDL;
 											//pJoint->storeCurrentXform( jointTransform.getTranslation() );												
 										}
 										else
diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp
index 0ef48c4c70..0dc5ae5058 100755
--- a/indra/newview/llvovolume.cpp
+++ b/indra/newview/llvovolume.cpp
@@ -4626,8 +4626,7 @@ void LLVolumeGeometryManager::rebuildGeom(LLSpatialGroup* group)
 											const LLVector3& jointPos = pSkinData->mAlternateBindMatrix[i].getTranslation();									
 											
 											//Set the joint position
-											const std::string& attachment_name = drawablep->getVObj()->getAttachmentItemName();
-											//pJoint->storeCurrentXform( jointPos );					
+											const std::string& attachment_name = drawablep->getVObj()->getAttachmentItemName();				
 											pJoint->addAttachmentPosOverride( jointPos, attachment_name );
 									
 											//If joint is a pelvis then handle old/new pelvis to foot values
-- 
cgit v1.2.3


From 983ab95365cf45138aa05ab694c492fc141be2a8 Mon Sep 17 00:00:00 2001
From: Aura Linden <aura@lindenlab.com>
Date: Thu, 4 Sep 2014 11:28:42 -0700
Subject: Added code to allow alternate directory destination for vivox log.

---
 indra/newview/app_settings/settings.xml | 11 +++++++++++
 indra/newview/llvoicevivox.cpp          |  8 +++++++-
 2 files changed, 18 insertions(+), 1 deletion(-)

(limited to 'indra/newview')

diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml
index fa348e0bcd..eb5b1786d8 100755
--- a/indra/newview/app_settings/settings.xml
+++ b/indra/newview/app_settings/settings.xml
@@ -13509,6 +13509,17 @@
       <key>Value</key>
       <string>0</string>
     </map>
+    <key>VivoxLogDirectory</key>
+    <map>
+        <key>Comment</key>
+        <string>Default log path is Application Support/SecondLife/logs specify alternate absolute path here.</string>
+        <key>Persist</key>
+        <integer>1</integer>
+        <key>Type</key>
+        <string>String</string>
+        <key>Value</key>
+        <string></string>
+    </map>
     <key>VivoxShutdownTimeout</key>
     <map>
       <key>Comment</key>
diff --git a/indra/newview/llvoicevivox.cpp b/indra/newview/llvoicevivox.cpp
index 0387b18673..f980f886cf 100755
--- a/indra/newview/llvoicevivox.cpp
+++ b/indra/newview/llvoicevivox.cpp
@@ -810,7 +810,13 @@ void LLVivoxVoiceClient::stateMachine()
 						params.args.add("-ll");
 						params.args.add(loglevel);
 
-						std::string log_folder = gDirUtilp->getExpandedFilename(LL_PATH_LOGS, "");
+						std::string log_folder = gSavedSettings.getString("VivoxLogDirectory");
+                        
+                        if (log_folder.empty())
+                        {
+                            log_folder = gDirUtilp->getExpandedFilename(LL_PATH_LOGS, "");
+                        }
+                        
 						params.args.add("-lf");
 						params.args.add(log_folder);
 
-- 
cgit v1.2.3


From 2c0a0f4a5763d1f34ec1368dcc83ebb085c565e0 Mon Sep 17 00:00:00 2001
From: "Brad Payne (Vir Linden)" <vir@lindenlab.com>
Date: Fri, 5 Sep 2014 15:05:51 -0400
Subject: MAINT-4158 cleanup

---
 indra/newview/llfloatermodelpreview.cpp | 2 --
 1 file changed, 2 deletions(-)

(limited to 'indra/newview')

diff --git a/indra/newview/llfloatermodelpreview.cpp b/indra/newview/llfloatermodelpreview.cpp
index 93c18c5c8b..195a7f5ffe 100755
--- a/indra/newview/llfloatermodelpreview.cpp
+++ b/indra/newview/llfloatermodelpreview.cpp
@@ -1936,8 +1936,6 @@ bool LLModelLoader::doLoadModel()
 										if ( pJoint )
 										{   
 											pJoint->addAttachmentPosOverride( jointTransform.getTranslation(), mFilename);
-											//LL_WARNS() << "Aieee, now what!" << LL_ENDL;
-											//pJoint->storeCurrentXform( jointTransform.getTranslation() );												
 										}
 										else
 										{
-- 
cgit v1.2.3


From e44dfc0a4eb2c1dc63592f8ced7e35debbbf6238 Mon Sep 17 00:00:00 2001
From: Aura Linden <aura@lindenlab.com>
Date: Mon, 8 Sep 2014 13:55:23 -0700
Subject: Fix position hiding on failed teleports on mac.

---
 indra/newview/llagent.cpp | 5 +++++
 1 file changed, 5 insertions(+)

(limited to 'indra/newview')

diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp
index 059f21e91e..43e2b22689 100755
--- a/indra/newview/llagent.cpp
+++ b/indra/newview/llagent.cpp
@@ -3873,6 +3873,11 @@ void LLAgent::handleTeleportFinished()
 
 void LLAgent::handleTeleportFailed()
 {
+    if(LLVoiceClient::instanceExists())
+    {
+        LLVoiceClient::getInstance()->setHidden(FALSE);
+    }
+
 	if (mTeleportRequest != NULL)
 	{
 		mTeleportRequest->setStatus(LLTeleportRequest::kFailed);
-- 
cgit v1.2.3


From c62ac0cae77a4dbe7807c7638af5dc708f8c5933 Mon Sep 17 00:00:00 2001
From: Mnikolenko ProductEngine <mnikolenko@productengine.com>
Date: Thu, 11 Sep 2014 11:59:19 +0300
Subject: MAINT-3569 FIXED Handle window hide/unhide and minimize/unminimize
 events on mac.

---
 indra/newview/llappdelegate-objc.mm | 10 ++++++++++
 1 file changed, 10 insertions(+)

(limited to 'indra/newview')

diff --git a/indra/newview/llappdelegate-objc.mm b/indra/newview/llappdelegate-objc.mm
index 988058aad3..549df80fa1 100644
--- a/indra/newview/llappdelegate-objc.mm
+++ b/indra/newview/llappdelegate-objc.mm
@@ -84,6 +84,16 @@
 	callWindowUnfocus();
 }
 
+- (void) applicationDidHide:(NSNotification *)notification
+{
+	callWindowHide();
+}
+
+- (void) applicationDidUnhide:(NSNotification *)notification
+{
+	callWindowUnhide();
+}
+
 - (NSApplicationDelegateReply) applicationShouldTerminate:(NSApplication *)sender
 {
 	if (!runMainLoop())
-- 
cgit v1.2.3


From 61fb8c3fe31c73ce9121daac545aa7c8fc79ec8c Mon Sep 17 00:00:00 2001
From: Mnikolenko ProductEngine <mnikolenko@productengine.com>
Date: Thu, 11 Sep 2014 17:37:37 +0300
Subject: MAINT-4239 FIXED Border and text around top two buttons are added

---
 .../skins/default/xui/en/floater_openobject.xml    | 38 ++++++++++++++++------
 1 file changed, 28 insertions(+), 10 deletions(-)

(limited to 'indra/newview')

diff --git a/indra/newview/skins/default/xui/en/floater_openobject.xml b/indra/newview/skins/default/xui/en/floater_openobject.xml
index a130439baa..912db80bcc 100755
--- a/indra/newview/skins/default/xui/en/floater_openobject.xml
+++ b/indra/newview/skins/default/xui/en/floater_openobject.xml
@@ -3,9 +3,9 @@
  legacy_header_height="18"
  can_resize="true"
  default_tab_group="1"
- height="350"
+ height="370"
  layout="topleft"
- min_height="160"
+ min_height="190"
  min_width="285"
  name="objectcontents"
  help_topic="objectcontents"
@@ -31,22 +31,41 @@
      background_visible="false"
      draw_border="false"
      follows="all"
-     height="250"
+     height="240"
      layout="topleft"
      left="10"
      name="object_contents"
      top_pad="0"
      width="284" />
-     
+  	<view_border
+     bevel_style="none"
+     follows="bottom|left"
+     height="50"
+     highlight_light_color="0.6 0.6 0.6"
+     layout="topleft"
+     left="10"
+     name="border"
+     top_pad="5"
+     width="270"/> 
+  	<text
+  	 follows="bottom|left"
+  	 height="15"
+  	 layout="topleft"
+  	 left="15"
+  	 name="border_note"
+  	 text_color="White"
+  	 top_delta="5">
+  	 	Copy to inventory and wear
+    </text>  
  	<button
      follows="bottom|left"
      height="23"
-     label="Copy and add to outfit"
-     label_selected="Copy and add to outfit"
+     label="Add to outfit"
+     label_selected="Add to outfit"
      layout="topleft"
  	 left="15"    
-     name="copy_and_wear_button"
- 	 top_pad="5"	
+     name="copy_and_wear_button" 	
+ 	 top_pad="3"	
      width="135">
         <button.commit_callback
          function="OpenObject.MoveAndWear" />
@@ -63,7 +82,6 @@
         <button.commit_callback
          function="OpenObject.ReplaceOutfit" />
     </button>  
- 
     <button
      follows="bottom|left"
      height="23"
@@ -73,7 +91,7 @@
      left="15"
      name="copy_to_inventory_button"
      tab_group="1"
-     top_pad="5"
+     top_pad="9"
      width="135">
         <button.commit_callback
          function="OpenObject.MoveToInventory" />
-- 
cgit v1.2.3


From 9ae872da5996d6c7d1f35fbf5f5c6edc75fae3c5 Mon Sep 17 00:00:00 2001
From: Aura Linden <aura@lindenlab.com>
Date: Thu, 11 Sep 2014 11:48:14 -0700
Subject: Fix for maint-4445 losing voice dot during rapid teleports.

---
 indra/newview/llvoicevivox.cpp | 13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)

(limited to 'indra/newview')

diff --git a/indra/newview/llvoicevivox.cpp b/indra/newview/llvoicevivox.cpp
index f980f886cf..7420f2d1ca 100755
--- a/indra/newview/llvoicevivox.cpp
+++ b/indra/newview/llvoicevivox.cpp
@@ -498,13 +498,14 @@ void LLVivoxVoiceClient::connectorCreate()
 		<< "<AccountManagementServer>" << mVoiceAccountServerURI << "</AccountManagementServer>"
 		<< "<Mode>Normal</Mode>"
 		<< "<Logging>"
-			<< "<Folder>" << logpath << "</Folder>"
-			<< "<FileNamePrefix>Connector</FileNamePrefix>"
-			<< "<FileNameSuffix>.log</FileNameSuffix>"
-			<< "<LogLevel>" << loglevel << "</LogLevel>"
+        << "<Folder>" << logpath << "</Folder>"
+        << "<FileNamePrefix>Connector</FileNamePrefix>"
+        << "<FileNameSuffix>.log</FileNameSuffix>"
+        << "<LogLevel>" << loglevel << "</LogLevel>"
 		<< "</Logging>"
-		<< "<Application>SecondLifeViewer.1</Application>"
-	<< "</Request>\n\n\n";
+		<< "<Application></Application>"  //Name can cause problems per vivox.
+        << "<MaxCalls>12</MaxCalls>"
+        << "</Request>\n\n\n";
 	
 	writeString(stream.str());
 }
-- 
cgit v1.2.3


From 78304e398fa7d4604eac98247173b33d712ec135 Mon Sep 17 00:00:00 2001
From: Aura Linden <aura@lindenlab.com>
Date: Wed, 17 Sep 2014 10:33:08 -0700
Subject: A patch for maint-4414

---
 indra/newview/llspeakers.cpp | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

(limited to 'indra/newview')

diff --git a/indra/newview/llspeakers.cpp b/indra/newview/llspeakers.cpp
index 89302c3c64..e80756e4de 100755
--- a/indra/newview/llspeakers.cpp
+++ b/indra/newview/llspeakers.cpp
@@ -544,10 +544,18 @@ void LLSpeakerMgr::updateSpeakerList()
 			LLIMModel::LLIMSession* session = LLIMModel::getInstance()->findIMSession(session_id);
 			if (session->isGroupSessionType() && (mSpeakers.size() <= 1))
 			{
-                const F32 load_group_timeout = gSavedSettings.getF32("ChatLoadGroupTimeout");
 				// For groups, we need to hit the group manager.
 				// Note: The session uuid and the group uuid are actually one and the same. If that was to change, this will fail.
 				LLGroupMgrGroupData* gdatap = LLGroupMgr::getInstance()->getGroupData(session_id);
+                F32 large_group_delay = 0.f;
+                if (gdatap)
+                {
+                    //This is a viewer-side bandaid for maint-4414 it does not fix the core issue.
+                    large_group_delay = (F32)(gdatap->mMemberCount / 5000);
+                }
+                
+                const F32 load_group_timeout = gSavedSettings.getF32("ChatLoadGroupTimeout") + large_group_delay;
+
 				if (!gdatap && (mGetListTime.getElapsedTimeF32() >= load_group_timeout))
 				{
 					// Request the data the first time around
-- 
cgit v1.2.3


From 20a7cceb50bf4e5d238575c2180683ee4eb19b38 Mon Sep 17 00:00:00 2001
From: "Brad Payne (Vir Linden)" <vir@lindenlab.com>
Date: Tue, 7 Oct 2014 16:29:45 -0400
Subject: track avatar size info in avatar debug line

---
 indra/newview/llvoavatar.cpp | 1 +
 1 file changed, 1 insertion(+)

(limited to 'indra/newview')

diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp
index 6bd6570589..b483a3e452 100755
--- a/indra/newview/llvoavatar.cpp
+++ b/indra/newview/llvoavatar.cpp
@@ -3212,6 +3212,7 @@ BOOL LLVOAvatar::updateCharacter(LLAgent &agent)
 		{
 			debug_line += llformat(" - cof rcv:%d", last_received_cof_version);
 		}
+		debug_line += llformat(" bsz-z: %f avofs-z: %f", mBodySize[2], mAvatarOffset[2]);
 		addDebugText(debug_line);
 	}
 	if (gSavedSettings.getBOOL("DebugAvatarCompositeBaked"))
-- 
cgit v1.2.3


From b6ad3bd54dd4d48a0b984bc92a31bab7c9f90e75 Mon Sep 17 00:00:00 2001
From: "Brad Payne (Vir Linden)" <vir@lindenlab.com>
Date: Wed, 8 Oct 2014 11:45:12 -0400
Subject: Switched to keying joint offsets by mesh id

---
 indra/newview/llfloatermodelpreview.cpp | 4 +++-
 indra/newview/llvoavatar.cpp            | 8 ++++----
 indra/newview/llvoavatar.h              | 2 +-
 indra/newview/llvovolume.cpp            | 4 ++--
 4 files changed, 10 insertions(+), 8 deletions(-)

(limited to 'indra/newview')

diff --git a/indra/newview/llfloatermodelpreview.cpp b/indra/newview/llfloatermodelpreview.cpp
index 195a7f5ffe..73bf7f3e23 100755
--- a/indra/newview/llfloatermodelpreview.cpp
+++ b/indra/newview/llfloatermodelpreview.cpp
@@ -1935,7 +1935,9 @@ bool LLModelLoader::doLoadModel()
 										LLJoint* pJoint = mPreview->getPreviewAvatar()->getJoint( lookingForJoint );
 										if ( pJoint )
 										{   
-											pJoint->addAttachmentPosOverride( jointTransform.getTranslation(), mFilename);
+											LLUUID fake_mesh_id;
+											fake_mesh_id.generate();
+											pJoint->addAttachmentPosOverride( jointTransform.getTranslation(), fake_mesh_id, gAgentAvatarp->avString());
 										}
 										else
 										{
diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp
index b483a3e452..5ca9120f25 100755
--- a/indra/newview/llvoavatar.cpp
+++ b/indra/newview/llvoavatar.cpp
@@ -5061,7 +5061,7 @@ LLJoint *LLVOAvatar::getJoint( const std::string &name )
 //-----------------------------------------------------------------------------
 // resetJointPositionsOnDetach
 //-----------------------------------------------------------------------------
-void LLVOAvatar::resetJointPositionsOnDetach(const std::string& attachment_name)
+void LLVOAvatar::resetJointPositionsOnDetach(const LLUUID& mesh_id)
 {	
 	//Subsequent joints are relative to pelvis
 	avatar_joint_list_t::iterator iter = mSkeleton.begin();
@@ -5076,7 +5076,7 @@ void LLVOAvatar::resetJointPositionsOnDetach(const std::string& attachment_name)
 		if ( pJoint && pJoint != pJointPelvis)
 		{			
 			pJoint->setId( LLUUID::null );
-			pJoint->removeAttachmentPosOverride(attachment_name);
+			pJoint->removeAttachmentPosOverride(mesh_id, avString());
 		}		
 		else
 		if ( pJoint && pJoint == pJointPelvis)
@@ -5746,8 +5746,8 @@ void LLVOAvatar::cleanupAttachedMesh( LLViewerObject* pVO )
 				&& pSkinData->mJointNames.size() > JOINT_COUNT_REQUIRED_FOR_FULLRIG	// full rig
 				&& pSkinData->mAlternateBindMatrix.size() > 0 )
 					{				
-						const std::string& attachment_name = pVO->getAttachmentItemName();
-						LLVOAvatar::resetJointPositionsOnDetach(attachment_name);							
+						const LLUUID& mesh_id = pSkinData->mMeshID;
+						LLVOAvatar::resetJointPositionsOnDetach(mesh_id);							
 						//Need to handle the repositioning of the cam, updating rig data etc during outfit editing 
 						//This handles the case where we detach a replacement rig.
 						if ( gAgentCamera.cameraCustomizeAvatar() )
diff --git a/indra/newview/llvoavatar.h b/indra/newview/llvoavatar.h
index 66a357ff62..cd9fa30bc9 100755
--- a/indra/newview/llvoavatar.h
+++ b/indra/newview/llvoavatar.h
@@ -199,7 +199,7 @@ public:
 
 	virtual LLJoint*		getJoint(const std::string &name);
 	
-	void					resetJointPositionsOnDetach(const std::string& attachment_name);
+	void					resetJointPositionsOnDetach(const LLUUID& mesh_id);
 	
 	/*virtual*/ const LLUUID&	getID() const;
 	/*virtual*/ void			addDebugText(const std::string& text);
diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp
index 0dc5ae5058..4c21203c43 100755
--- a/indra/newview/llvovolume.cpp
+++ b/indra/newview/llvovolume.cpp
@@ -4626,8 +4626,8 @@ void LLVolumeGeometryManager::rebuildGeom(LLSpatialGroup* group)
 											const LLVector3& jointPos = pSkinData->mAlternateBindMatrix[i].getTranslation();									
 											
 											//Set the joint position
-											const std::string& attachment_name = drawablep->getVObj()->getAttachmentItemName();				
-											pJoint->addAttachmentPosOverride( jointPos, attachment_name );
+											const LLUUID& mesh_id = pSkinData->mMeshID;
+											pJoint->addAttachmentPosOverride( jointPos, mesh_id, pAvatarVO->avString() );
 									
 											//If joint is a pelvis then handle old/new pelvis to foot values
 											if ( lookingForJoint == "mPelvis" )
-- 
cgit v1.2.3


From a30e0fd9098c4be4d6aaf610d59b4165a1fa5704 Mon Sep 17 00:00:00 2001
From: "Brad Payne (Vir Linden)" <vir@lindenlab.com>
Date: Wed, 29 Oct 2014 09:17:34 -0400
Subject: MAINT-4606 WIP - handle removing attachments that contain multiple
 mesh objects

---
 indra/newview/llviewerobject.cpp | 23 +++++++++++++++
 indra/newview/llviewerobject.h   |  2 ++
 indra/newview/llvoavatar.cpp     | 62 ++++++++++++++++++++++++++--------------
 indra/newview/llvoavatar.h       |  1 +
 indra/newview/llvoavatarself.cpp |  2 --
 5 files changed, 66 insertions(+), 24 deletions(-)

(limited to 'indra/newview')

diff --git a/indra/newview/llviewerobject.cpp b/indra/newview/llviewerobject.cpp
index 97cefaf33c..344a7f5ce1 100755
--- a/indra/newview/llviewerobject.cpp
+++ b/indra/newview/llviewerobject.cpp
@@ -359,10 +359,17 @@ void LLViewerObject::markDead()
 		//LL_INFOS() << "Marking self " << mLocalID << " as dead." << LL_ENDL;
 		
 		// Root object of this hierarchy unlinks itself.
+		LLVOAvatar *av = getAvatarAncestor();
 		if (getParent())
 		{
 			((LLViewerObject *)getParent())->removeChild(this);
 		}
+		LLUUID mesh_id;
+		if (av && LLVOAvatar::getRiggedMeshID(this,mesh_id))
+		{
+			// This case is needed for indirectly attached mesh objects.
+			av->resetJointPositionsOnDetach(mesh_id);
+		}
 
 		// Mark itself as dead
 		mDead = TRUE;
@@ -5006,6 +5013,22 @@ LLVOAvatar* LLViewerObject::asAvatar()
 	return NULL;
 }
 
+// If this object is directly or indirectly parented by an avatar, return it.
+LLVOAvatar* LLViewerObject::getAvatarAncestor()
+{
+	LLViewerObject *pobj = (LLViewerObject*) getParent();
+	while (pobj)
+	{
+		LLVOAvatar *av = pobj->asAvatar();
+		if (av)
+		{
+			return av;
+		}
+		pobj =  (LLViewerObject*) pobj->getParent();
+	}
+	return NULL;
+}
+
 BOOL LLViewerObject::isParticleSource() const
 {
 	return !mPartSourcep.isNull() && !mPartSourcep->isDead();
diff --git a/indra/newview/llviewerobject.h b/indra/newview/llviewerobject.h
index 22ac4ce0db..05c87c153b 100755
--- a/indra/newview/llviewerobject.h
+++ b/indra/newview/llviewerobject.h
@@ -135,6 +135,8 @@ public:
 
 	virtual LLVOAvatar* asAvatar();
 
+	LLVOAvatar* getAvatarAncestor();
+
 	static void initVOClasses();
 	static void cleanupVOClasses();
 
diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp
index 5ca9120f25..e01bdd92b0 100755
--- a/indra/newview/llvoavatar.cpp
+++ b/indra/newview/llvoavatar.cpp
@@ -5058,6 +5058,37 @@ LLJoint *LLVOAvatar::getJoint( const std::string &name )
 
 	return jointp;
 }
+
+//-----------------------------------------------------------------------------
+// getRiggedMeshID
+//
+// If viewer object is a rigged mesh, set the mesh id and return true.
+// Otherwise, null out the id and return false.
+//-----------------------------------------------------------------------------
+// static
+bool LLVOAvatar::getRiggedMeshID(LLViewerObject* pVO, LLUUID& mesh_id)
+{
+	mesh_id.setNull();
+	
+	//If a VO has a skin that we'll reset the joint positions to their default
+	if ( pVO && pVO->mDrawable )
+	{
+		LLVOVolume* pVObj = pVO->mDrawable->getVOVolume();
+		if ( pVObj )
+		{
+			const LLMeshSkinInfo* pSkinData = gMeshRepo.getSkinInfo( pVObj->getVolume()->getParams().getSculptID(), pVObj );
+			if (pSkinData 
+				&& pSkinData->mJointNames.size() > JOINT_COUNT_REQUIRED_FOR_FULLRIG	// full rig
+				&& pSkinData->mAlternateBindMatrix.size() > 0 )
+					{				
+						mesh_id = pSkinData->mMeshID;
+						return true;
+					}
+		}
+	}
+	return false;
+}
+
 //-----------------------------------------------------------------------------
 // resetJointPositionsOnDetach
 //-----------------------------------------------------------------------------
@@ -5735,31 +5766,18 @@ void LLVOAvatar::rebuildRiggedAttachments( void )
 //-----------------------------------------------------------------------------
 void LLVOAvatar::cleanupAttachedMesh( LLViewerObject* pVO )
 {
-	//If a VO has a skin that we'll reset the joint positions to their default
-	if ( pVO && pVO->mDrawable )
+	LLUUID mesh_id;
+	if (getRiggedMeshID(pVO, mesh_id))
 	{
-		LLVOVolume* pVObj = pVO->mDrawable->getVOVolume();
-		if ( pVObj )
+		resetJointPositionsOnDetach(mesh_id);
+		if ( gAgentCamera.cameraCustomizeAvatar() )
 		{
-			const LLMeshSkinInfo* pSkinData = gMeshRepo.getSkinInfo( pVObj->getVolume()->getParams().getSculptID(), pVObj );
-			if (pSkinData 
-				&& pSkinData->mJointNames.size() > JOINT_COUNT_REQUIRED_FOR_FULLRIG	// full rig
-				&& pSkinData->mAlternateBindMatrix.size() > 0 )
-					{				
-						const LLUUID& mesh_id = pSkinData->mMeshID;
-						LLVOAvatar::resetJointPositionsOnDetach(mesh_id);							
-						//Need to handle the repositioning of the cam, updating rig data etc during outfit editing 
-						//This handles the case where we detach a replacement rig.
-						if ( gAgentCamera.cameraCustomizeAvatar() )
-						{
-							gAgent.unpauseAnimation();
-							//Still want to refocus on head bone
-							gAgentCamera.changeCameraToCustomizeAvatar();
-						}
-					}
-				}
-			}				
+			gAgent.unpauseAnimation();
+			//Still want to refocus on head bone
+			gAgentCamera.changeCameraToCustomizeAvatar();
 		}
+	}
+}
 
 //-----------------------------------------------------------------------------
 // detachObject()
diff --git a/indra/newview/llvoavatar.h b/indra/newview/llvoavatar.h
index cd9fa30bc9..a582922c03 100755
--- a/indra/newview/llvoavatar.h
+++ b/indra/newview/llvoavatar.h
@@ -719,6 +719,7 @@ public:
 	void 				clampAttachmentPositions();
 	virtual const LLViewerJointAttachment* attachObject(LLViewerObject *viewer_object);
 	virtual BOOL 		detachObject(LLViewerObject *viewer_object);
+	static bool		    getRiggedMeshID( LLViewerObject* pVO, LLUUID& mesh_id );
 	void				cleanupAttachedMesh( LLViewerObject* pVO );
 	static LLVOAvatar*  findAvatarFromAttachment(LLViewerObject* obj);
 	/*virtual*/ BOOL	isWearingWearableType(LLWearableType::EType type ) const;
diff --git a/indra/newview/llvoavatarself.cpp b/indra/newview/llvoavatarself.cpp
index ccc30c448d..77fda25537 100755
--- a/indra/newview/llvoavatarself.cpp
+++ b/indra/newview/llvoavatarself.cpp
@@ -1154,8 +1154,6 @@ BOOL LLVOAvatarSelf::detachObject(LLViewerObject *viewer_object)
 	const LLUUID attachment_id = viewer_object->getAttachmentItemID();
 	if ( LLVOAvatar::detachObject(viewer_object) )
 	{
-		LLVOAvatar::cleanupAttachedMesh( viewer_object );
-		
 		// the simulator should automatically handle permission revocation
 		
 		stopMotionFromSource(attachment_id);
-- 
cgit v1.2.3


From 58e2d58daf603824872308245a451c2e32394706 Mon Sep 17 00:00:00 2001
From: "Brad Payne (Vir Linden)" <vir@lindenlab.com>
Date: Thu, 30 Oct 2014 04:20:12 -0400
Subject: SL-93 - WIP on managing pelvis fixups using new joint offset
 framework

---
 indra/newview/app_settings/settings.xml | 11 ++++++++
 indra/newview/llaisapi.cpp              |  3 +-
 indra/newview/llfloatermodelpreview.cpp |  6 +++-
 indra/newview/llvoavatar.cpp            | 50 ++++++---------------------------
 indra/newview/llvoavatar.h              |  8 ------
 indra/newview/llvovolume.cpp            |  8 ++----
 6 files changed, 30 insertions(+), 56 deletions(-)

(limited to 'indra/newview')

diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml
index 22d64d4d14..3d97d0525e 100755
--- a/indra/newview/app_settings/settings.xml
+++ b/indra/newview/app_settings/settings.xml
@@ -4731,6 +4731,17 @@
       <key>Value</key>
       <integer>7</integer>
     </map>
+    <key>InventoryDisableAISv3</key>
+    <map>
+      <key>Comment</key>
+      <string>Force AISv3 support to off.</string>
+      <key>Persist</key>
+      <integer>1</integer>
+      <key>Type</key>
+      <string>Boolean</string>
+      <key>Value</key>
+      <integer>0</integer>
+    </map>
     <key>InvertMouse</key>
     <map>
       <key>Comment</key>
diff --git a/indra/newview/llaisapi.cpp b/indra/newview/llaisapi.cpp
index 96de15bf75..9842bf2a66 100755
--- a/indra/newview/llaisapi.cpp
+++ b/indra/newview/llaisapi.cpp
@@ -124,7 +124,8 @@ bool AISCommand::isAPIAvailable()
 {
 	if (gAgent.getRegion())
 	{
-		return gAgent.getRegion()->isCapabilityAvailable("InventoryAPIv3");
+		bool force_disable = gSavedSettings.getBOOL("InventoryDisableAISv3");
+		return gAgent.getRegion()->isCapabilityAvailable("InventoryAPIv3") && !force_disable;
 	}
 	return false;
 }
diff --git a/indra/newview/llfloatermodelpreview.cpp b/indra/newview/llfloatermodelpreview.cpp
index 73bf7f3e23..0c81ab7e79 100755
--- a/indra/newview/llfloatermodelpreview.cpp
+++ b/indra/newview/llfloatermodelpreview.cpp
@@ -3244,7 +3244,11 @@ U32 LLModelPreview::calcResourceCost()
 	
 	if ( mFMP && mFMP->childGetValue("upload_joints").asBoolean() )
 	{
-		getPreviewAvatar()->setPelvisOffset( mPelvisZOffset );
+		// FIXME if preview avatar ever gets reused, this fake mesh ID stuff will fail.
+		// see also call to addAttachmentPosOverride.
+		LLUUID fake_mesh_id;
+		fake_mesh_id.generate();
+		getPreviewAvatar()->addPelvisFixup( mPelvisZOffset, fake_mesh_id );
 	}
 
 	F32 streaming_cost = 0.f;
diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp
index e01bdd92b0..fb25a2ddec 100755
--- a/indra/newview/llvoavatar.cpp
+++ b/indra/newview/llvoavatar.cpp
@@ -708,7 +708,6 @@ LLVOAvatar::LLVOAvatar(const LLUUID& id,
 	mVisualComplexity(0),
 	mVisualComplexityStale(TRUE),
 	mLoadedCallbacksPaused(FALSE),
-	mHasPelvisOffset( FALSE ),
 	mRenderUnloadedAvatar(LLCachedControl<bool>(gSavedSettings, "RenderUnloadedAvatar", false)),
 	mLastRezzedStatus(-1),
 	mIsEditingAppearance(FALSE),
@@ -770,10 +769,6 @@ LLVOAvatar::LLVOAvatar(const LLUUID& id,
 	mRuthTimer.reset();
 	mRuthDebugTimer.reset();
 	mDebugExistenceTimer.reset();
-	mPelvisOffset = LLVector3(0.0f,0.0f,0.0f);
-	mLastPelvisToFoot = 0.0f;
-	mPelvisFixup = 0.0f;
-	mLastPelvisFixup = 0.0f;
 
     if(LLSceneMonitor::getInstance()->isEnabled())
 	{
@@ -1258,17 +1253,18 @@ const LLVector3 LLVOAvatar::getRenderPosition() const
 	}
 	else if (isRoot())
 	{
-		if ( !mHasPelvisOffset )
-		{
-			return mDrawable->getPositionAgent();
-		}
-		else
+		F32 fixup;
+		if ( hasPelvisFixup( fixup) )
 		{
 			//Apply a pelvis fixup (as defined by the avs skin)
 			LLVector3 pos = mDrawable->getPositionAgent();
-			pos[VZ] += mPelvisFixup;
+			pos[VZ] += fixup;
 			return pos;
 		}
+		else
+		{
+			return mDrawable->getPositionAgent();
+		}
 	}
 	else
 	{
@@ -3724,21 +3720,6 @@ void LLVOAvatar::updateHeadOffset()
 	}
 }
 //------------------------------------------------------------------------
-// setPelvisOffset
-//------------------------------------------------------------------------
-void LLVOAvatar::setPelvisOffset( bool hasOffset, const LLVector3& offsetAmount, F32 pelvisFixup ) 
-{
-	mHasPelvisOffset = hasOffset;
-	if ( mHasPelvisOffset )
-	{	
-		//Store off last pelvis to foot value
-		mLastPelvisToFoot = mPelvisToFoot;		
-		mPelvisOffset	  = offsetAmount;
-		mLastPelvisFixup  = mPelvisFixup;
-		mPelvisFixup	  = pelvisFixup;
-	}
-}
-//------------------------------------------------------------------------
 // postPelvisSetRecalc
 //------------------------------------------------------------------------
 void LLVOAvatar::postPelvisSetRecalc( void )
@@ -3748,15 +3729,6 @@ void LLVOAvatar::postPelvisSetRecalc( void )
 	dirtyMesh(2);
 }
 //------------------------------------------------------------------------
-// setPelvisOffset
-//------------------------------------------------------------------------
-void LLVOAvatar::setPelvisOffset( F32 pelvisFixupAmount )
-{		
-	mHasPelvisOffset  = true;
-	mLastPelvisFixup  = mPelvisFixup;	
-	mPelvisFixup	  = pelvisFixupAmount;	
-}
-//------------------------------------------------------------------------
 // updateVisibility()
 //------------------------------------------------------------------------
 void LLVOAvatar::updateVisibility()
@@ -5104,22 +5076,18 @@ void LLVOAvatar::resetJointPositionsOnDetach(const LLUUID& mesh_id)
 	{
 		LLJoint* pJoint = (*iter);
 		//Reset joints except for pelvis
-		if ( pJoint && pJoint != pJointPelvis)
+		if ( pJoint )
 		{			
 			pJoint->setId( LLUUID::null );
 			pJoint->removeAttachmentPosOverride(mesh_id, avString());
 		}		
-		else
 		if ( pJoint && pJoint == pJointPelvis)
 		{
-			pJoint->setId( LLUUID::null );
+			removePelvisFixup( mesh_id );
 			pJoint->setPosition( LLVector3( 0.0f, 0.0f, 0.0f) );
 		}		
 	}	
 		
-	//make sure we don't apply the joint offset
-	mHasPelvisOffset = false;
-	mPelvisFixup	 = mLastPelvisFixup;
 	postPelvisSetRecalc();	
 }
 //-----------------------------------------------------------------------------
diff --git a/indra/newview/llvoavatar.h b/indra/newview/llvoavatar.h
index a582922c03..d7cf4a2c0c 100755
--- a/indra/newview/llvoavatar.h
+++ b/indra/newview/llvoavatar.h
@@ -356,19 +356,11 @@ protected:
 	/*virtual*/ LLAvatarJointMesh*	createAvatarJointMesh(); // Returns LLViewerJointMesh
 public:
 	void				updateHeadOffset();
-	void				setPelvisOffset( bool hasOffset, const LLVector3& translation, F32 offset ) ;
-	bool				hasPelvisOffset( void ) { return mHasPelvisOffset; }
 	void				postPelvisSetRecalc( void );
-	void				setPelvisOffset( F32 pelvixFixupAmount );
 
 	/*virtual*/ BOOL	loadSkeletonNode();
 	/*virtual*/ void	buildCharacter();
 
-	bool				mHasPelvisOffset;
-	LLVector3			mPelvisOffset;
-	F32					mLastPelvisToFoot;
-	F32					mPelvisFixup;
-	F32					mLastPelvisFixup;
 	LLVector3			mCurRootToHeadOffset;
 	LLVector3			mTargetRootToHeadOffset;
 
diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp
index 4c21203c43..7c9bdc19a6 100755
--- a/indra/newview/llvovolume.cpp
+++ b/indra/newview/llvovolume.cpp
@@ -4632,11 +4632,9 @@ void LLVolumeGeometryManager::rebuildGeom(LLSpatialGroup* group)
 											//If joint is a pelvis then handle old/new pelvis to foot values
 											if ( lookingForJoint == "mPelvis" )
 											{	
-												if ( !pAvatarVO->hasPelvisOffset() )
-												{										
-													pAvatarVO->setPelvisOffset( true, jointPos, pelvisZOffset );
-													pelvisGotSet = true;											
-												}										
+												// FIXME move
+												pAvatarVO->addPelvisFixup( pelvisZOffset, mesh_id );
+												pelvisGotSet = true;											
 											}										
 										}										
 									}																
-- 
cgit v1.2.3


From 535e24c7e8913db447d90a949f6b2f6b92927f48 Mon Sep 17 00:00:00 2001
From: "Brad Payne (Vir Linden)" <vir@lindenlab.com>
Date: Thu, 30 Oct 2014 14:04:18 -0400
Subject: SL-93 WIP - missing include

---
 indra/newview/llaisapi.cpp | 1 +
 1 file changed, 1 insertion(+)

(limited to 'indra/newview')

diff --git a/indra/newview/llaisapi.cpp b/indra/newview/llaisapi.cpp
index 9842bf2a66..19793b6583 100755
--- a/indra/newview/llaisapi.cpp
+++ b/indra/newview/llaisapi.cpp
@@ -34,6 +34,7 @@
 #include "llsdutil.h"
 #include "llviewerregion.h"
 #include "llinventoryobserver.h"
+#include "llviewercontrol.h"
 
 ///----------------------------------------------------------------------------
 /// Classes for AISv3 support.
-- 
cgit v1.2.3


From 90aca8f95af4c73e592d9657d0eba4d9a709244c Mon Sep 17 00:00:00 2001
From: "Brad Payne (Vir Linden)" <vir@lindenlab.com>
Date: Fri, 31 Oct 2014 13:24:20 -0400
Subject: settings.xml update

---
 indra/newview/app_settings/settings.xml | 11 -----------
 indra/newview/llaisapi.cpp              |  3 +--
 2 files changed, 1 insertion(+), 13 deletions(-)

(limited to 'indra/newview')

diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml
index 3d97d0525e..22d64d4d14 100755
--- a/indra/newview/app_settings/settings.xml
+++ b/indra/newview/app_settings/settings.xml
@@ -4731,17 +4731,6 @@
       <key>Value</key>
       <integer>7</integer>
     </map>
-    <key>InventoryDisableAISv3</key>
-    <map>
-      <key>Comment</key>
-      <string>Force AISv3 support to off.</string>
-      <key>Persist</key>
-      <integer>1</integer>
-      <key>Type</key>
-      <string>Boolean</string>
-      <key>Value</key>
-      <integer>0</integer>
-    </map>
     <key>InvertMouse</key>
     <map>
       <key>Comment</key>
diff --git a/indra/newview/llaisapi.cpp b/indra/newview/llaisapi.cpp
index 19793b6583..9d887a61f1 100755
--- a/indra/newview/llaisapi.cpp
+++ b/indra/newview/llaisapi.cpp
@@ -125,8 +125,7 @@ bool AISCommand::isAPIAvailable()
 {
 	if (gAgent.getRegion())
 	{
-		bool force_disable = gSavedSettings.getBOOL("InventoryDisableAISv3");
-		return gAgent.getRegion()->isCapabilityAvailable("InventoryAPIv3") && !force_disable;
+		return gAgent.getRegion()->isCapabilityAvailable("InventoryAPIv3");
 	}
 	return false;
 }
-- 
cgit v1.2.3


From 7fec81b102e92e1a4e5a36fde077ef9b82cc7123 Mon Sep 17 00:00:00 2001
From: "Brad Payne (Vir Linden)" <vir@lindenlab.com>
Date: Mon, 3 Nov 2014 05:46:31 -0500
Subject: SL-93 WIP - pelvis fixup offsets

---
 indra/newview/llvoavatar.cpp | 21 +++++++++++++++++++++
 indra/newview/llvovolume.cpp |  9 ++++++---
 2 files changed, 27 insertions(+), 3 deletions(-)

(limited to 'indra/newview')

diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp
index fb25a2ddec..dd5941191a 100755
--- a/indra/newview/llvoavatar.cpp
+++ b/indra/newview/llvoavatar.cpp
@@ -7674,6 +7674,27 @@ void LLVOAvatar::dumpArchetypeXML(const std::string& prefix, bool group_by_weara
 						 pJoint->getName().c_str(), pos[0], pos[1], pos[2], scale[0], scale[1], scale[2]);
 	}
 
+	for (iter = mSkeleton.begin(); iter != end; ++iter)
+	{
+		LLJoint* pJoint = (*iter);
+		
+		LLVector3 pos;
+		LLUUID mesh_id;
+
+		if (pJoint->hasAttachmentPosOverride(pos,mesh_id))
+		{
+			apr_file_printf( file, "\t\t<joint_offset name=\"%s\" position=\"%f %f %f\" mesh_id=\"%s\"/>\n", 
+							 pJoint->getName().c_str(), pos[0], pos[1], pos[2], mesh_id.asString().c_str());
+		}
+	}
+	F32 pelvis_fixup;
+	LLUUID mesh_id;
+	if (hasPelvisFixup(pelvis_fixup, mesh_id))
+	{
+		apr_file_printf( file, "\t\t<pelvis_fixup z=\"%f\" mesh_id=\"%s\"/>\n", 
+						 pelvis_fixup, mesh_id.asString().c_str());
+	}
+
 	apr_file_printf( file, "\t</archetype>\n" );
 	apr_file_printf( file, "\n</linden_genepool>\n" );
 
diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp
index 7c9bdc19a6..aebd9f470d 100755
--- a/indra/newview/llvovolume.cpp
+++ b/indra/newview/llvovolume.cpp
@@ -4613,6 +4613,7 @@ void LLVolumeGeometryManager::rebuildGeom(LLSpatialGroup* group)
 							{					
 								const int jointCnt = pSkinData->mJointNames.size();
 								const F32 pelvisZOffset = pSkinData->mPelvisOffset;
+								const LLUUID& mesh_id = pSkinData->mMeshID;
 								bool fullRig = (jointCnt>=JOINT_COUNT_REQUIRED_FOR_FULLRIG) ? true : false;								
 								if ( fullRig )
 								{								
@@ -4626,18 +4627,20 @@ void LLVolumeGeometryManager::rebuildGeom(LLSpatialGroup* group)
 											const LLVector3& jointPos = pSkinData->mAlternateBindMatrix[i].getTranslation();									
 											
 											//Set the joint position
-											const LLUUID& mesh_id = pSkinData->mMeshID;
 											pJoint->addAttachmentPosOverride( jointPos, mesh_id, pAvatarVO->avString() );
 									
 											//If joint is a pelvis then handle old/new pelvis to foot values
 											if ( lookingForJoint == "mPelvis" )
 											{	
-												// FIXME move
-												pAvatarVO->addPelvisFixup( pelvisZOffset, mesh_id );
 												pelvisGotSet = true;											
 											}										
 										}										
 									}																
+									if (pelvisZOffset != 0.0F)
+									{
+										pAvatarVO->addPelvisFixup( pelvisZOffset, mesh_id );
+										pelvisGotSet = true;											
+									}
 								}							
 							}
 						}
-- 
cgit v1.2.3


From 30c1d67d957ec7f895dd690ec34b5459fc9082de Mon Sep 17 00:00:00 2001
From: "Brad Payne (Vir Linden)" <vir@lindenlab.com>
Date: Fri, 14 Nov 2014 09:25:43 -0500
Subject: MAINT-4537 WIP - order of operations during outfit change

---
 indra/newview/llagentwearables.cpp | 22 +++++++++++++++++-----
 indra/newview/llagentwearables.h   |  3 +++
 indra/newview/llappearancemgr.cpp  | 18 ++++++++++++++++--
 indra/newview/llvoavatar.cpp       | 28 ++++++++++++++++++++++++++++
 indra/newview/llvoavatar.h         |  1 +
 indra/newview/llvoavatarself.cpp   |  2 +-
 indra/newview/llvoavatarself.h     |  2 --
 7 files changed, 66 insertions(+), 10 deletions(-)

(limited to 'indra/newview')

diff --git a/indra/newview/llagentwearables.cpp b/indra/newview/llagentwearables.cpp
index 3928bbadc8..a7acdb0520 100755
--- a/indra/newview/llagentwearables.cpp
+++ b/indra/newview/llagentwearables.cpp
@@ -1248,9 +1248,11 @@ void LLAgentWearables::userRemoveWearablesOfType(const LLWearableType::EType &ty
 	}
 }
 
-// Combines userRemoveMulipleAttachments() and userAttachMultipleAttachments() logic to
-// get attachments into desired state with minimal number of adds/removes.
-void LLAgentWearables::userUpdateAttachments(LLInventoryModel::item_array_t& obj_item_array)
+// Given a desired set of attachments, find what objects need to be
+// removed, and what additional inventory items need to be added.
+void LLAgentWearables::findAttachmentsAddRemoveInfo(LLInventoryModel::item_array_t& obj_item_array,
+													llvo_vec_t& objects_to_remove,
+													LLInventoryModel::item_array_t& items_to_add)
 {
 	// Possible cases:
 	// already wearing but not in request set -> take off.
@@ -1269,7 +1271,6 @@ void LLAgentWearables::userUpdateAttachments(LLInventoryModel::item_array_t& obj
 	}
 
 	// Build up list of objects to be removed and items currently attached.
-	llvo_vec_t objects_to_remove;
 	for (LLVOAvatar::attachment_map_t::iterator iter = gAgentAvatarp->mAttachmentPoints.begin(); 
 		 iter != gAgentAvatarp->mAttachmentPoints.end();)
 	{
@@ -1309,7 +1310,6 @@ void LLAgentWearables::userUpdateAttachments(LLInventoryModel::item_array_t& obj
 		}
 	}
 
-	LLInventoryModel::item_array_t items_to_add;
 	for (LLInventoryModel::item_array_t::iterator it = obj_item_array.begin();
 		 it != obj_item_array.end();
 		 ++it)
@@ -1328,6 +1328,17 @@ void LLAgentWearables::userUpdateAttachments(LLInventoryModel::item_array_t& obj
 	// S32 remove_count = objects_to_remove.size();
 	// S32 add_count = items_to_add.size();
 	// LL_INFOS() << "remove " << remove_count << " add " << add_count << LL_ENDL;
+}
+
+// Combines userRemoveMulipleAttachments() and userAttachMultipleAttachments() logic to
+// get attachments into desired state with minimal number of adds/removes.
+void LLAgentWearables::userUpdateAttachments(LLInventoryModel::item_array_t& obj_item_array)
+{
+	llvo_vec_t objects_to_remove;
+	LLInventoryModel::item_array_t items_to_add;
+	findAttachmentsAddRemoveInfo(obj_item_array,
+								 objects_to_remove,
+								 items_to_add);
 
 	// Remove everything in objects_to_remove
 	userRemoveMultipleAttachments(objects_to_remove);
@@ -1353,6 +1364,7 @@ void LLAgentWearables::userRemoveMultipleAttachments(llvo_vec_t& objects_to_remo
 		 ++it)
 	{
 		LLViewerObject *objectp = *it;
+		gAgentAvatarp->resetJointPositionsOnDetach(objectp);
 		gMessageSystem->nextBlockFast(_PREHASH_ObjectData);
 		gMessageSystem->addU32Fast(_PREHASH_ObjectLocalID, objectp->getLocalID());
 	}
diff --git a/indra/newview/llagentwearables.h b/indra/newview/llagentwearables.h
index cdb1bdbe05..10e3dbf8c6 100755
--- a/indra/newview/llagentwearables.h
+++ b/indra/newview/llagentwearables.h
@@ -178,6 +178,9 @@ public:
 	
 	typedef std::vector<LLViewerObject*> llvo_vec_t;
 
+	static void     findAttachmentsAddRemoveInfo(LLInventoryModel::item_array_t& obj_item_array,
+												 llvo_vec_t& objects_to_remove,
+												 LLInventoryModel::item_array_t& items_to_add);
 	static void 	userUpdateAttachments(LLInventoryModel::item_array_t& obj_item_array);
 	static void		userRemoveMultipleAttachments(llvo_vec_t& llvo_array);
 	static void		userAttachMultipleAttachments(LLInventoryModel::item_array_t& obj_item_array);
diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp
index fba2b9d3a4..69efb20f79 100755
--- a/indra/newview/llappearancemgr.cpp
+++ b/indra/newview/llappearancemgr.cpp
@@ -807,6 +807,20 @@ void LLWearableHoldingPattern::onAllComplete()
 		}
 	}
 
+	LL_DEBUGS("Avatar") << self_av_string() << "Updating " << mObjItems.size() << " attachments" << LL_ENDL;
+	LLAgentWearables::llvo_vec_t objects_to_remove;
+	LLInventoryModel::item_array_t items_to_add;
+	if (isAgentAvatarValid())
+	{
+		LLAgentWearables::findAttachmentsAddRemoveInfo(mObjItems,
+													   objects_to_remove,
+													   items_to_add);
+
+		LL_DEBUGS("Avatar") << self_av_string() << "Removing " << objects_to_remove.size()
+							<< " attachments" << LL_ENDL;
+		LLAgentWearables::userRemoveMultipleAttachments(objects_to_remove);
+	}
+
 	// Update wearables.
 	LL_INFOS("Avatar") << self_av_string() << "HP " << index() << " updating agent wearables with " << mResolved << " wearable items " << LL_ENDL;
 	LLAppearanceMgr::instance().updateAgentWearables(this);
@@ -814,8 +828,8 @@ void LLWearableHoldingPattern::onAllComplete()
 	// Update attachments to match those requested.
 	if (isAgentAvatarValid())
 	{
-		LL_DEBUGS("Avatar") << self_av_string() << "Updating " << mObjItems.size() << " attachments" << LL_ENDL;
-		LLAgentWearables::userUpdateAttachments(mObjItems);
+		LL_DEBUGS("Avatar") << self_av_string() << "Adding " << items_to_add.size() << " attachments" << LL_ENDL;
+		LLAgentWearables::userAttachMultipleAttachments(items_to_add);
 	}
 
 	if (isFetchCompleted() && isMissingCompleted())
diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp
index dd5941191a..646ca25a0e 100755
--- a/indra/newview/llvoavatar.cpp
+++ b/indra/newview/llvoavatar.cpp
@@ -5061,6 +5061,34 @@ bool LLVOAvatar::getRiggedMeshID(LLViewerObject* pVO, LLUUID& mesh_id)
 	return false;
 }
 
+//-----------------------------------------------------------------------------
+// resetJointPositionsOnDetach
+//-----------------------------------------------------------------------------
+void LLVOAvatar::resetJointPositionsOnDetach(LLViewerObject *vo)
+{
+	LLVOAvatar *av = vo->getAvatarAncestor();
+	if (!av || (av != this))
+	{
+		LL_WARNS("Avatar") << "called with invalid avatar" << LL_ENDL;
+	}
+		
+	// Process all children
+	LLViewerObject::const_child_list_t& children = vo->getChildren();
+	for (LLViewerObject::const_child_list_t::const_iterator it = children.begin();
+		 it != children.end(); ++it)
+	{
+		LLViewerObject *childp = *it;
+		resetJointPositionsOnDetach(childp);
+	}
+
+	// Process self.
+	LLUUID mesh_id;
+	if (getRiggedMeshID(vo,mesh_id))
+	{
+		resetJointPositionsOnDetach(mesh_id);
+	}
+}
+
 //-----------------------------------------------------------------------------
 // resetJointPositionsOnDetach
 //-----------------------------------------------------------------------------
diff --git a/indra/newview/llvoavatar.h b/indra/newview/llvoavatar.h
index d7cf4a2c0c..ce1f0dd152 100755
--- a/indra/newview/llvoavatar.h
+++ b/indra/newview/llvoavatar.h
@@ -200,6 +200,7 @@ public:
 	virtual LLJoint*		getJoint(const std::string &name);
 	
 	void					resetJointPositionsOnDetach(const LLUUID& mesh_id);
+	void					resetJointPositionsOnDetach(LLViewerObject *vo);
 	
 	/*virtual*/ const LLUUID&	getID() const;
 	/*virtual*/ void			addDebugText(const std::string& text);
diff --git a/indra/newview/llvoavatarself.cpp b/indra/newview/llvoavatarself.cpp
index 77fda25537..4335df66a1 100755
--- a/indra/newview/llvoavatarself.cpp
+++ b/indra/newview/llvoavatarself.cpp
@@ -262,7 +262,7 @@ void LLVOAvatarSelf::markDead()
 {
 	BOOL success = LLVOAvatar::loadAvatar();
 
-	// set all parameters sotred directly in the avatar to have
+	// set all parameters stored directly in the avatar to have
 	// the isSelfParam to be TRUE - this is used to prevent
 	// them from being animated or trigger accidental rebakes
 	// when we copy params from the wearable to the base avatar.
diff --git a/indra/newview/llvoavatarself.h b/indra/newview/llvoavatarself.h
index 369c15d0f9..a9c01933b7 100755
--- a/indra/newview/llvoavatarself.h
+++ b/indra/newview/llvoavatarself.h
@@ -86,8 +86,6 @@ public:
 	/*virtual*/ void 		requestStopMotion(LLMotion* motion);
 	/*virtual*/ LLJoint*	getJoint(const std::string &name);
 	
-				void		resetJointPositions( void );
-	
 	/*virtual*/ BOOL setVisualParamWeight(const LLVisualParam *which_param, F32 weight);
 	/*virtual*/ BOOL setVisualParamWeight(const char* param_name, F32 weight);
 	/*virtual*/ BOOL setVisualParamWeight(S32 index, F32 weight);
-- 
cgit v1.2.3


From 9c4397b6ee6d1a2a2c43d5d886b178753a4833d8 Mon Sep 17 00:00:00 2001
From: "Brad Payne (Vir Linden)" <vir@lindenlab.com>
Date: Fri, 14 Nov 2014 15:41:03 -0500
Subject: MAINT-4537 WIP - joint position management during outfit changes

---
 indra/newview/llagentwearables.cpp |  7 ++++++-
 indra/newview/llvoavatarself.cpp   | 18 ++++++++++++------
 indra/newview/llvoavatarself.h     |  1 +
 3 files changed, 19 insertions(+), 7 deletions(-)

(limited to 'indra/newview')

diff --git a/indra/newview/llagentwearables.cpp b/indra/newview/llagentwearables.cpp
index a7acdb0520..964c5110d1 100755
--- a/indra/newview/llagentwearables.cpp
+++ b/indra/newview/llagentwearables.cpp
@@ -1088,7 +1088,6 @@ void LLAgentWearables::setWearableOutfit(const LLInventoryItem::item_array_t& it
 	if (isAgentAvatarValid())
 	{
 		gAgentAvatarp->setCompositeUpdatesEnabled(TRUE);
-		gAgentAvatarp->updateVisualParams();
 
 		// If we have not yet declouded, we may want to use
 		// baked texture UUIDs sent from the first objectUpdate message
@@ -1106,6 +1105,12 @@ void LLAgentWearables::setWearableOutfit(const LLInventoryItem::item_array_t& it
 
 	notifyLoadingFinished();
 
+	// Have to copy wearable params to avatar
+	gAgentAvatarp->writeWearablesToAvatar();
+
+	// ... before this will do anything.
+	gAgentAvatarp->updateVisualParams();
+
 	gAgentAvatarp->dumpAvatarTEs("setWearableOutfit");
 
 	LL_DEBUGS("Avatar") << "setWearableOutfit() end" << LL_ENDL;
diff --git a/indra/newview/llvoavatarself.cpp b/indra/newview/llvoavatarself.cpp
index 4335df66a1..0be8df349d 100755
--- a/indra/newview/llvoavatarself.cpp
+++ b/indra/newview/llvoavatarself.cpp
@@ -718,13 +718,8 @@ void LLVOAvatarSelf::updateVisualParams()
 	LLVOAvatar::updateVisualParams();
 }
 
-/*virtual*/
-void LLVOAvatarSelf::idleUpdateAppearanceAnimation()
+void LLVOAvatarSelf::writeWearablesToAvatar()
 {
-	// Animate all top-level wearable visual parameters
-	gAgentWearables.animateAllWearableParams(calcMorphAmount());
-
-	// apply wearable visual params to avatar
 	for (U32 type = 0; type < LLWearableType::WT_COUNT; type++)
 	{
 		LLWearable *wearable = gAgentWearables.getTopWearable((LLWearableType::EType)type);
@@ -734,6 +729,17 @@ void LLVOAvatarSelf::idleUpdateAppearanceAnimation()
 		}
 	}
 
+}
+
+/*virtual*/
+void LLVOAvatarSelf::idleUpdateAppearanceAnimation()
+{
+	// Animate all top-level wearable visual parameters
+	gAgentWearables.animateAllWearableParams(calcMorphAmount());
+
+	// Apply wearable visual params to avatar
+	writeWearablesToAvatar();
+
 	//allow avatar to process updates
 	LLVOAvatar::idleUpdateAppearanceAnimation();
 
diff --git a/indra/newview/llvoavatarself.h b/indra/newview/llvoavatarself.h
index a9c01933b7..13ffc057b0 100755
--- a/indra/newview/llvoavatarself.h
+++ b/indra/newview/llvoavatarself.h
@@ -90,6 +90,7 @@ public:
 	/*virtual*/ BOOL setVisualParamWeight(const char* param_name, F32 weight);
 	/*virtual*/ BOOL setVisualParamWeight(S32 index, F32 weight);
 	/*virtual*/ void updateVisualParams();
+	void writeWearablesToAvatar();
 	/*virtual*/ void idleUpdateAppearanceAnimation();
 
 private:
-- 
cgit v1.2.3


From b1884d40f5ba74d1d39be1abad7dc416905c6caf Mon Sep 17 00:00:00 2001
From: "Brad Payne (Vir Linden)" <vir@lindenlab.com>
Date: Sat, 15 Nov 2014 14:29:39 -0500
Subject: MAINT-4537 WIP - more joint position management during outfit changes

---
 indra/newview/llagentwearables.cpp | 21 ++-------
 indra/newview/llagentwearables.h   |  2 +-
 indra/newview/llappearancemgr.cpp  | 14 +++++-
 indra/newview/llvoavatar.cpp       | 93 ++++++++++++++++++++++++++++++++++++++
 indra/newview/llvoavatar.h         |  2 +
 indra/newview/llvovolume.cpp       | 59 ++----------------------
 6 files changed, 117 insertions(+), 74 deletions(-)

(limited to 'indra/newview')

diff --git a/indra/newview/llagentwearables.cpp b/indra/newview/llagentwearables.cpp
index 964c5110d1..585f14df3d 100755
--- a/indra/newview/llagentwearables.cpp
+++ b/indra/newview/llagentwearables.cpp
@@ -1257,6 +1257,7 @@ void LLAgentWearables::userRemoveWearablesOfType(const LLWearableType::EType &ty
 // removed, and what additional inventory items need to be added.
 void LLAgentWearables::findAttachmentsAddRemoveInfo(LLInventoryModel::item_array_t& obj_item_array,
 													llvo_vec_t& objects_to_remove,
+													llvo_vec_t& objects_to_retain,
 													LLInventoryModel::item_array_t& items_to_add)
 {
 	// Possible cases:
@@ -1310,6 +1311,7 @@ void LLAgentWearables::findAttachmentsAddRemoveInfo(LLInventoryModel::item_array
 				{
 					// LL_INFOS() << "found object to keep, id " << objectp->getID() << ", item " << objectp->getAttachmentItemID() << LL_ENDL;
 					current_item_ids.insert(object_item_id);
+					objects_to_retain.push_back(objectp);
 				}
 			}
 		}
@@ -1335,23 +1337,6 @@ void LLAgentWearables::findAttachmentsAddRemoveInfo(LLInventoryModel::item_array
 	// LL_INFOS() << "remove " << remove_count << " add " << add_count << LL_ENDL;
 }
 
-// Combines userRemoveMulipleAttachments() and userAttachMultipleAttachments() logic to
-// get attachments into desired state with minimal number of adds/removes.
-void LLAgentWearables::userUpdateAttachments(LLInventoryModel::item_array_t& obj_item_array)
-{
-	llvo_vec_t objects_to_remove;
-	LLInventoryModel::item_array_t items_to_add;
-	findAttachmentsAddRemoveInfo(obj_item_array,
-								 objects_to_remove,
-								 items_to_add);
-
-	// Remove everything in objects_to_remove
-	userRemoveMultipleAttachments(objects_to_remove);
-
-	// Add everything in items_to_add
-	userAttachMultipleAttachments(items_to_add);
-}
-
 void LLAgentWearables::userRemoveMultipleAttachments(llvo_vec_t& objects_to_remove)
 {
 	if (!isAgentAvatarValid()) return;
@@ -1369,7 +1354,7 @@ void LLAgentWearables::userRemoveMultipleAttachments(llvo_vec_t& objects_to_remo
 		 ++it)
 	{
 		LLViewerObject *objectp = *it;
-		gAgentAvatarp->resetJointPositionsOnDetach(objectp);
+		//gAgentAvatarp->resetJointPositionsOnDetach(objectp);
 		gMessageSystem->nextBlockFast(_PREHASH_ObjectData);
 		gMessageSystem->addU32Fast(_PREHASH_ObjectLocalID, objectp->getLocalID());
 	}
diff --git a/indra/newview/llagentwearables.h b/indra/newview/llagentwearables.h
index 10e3dbf8c6..1004482020 100755
--- a/indra/newview/llagentwearables.h
+++ b/indra/newview/llagentwearables.h
@@ -180,8 +180,8 @@ public:
 
 	static void     findAttachmentsAddRemoveInfo(LLInventoryModel::item_array_t& obj_item_array,
 												 llvo_vec_t& objects_to_remove,
+												 llvo_vec_t& objects_to_retain,
 												 LLInventoryModel::item_array_t& items_to_add);
-	static void 	userUpdateAttachments(LLInventoryModel::item_array_t& obj_item_array);
 	static void		userRemoveMultipleAttachments(llvo_vec_t& llvo_array);
 	static void		userAttachMultipleAttachments(LLInventoryModel::item_array_t& obj_item_array);
 
diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp
index 69efb20f79..943190e7b1 100755
--- a/indra/newview/llappearancemgr.cpp
+++ b/indra/newview/llappearancemgr.cpp
@@ -809,22 +809,34 @@ void LLWearableHoldingPattern::onAllComplete()
 
 	LL_DEBUGS("Avatar") << self_av_string() << "Updating " << mObjItems.size() << " attachments" << LL_ENDL;
 	LLAgentWearables::llvo_vec_t objects_to_remove;
+	LLAgentWearables::llvo_vec_t objects_to_retain;
 	LLInventoryModel::item_array_t items_to_add;
 	if (isAgentAvatarValid())
 	{
 		LLAgentWearables::findAttachmentsAddRemoveInfo(mObjItems,
 													   objects_to_remove,
+													   objects_to_retain,
 													   items_to_add);
 
 		LL_DEBUGS("Avatar") << self_av_string() << "Removing " << objects_to_remove.size()
 							<< " attachments" << LL_ENDL;
+		gAgentAvatarp->clearAttachmentPosOverrides();
 		LLAgentWearables::userRemoveMultipleAttachments(objects_to_remove);
 	}
 
 	// Update wearables.
 	LL_INFOS("Avatar") << self_av_string() << "HP " << index() << " updating agent wearables with " << mResolved << " wearable items " << LL_ENDL;
 	LLAppearanceMgr::instance().updateAgentWearables(this);
-	
+
+	// Restore attachment pos overrides for the attachments that aren't going away.
+	for (LLAgentWearables::llvo_vec_t::iterator it = objects_to_retain.begin();
+		it != objects_to_retain.end();
+		++it)
+	{
+		LLViewerObject *objectp = *it;
+		gAgentAvatarp->addAttachmentPosOverridesForObject(objectp);
+	}
+
 	// Update attachments to match those requested.
 	if (isAgentAvatarValid())
 	{
diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp
index 646ca25a0e..835c4e6176 100755
--- a/indra/newview/llvoavatar.cpp
+++ b/indra/newview/llvoavatar.cpp
@@ -5061,6 +5061,99 @@ bool LLVOAvatar::getRiggedMeshID(LLViewerObject* pVO, LLUUID& mesh_id)
 	return false;
 }
 
+void LLVOAvatar::clearAttachmentPosOverrides()
+{
+	//Subsequent joints are relative to pelvis
+	avatar_joint_list_t::iterator iter = mSkeleton.begin();
+	avatar_joint_list_t::iterator end  = mSkeleton.end();
+
+	for (; iter != end; ++iter)
+	{
+		LLJoint* pJoint = (*iter);
+		pJoint->clearAttachmentPosOverrides();
+	}
+}
+
+//-----------------------------------------------------------------------------
+// addAttachmentPosOverridesForObject
+//-----------------------------------------------------------------------------
+void LLVOAvatar::addAttachmentPosOverridesForObject(LLViewerObject *vo)
+{
+	LLVOAvatar *av = vo->getAvatarAncestor();
+	if (!av || (av != this))
+	{
+		LL_WARNS("Avatar") << "called with invalid avatar" << LL_ENDL;
+	}
+		
+	// Process all children
+	LLViewerObject::const_child_list_t& children = vo->getChildren();
+	for (LLViewerObject::const_child_list_t::const_iterator it = children.begin();
+		 it != children.end(); ++it)
+	{
+		LLViewerObject *childp = *it;
+		addAttachmentPosOverridesForObject(childp);
+	}
+
+	LLVOVolume *vobj = dynamic_cast<LLVOVolume*>(vo);
+	bool pelvisGotSet = false;
+
+	if (!vobj)
+	{
+		return;
+	}
+	if (vobj->isMesh() &&
+		((vobj->getVolume() && !vobj->getVolume()->isMeshAssetLoaded()) || !gMeshRepo.meshRezEnabled()))
+	{
+		return;
+	}
+	LLUUID currentId = vobj->getVolume()->getParams().getSculptID();						
+	const LLMeshSkinInfo*  pSkinData = gMeshRepo.getSkinInfo( currentId, vobj );
+
+	if ( vobj && vobj->isAttachment() && vobj->isMesh() && pSkinData )
+	{
+		const int bindCnt = pSkinData->mAlternateBindMatrix.size();								
+		if ( bindCnt > 0 )
+		{					
+			const int jointCnt = pSkinData->mJointNames.size();
+			const F32 pelvisZOffset = pSkinData->mPelvisOffset;
+			const LLUUID& mesh_id = pSkinData->mMeshID;
+			bool fullRig = (jointCnt>=JOINT_COUNT_REQUIRED_FOR_FULLRIG) ? true : false;								
+			if ( fullRig )
+			{								
+				for ( int i=0; i<jointCnt; ++i )
+				{
+					std::string lookingForJoint = pSkinData->mJointNames[i].c_str();
+					LLJoint* pJoint = getJoint( lookingForJoint );
+					if ( pJoint && pJoint->getId() != currentId )
+					{   									
+						pJoint->setId( currentId );
+						const LLVector3& jointPos = pSkinData->mAlternateBindMatrix[i].getTranslation();									
+						//Set the joint position
+						pJoint->addAttachmentPosOverride( jointPos, mesh_id, avString() );
+									
+						//If joint is a pelvis then handle old/new pelvis to foot values
+						if ( lookingForJoint == "mPelvis" )
+						{	
+							pelvisGotSet = true;											
+						}										
+					}										
+				}																
+				if (pelvisZOffset != 0.0F)
+				{
+					addPelvisFixup( pelvisZOffset, mesh_id );
+					pelvisGotSet = true;											
+				}
+			}							
+		}
+	}
+					
+	//Rebuild body data if we altered joints/pelvis
+	if ( pelvisGotSet ) 
+	{
+		postPelvisSetRecalc();
+	}		
+}
+
 //-----------------------------------------------------------------------------
 // resetJointPositionsOnDetach
 //-----------------------------------------------------------------------------
diff --git a/indra/newview/llvoavatar.h b/indra/newview/llvoavatar.h
index ce1f0dd152..9a2aaf8aa3 100755
--- a/indra/newview/llvoavatar.h
+++ b/indra/newview/llvoavatar.h
@@ -199,8 +199,10 @@ public:
 
 	virtual LLJoint*		getJoint(const std::string &name);
 	
+	void 					addAttachmentPosOverridesForObject(LLViewerObject *vo);
 	void					resetJointPositionsOnDetach(const LLUUID& mesh_id);
 	void					resetJointPositionsOnDetach(LLViewerObject *vo);
+	void					clearAttachmentPosOverrides();
 	
 	/*virtual*/ const LLUUID&	getID() const;
 	/*virtual*/ void			addDebugText(const std::string& text);
diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp
index aebd9f470d..5707d373bf 100755
--- a/indra/newview/llvovolume.cpp
+++ b/indra/newview/llvovolume.cpp
@@ -4517,7 +4517,9 @@ void LLVolumeGeometryManager::rebuildGeom(LLSpatialGroup* group)
 	//Determine if we've received skininfo that contains an
 	//alternate bind matrix - if it does then apply the translational component
 	//to the joints of the avatar.
+#if 0
 	bool pelvisGotSet = false;
+#endif
 
 	{
 		LL_RECORD_BLOCK_TIME(FTM_REBUILD_VOLUME_FACE_LIST);
@@ -4602,55 +4604,12 @@ void LLVolumeGeometryManager::rebuildGeom(LLSpatialGroup* group)
 					//get drawpool of avatar with rigged face
 					LLDrawPoolAvatar* pool = get_avatar_drawpool(vobj);				
 					
+					// FIXME should this be inside the face loop?
+					// doesn't seem to depend on any per-face state.
 					if ( pAvatarVO )
 					{
-						LLUUID currentId = vobj->getVolume()->getParams().getSculptID();						
-						const LLMeshSkinInfo*  pSkinData = gMeshRepo.getSkinInfo( currentId, vobj );
-						if ( pSkinData )
-						{
-							const int bindCnt = pSkinData->mAlternateBindMatrix.size();								
-							if ( bindCnt > 0 )
-							{					
-								const int jointCnt = pSkinData->mJointNames.size();
-								const F32 pelvisZOffset = pSkinData->mPelvisOffset;
-								const LLUUID& mesh_id = pSkinData->mMeshID;
-								bool fullRig = (jointCnt>=JOINT_COUNT_REQUIRED_FOR_FULLRIG) ? true : false;								
-								if ( fullRig )
-								{								
-									for ( int i=0; i<jointCnt; ++i )
-									{
-										std::string lookingForJoint = pSkinData->mJointNames[i].c_str();
-										LLJoint* pJoint = pAvatarVO->getJoint( lookingForJoint );
-										if ( pJoint && pJoint->getId() != currentId )
-										{   									
-											pJoint->setId( currentId );
-											const LLVector3& jointPos = pSkinData->mAlternateBindMatrix[i].getTranslation();									
-											
-											//Set the joint position
-											pJoint->addAttachmentPosOverride( jointPos, mesh_id, pAvatarVO->avString() );
-									
-											//If joint is a pelvis then handle old/new pelvis to foot values
-											if ( lookingForJoint == "mPelvis" )
-											{	
-												pelvisGotSet = true;											
-											}										
-										}										
-									}																
-									if (pelvisZOffset != 0.0F)
-									{
-										pAvatarVO->addPelvisFixup( pelvisZOffset, mesh_id );
-										pelvisGotSet = true;											
-									}
-								}							
-							}
-						}
+						pAvatarVO->addAttachmentPosOverridesForObject(vobj);
 					}
-					
-					//Rebuild body data if we altered joints/pelvis
-					if ( pelvisGotSet && pAvatarVO ) 
-					{
-						pAvatarVO->postPelvisSetRecalc();
-					}		
 
 					if (pool)
 					{
@@ -5008,14 +4967,6 @@ void LLVolumeGeometryManager::rebuildGeom(LLSpatialGroup* group)
 			}
 			
 		}
-
-		
-		
-			
-		
-					
-
-		
 	}
 
 	group->mBufferUsage = useage;
-- 
cgit v1.2.3


From 7b6131fbf9c083d7d81f5f791ffe104df4f40aa3 Mon Sep 17 00:00:00 2001
From: "Brad Payne (Vir Linden)" <vir@lindenlab.com>
Date: Sat, 15 Nov 2014 14:36:30 -0500
Subject: MAINT-4537 WIP - comments and cleanup

---
 indra/newview/llagentwearables.cpp |  4 +--
 indra/newview/llappearancemgr.cpp  | 51 ++++++++++++++++++++++----------------
 2 files changed, 31 insertions(+), 24 deletions(-)

(limited to 'indra/newview')

diff --git a/indra/newview/llagentwearables.cpp b/indra/newview/llagentwearables.cpp
index 585f14df3d..f06ffb4fb3 100755
--- a/indra/newview/llagentwearables.cpp
+++ b/indra/newview/llagentwearables.cpp
@@ -1105,10 +1105,10 @@ void LLAgentWearables::setWearableOutfit(const LLInventoryItem::item_array_t& it
 
 	notifyLoadingFinished();
 
-	// Have to copy wearable params to avatar
+	// Copy wearable params to avatar.
 	gAgentAvatarp->writeWearablesToAvatar();
 
-	// ... before this will do anything.
+	// Then update the avatar based on the copied params.
 	gAgentAvatarp->updateVisualParams();
 
 	gAgentAvatarp->dumpAvatarTEs("setWearableOutfit");
diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp
index 943190e7b1..e6cf048cec 100755
--- a/indra/newview/llappearancemgr.cpp
+++ b/indra/newview/llappearancemgr.cpp
@@ -807,12 +807,13 @@ void LLWearableHoldingPattern::onAllComplete()
 		}
 	}
 
-	LL_DEBUGS("Avatar") << self_av_string() << "Updating " << mObjItems.size() << " attachments" << LL_ENDL;
-	LLAgentWearables::llvo_vec_t objects_to_remove;
-	LLAgentWearables::llvo_vec_t objects_to_retain;
-	LLInventoryModel::item_array_t items_to_add;
 	if (isAgentAvatarValid())
 	{
+		LL_DEBUGS("Avatar") << self_av_string() << "Updating " << mObjItems.size() << " attachments" << LL_ENDL;
+		LLAgentWearables::llvo_vec_t objects_to_remove;
+		LLAgentWearables::llvo_vec_t objects_to_retain;
+		LLInventoryModel::item_array_t items_to_add;
+
 		LLAgentWearables::findAttachmentsAddRemoveInfo(mObjItems,
 													   objects_to_remove,
 													   objects_to_retain,
@@ -820,26 +821,32 @@ void LLWearableHoldingPattern::onAllComplete()
 
 		LL_DEBUGS("Avatar") << self_av_string() << "Removing " << objects_to_remove.size()
 							<< " attachments" << LL_ENDL;
-		gAgentAvatarp->clearAttachmentPosOverrides();
-		LLAgentWearables::userRemoveMultipleAttachments(objects_to_remove);
-	}
 
-	// Update wearables.
-	LL_INFOS("Avatar") << self_av_string() << "HP " << index() << " updating agent wearables with " << mResolved << " wearable items " << LL_ENDL;
-	LLAppearanceMgr::instance().updateAgentWearables(this);
-
-	// Restore attachment pos overrides for the attachments that aren't going away.
-	for (LLAgentWearables::llvo_vec_t::iterator it = objects_to_retain.begin();
-		it != objects_to_retain.end();
-		++it)
-	{
-		LLViewerObject *objectp = *it;
-		gAgentAvatarp->addAttachmentPosOverridesForObject(objectp);
-	}
+		// Here we remove the attachment pos overrides for *all*
+		// attachments, even those that are not being removed. This is
+		// needed to get joint positions all slammed down to their
+		// pre-attachment states.
+		gAgentAvatarp->clearAttachmentPosOverrides();
 
-	// Update attachments to match those requested.
-	if (isAgentAvatarValid())
-	{
+		// Take off the attachments that will no longer be in the outfit.
+		LLAgentWearables::userRemoveMultipleAttachments(objects_to_remove);
+		
+		// Update wearables.
+		LL_INFOS("Avatar") << self_av_string() << "HP " << index() << " updating agent wearables with "
+						   << mResolved << " wearable items " << LL_ENDL;
+		LLAppearanceMgr::instance().updateAgentWearables(this);
+		
+		// Restore attachment pos overrides for the attachments that
+		// are remaining in the outfit.
+		for (LLAgentWearables::llvo_vec_t::iterator it = objects_to_retain.begin();
+			 it != objects_to_retain.end();
+			 ++it)
+		{
+			LLViewerObject *objectp = *it;
+			gAgentAvatarp->addAttachmentPosOverridesForObject(objectp);
+		}
+		
+		// Add new attachments to match those requested.
 		LL_DEBUGS("Avatar") << self_av_string() << "Adding " << items_to_add.size() << " attachments" << LL_ENDL;
 		LLAgentWearables::userAttachMultipleAttachments(items_to_add);
 	}
-- 
cgit v1.2.3


From 147d1922450f289fe675dc6f0ccce9094db13b38 Mon Sep 17 00:00:00 2001
From: "Brad Payne (Vir Linden)" <vir@lindenlab.com>
Date: Mon, 1 Dec 2014 17:13:35 -0500
Subject: merge fix

---
 indra/newview/llvoavatar.cpp | 68 ++++++++++++++++++++++----------------------
 1 file changed, 34 insertions(+), 34 deletions(-)

(limited to 'indra/newview')

diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp
index eb69458f0e..b54f341c31 100755
--- a/indra/newview/llvoavatar.cpp
+++ b/indra/newview/llvoavatar.cpp
@@ -7773,47 +7773,47 @@ void LLVOAvatar::dumpArchetypeXML(const std::string& prefix, bool group_by_weara
 			}
 		}
 
-	}
-	avatar_joint_list_t::iterator iter = mSkeleton.begin();
-	avatar_joint_list_t::iterator end  = mSkeleton.end();
-	for (; iter != end; ++iter)
-	{
-		LLJoint* pJoint = (*iter);
-		const LLVector3& pos = pJoint->getPosition();
-		const LLVector3& scale = pJoint->getScale();
-		apr_file_printf( file, "\t\t<joint name=\"%s\" position=\"%f %f %f\" scale=\"%f %f %f\"/>\n", 
-						 pJoint->getName().c_str(), pos[0], pos[1], pos[2], scale[0], scale[1], scale[2]);
-	}
+		avatar_joint_list_t::iterator iter = mSkeleton.begin();
+		avatar_joint_list_t::iterator end  = mSkeleton.end();
+		for (; iter != end; ++iter)
+		{
+			LLJoint* pJoint = (*iter);
+			const LLVector3& pos = pJoint->getPosition();
+			const LLVector3& scale = pJoint->getScale();
+			apr_file_printf( file, "\t\t<joint name=\"%s\" position=\"%f %f %f\" scale=\"%f %f %f\"/>\n", 
+							 pJoint->getName().c_str(), pos[0], pos[1], pos[2], scale[0], scale[1], scale[2]);
+		}
 
-	for (iter = mSkeleton.begin(); iter != end; ++iter)
-	{
-		LLJoint* pJoint = (*iter);
+		for (iter = mSkeleton.begin(); iter != end; ++iter)
+		{
+			LLJoint* pJoint = (*iter);
 		
-		LLVector3 pos;
-		LLUUID mesh_id;
+			LLVector3 pos;
+			LLUUID mesh_id;
 
-		if (pJoint->hasAttachmentPosOverride(pos,mesh_id))
+			if (pJoint->hasAttachmentPosOverride(pos,mesh_id))
+			{
+				apr_file_printf( file, "\t\t<joint_offset name=\"%s\" position=\"%f %f %f\" mesh_id=\"%s\"/>\n", 
+								 pJoint->getName().c_str(), pos[0], pos[1], pos[2], mesh_id.asString().c_str());
+			}
+		}
+		F32 pelvis_fixup;
+		LLUUID mesh_id;
+		if (hasPelvisFixup(pelvis_fixup, mesh_id))
 		{
-			apr_file_printf( file, "\t\t<joint_offset name=\"%s\" position=\"%f %f %f\" mesh_id=\"%s\"/>\n", 
-							 pJoint->getName().c_str(), pos[0], pos[1], pos[2], mesh_id.asString().c_str());
+			apr_file_printf( file, "\t\t<pelvis_fixup z=\"%f\" mesh_id=\"%s\"/>\n", 
+							 pelvis_fixup, mesh_id.asString().c_str());
 		}
-	}
-	F32 pelvis_fixup;
-	LLUUID mesh_id;
-	if (hasPelvisFixup(pelvis_fixup, mesh_id))
-	{
-		apr_file_printf( file, "\t\t<pelvis_fixup z=\"%f\" mesh_id=\"%s\"/>\n", 
-						 pelvis_fixup, mesh_id.asString().c_str());
-	}
 
-	apr_file_printf( file, "\t</archetype>\n" );
-	apr_file_printf( file, "\n</linden_genepool>\n" );
+		apr_file_printf( file, "\t</archetype>\n" );
+		apr_file_printf( file, "\n</linden_genepool>\n" );
 
-	bool ultra_verbose = false;
-	if (isSelf() && ultra_verbose)
-	{
-		// show the cloned params inside the wearables as well.
-		gAgentAvatarp->dumpWearableInfo(outfile);
+		bool ultra_verbose = false;
+		if (isSelf() && ultra_verbose)
+		{
+			// show the cloned params inside the wearables as well.
+			gAgentAvatarp->dumpWearableInfo(outfile);
+		}
 	}
 	// File will close when handle goes out of scope
 }
-- 
cgit v1.2.3


From 4ec9bce3c2a715f53938e4568c95b7a2bdfc9e16 Mon Sep 17 00:00:00 2001
From: Oz Linden <oz@lindenlab.com>
Date: Thu, 18 Dec 2014 14:02:41 -0500
Subject: increment viewer version to 3.7.24

---
 indra/newview/VIEWER_VERSION.txt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'indra/newview')

diff --git a/indra/newview/VIEWER_VERSION.txt b/indra/newview/VIEWER_VERSION.txt
index a4de059bbc..f36181278b 100644
--- a/indra/newview/VIEWER_VERSION.txt
+++ b/indra/newview/VIEWER_VERSION.txt
@@ -1 +1 @@
-3.7.23
+3.7.24
-- 
cgit v1.2.3