diff --git a/indra/llcharacter/lljoint.cpp b/indra/llcharacter/lljoint.cpp
index d2a5c59023cbbd9e7670706b8b8f8092a5749ad3..8d101ff1fcc0c2265330ce957e6bc650069952d8 100644
--- a/indra/llcharacter/lljoint.cpp
+++ b/indra/llcharacter/lljoint.cpp
@@ -404,16 +404,16 @@ void showJointScaleOverrides( const LLJoint& joint, const std::string& note, con
         LL_DEBUGS("Avatar") << av_info << " joint " << joint.getName() << " " << note << " " << os.str() << LL_ENDL;
 }
 
-bool above_joint_pos_threshold(const LLVector3& diff)
+bool LLJoint::aboveJointPosThreshold(const LLVector3& pos) const
 {
-	//return !diff.isNull();
+    LLVector3 diff = pos - getDefaultPosition();
 	const F32 max_joint_pos_offset = 0.0001f; // 0.1 mm
 	return diff.lengthSquared() > max_joint_pos_offset * max_joint_pos_offset;
 }
 
-bool above_joint_scale_threshold(const LLVector3& diff)
+bool LLJoint::aboveJointScaleThreshold(const LLVector3& scale) const
 {
-	//return !diff.isNull();
+    LLVector3 diff = scale - getDefaultScale();
 	const F32 max_joint_scale_offset = 0.0001f; // 0.1 mm
 	return diff.lengthSquared() > max_joint_scale_offset * max_joint_scale_offset;
 }
@@ -434,15 +434,6 @@ void LLJoint::addAttachmentPosOverride( const LLVector3& pos, const LLUUID& mesh
     //{
     //    return;
     //}
-    if (!above_joint_pos_threshold(pos-getDefaultPosition()))
-    {
-        if (do_debug_joint(getName()))
-        {
-            LL_DEBUGS("Avatar") << "Attachment pos override ignored for " << getName()
-                                << ", pos " << pos << " is same as default pos" << LL_ENDL;
-        }
-		return;
-    }
 
     LLVector3 before_pos;
     LLUUID before_mesh_id;
@@ -627,15 +618,6 @@ void LLJoint::addAttachmentScaleOverride( const LLVector3& scale, const LLUUID&
 	{
 		return;
 	}
-    if (!above_joint_scale_threshold(scale-getDefaultScale()))
-    {
-        if (do_debug_joint(getName()))
-        {
-            LL_DEBUGS("Avatar") << "Attachment scale override ignored for " << getName()
-                                << ", scale " << scale << " is same as default scale" << LL_ENDL;
-        }
-		return;
-    }
 	if (!m_attachmentScaleOverrides.count())
 	{
 		if (do_debug_joint(getName()))
diff --git a/indra/llcharacter/lljoint.h b/indra/llcharacter/lljoint.h
index 509523ae4b867a99da6612f612eb853fb99eca23..42c2c6f1adc4b994beb1e51dc69d4f39695851c6 100644
--- a/indra/llcharacter/lljoint.h
+++ b/indra/llcharacter/lljoint.h
@@ -278,6 +278,10 @@ class LLJoint
 	void clearAttachmentScaleOverrides();
     void showAttachmentScaleOverrides(const std::string& av_info) const;
 
+    // These are used in checks of whether a pos/scale override is considered significant.
+    bool aboveJointPosThreshold(const LLVector3& pos) const;
+    bool aboveJointScaleThreshold(const LLVector3& scale) const;
+    
 	//Accessor for the joint id
 	LLUUID getId( void ) { return mId; }
 	//Setter for the joints id
diff --git a/indra/llprimitive/lldaeloader.cpp b/indra/llprimitive/lldaeloader.cpp
index 37ebdf2cec591e252ccbf400c415e840a02aad5d..c194d677c8da8ab144d9c98d550d5fc550df4f0a 100644
--- a/indra/llprimitive/lldaeloader.cpp
+++ b/indra/llprimitive/lldaeloader.cpp
@@ -1379,6 +1379,16 @@ void LLDAELoader::processDomModel(LLModel* model, DAE* dae, daeElement* root, do
 
 		if ( !missingSkeletonOrScene )
 		{
+            // FIXME: mesh_id is used to determine which mesh gets to
+            // set the joint offset, in the event of a conflict. Since
+            // we don't know the mesh id yet, we can't guarantee that
+            // joint offsets will be applied with the same priority as
+            // in the uploaded model. If the file contains multiple
+            // meshes with conflicting joint offsets, preview may be
+            // incorrect.
+            LLUUID fake_mesh_id;
+            fake_mesh_id.generate();
+
 			//Set the joint translations on the avatar
             JointMap :: const_iterator masterJointIt = mJointMap.begin();
             JointMap :: const_iterator masterJointItEnd = mJointMap.end();
@@ -1393,19 +1403,16 @@ void LLDAELoader::processDomModel(LLModel* model, DAE* dae, daeElement* root, do
                     LLJoint* pJoint = mJointLookupFunc(lookingForJoint,mOpaqueData);
                     if ( pJoint )
                     {   
-                        // FIXME: mesh_id is used to determine which
-                        // mesh gets to set the joint offset, in the
-                        // event of a conflict. Since we don't know
-                        // the mesh id yet, we can't guarantee that
-                        // joint offsets will be applied with the same
-                        // priority as in the uploaded model. If the
-                        // file contains multiple meshes with
-                        // conflicting joint offsets, preview may be
-                        // incorrect.
-                        LLUUID fake_mesh_id;
-                        fake_mesh_id.generate();
-                        bool dummy; // not used
-                        pJoint->addAttachmentPosOverride( jointTransform.getTranslation(), fake_mesh_id, "", dummy);
+                        const LLVector3& joint_pos = jointTransform.getTranslation();
+                        if (pJoint->aboveJointPosThreshold(joint_pos))
+                        {
+                            bool override_changed; // not used
+                            pJoint->addAttachmentPosOverride(joint_pos, fake_mesh_id, "", override_changed);
+                            if (model->mSkinInfo.mLockScaleIfJointPosition)
+                            {
+                                pJoint->addAttachmentScaleOverride(pJoint->getDefaultScale(), fake_mesh_id, "");
+                            }
+                        }
                     }
                     else
                     {
diff --git a/indra/llprimitive/llmodel.cpp b/indra/llprimitive/llmodel.cpp
index 398f0997f37011db925579a2cfefdb8f1cc7b54f..cd9e5cfa54a328cabb22e2d2e1abc9d745d8055a 100644
--- a/indra/llprimitive/llmodel.cpp
+++ b/indra/llprimitive/llmodel.cpp
@@ -50,8 +50,12 @@ std::string model_names[] =
 const int MODEL_NAMES_LENGTH = sizeof(model_names) / sizeof(std::string);
 
 LLModel::LLModel(LLVolumeParams& params, F32 detail)
-	: LLVolume(params, detail), mNormalizedScale(1,1,1), mNormalizedTranslation(0,0,0)
-	, mPelvisOffset( 0.0f ), mStatus(NO_ERRORS), mSubmodelID(0)
+	: LLVolume(params, detail), 
+      mNormalizedScale(1,1,1), 
+      mNormalizedTranslation(0,0,0), 
+      mPelvisOffset( 0.0f ), 
+      mStatus(NO_ERRORS), 
+      mSubmodelID(0)
 {
 	mDecompID = -1;
 	mLocalID = -1;
@@ -1446,6 +1450,9 @@ void LLMeshSkinInfo::fromLLSD(LLSD& skin)
 	{
 		mPelvisOffset = skin["pelvis_offset"].asReal();
 	}
+
+    // FIXME BENTO check contents of asset.
+    mLockScaleIfJointPosition = true;
 }
 
 LLSD LLMeshSkinInfo::asLLSD(bool include_joints) const
diff --git a/indra/llprimitive/llmodel.h b/indra/llprimitive/llmodel.h
index 5f98942340a51f1e8c8a43f3138d630c612869d0..fe6ce148c4e156be6433c4184ee1d66401850002 100644
--- a/indra/llprimitive/llmodel.h
+++ b/indra/llprimitive/llmodel.h
@@ -54,6 +54,7 @@ class LLMeshSkinInfo
 	LLSD asLLSD(bool include_joints) const;
 	LLMatrix4 mBindShapeMatrix;
 	float mPelvisOffset;
+    bool mLockScaleIfJointPosition;
 };
 
 class LLModel : public LLVolume
diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp
index 3354678af977b133629ede3f80c2892d1dacc668..7af15fb351e8ff1ec81d4b6dd5722a860aa38cb7 100644
--- a/indra/newview/llvoavatar.cpp
+++ b/indra/newview/llvoavatar.cpp
@@ -5539,16 +5539,25 @@ void LLVOAvatar::addAttachmentOverridesForObject(LLViewerObject *vo)
 					{   									
 						pJoint->setId( currentId );
 						const LLVector3& jointPos = pSkinData->mAlternateBindMatrix[i].getTranslation();									
-                        bool override_changed;
-                        pJoint->addAttachmentPosOverride( jointPos, mesh_id, avString(), override_changed );
-
-                        if (override_changed)
+                        if (pJoint->aboveJointPosThreshold(jointPos))
                         {
-                            //If joint is a pelvis then handle old/new pelvis to foot values
-                            if ( lookingForJoint == "mPelvis" )
-                            {	
-                                pelvisGotSet = true;											
-                            }										
+                            bool override_changed;
+                            pJoint->addAttachmentPosOverride( jointPos, mesh_id, avString(), override_changed );
+                            
+                            if (override_changed)
+                            {
+                                //If joint is a pelvis then handle old/new pelvis to foot values
+                                if ( lookingForJoint == "mPelvis" )
+                                {	
+                                    pelvisGotSet = true;											
+                                }										
+                            }
+                            if (pSkinData->mLockScaleIfJointPosition)
+                            {
+                                // Note that unlike positions, there's no threshold check here,
+                                // just a lock at the default value.
+                                pJoint->addAttachmentScaleOverride(pJoint->getDefaultScale(), mesh_id, avString());
+                            }
                         }
 					}										
 				}																
@@ -5567,25 +5576,6 @@ void LLVOAvatar::addAttachmentOverridesForObject(LLViewerObject *vo)
 				}
 			}							
 		}
-                        // Set the joint scales
-                        // FIXME replace with real logic for finding scale, probably inside the bindcnt loop above
-        const LLUUID& mesh_id = pSkinData->mMeshID;
-		for (int i = 0; i < jointCnt; ++i)
-		{
-			std::string lookingForJoint = pSkinData->mJointNames[i].c_str();
-			LLJoint* pJoint = getJoint(lookingForJoint);
-			if (pJoint)
-			{
-				if (pJoint->getName() == "mCollarRight" ||
-					pJoint->getName() == "mShoulderRight" ||
-					pJoint->getName() == "mElbowRight" ||
-					pJoint->getName() == "mHandRight")
-				{
-					LLVector3 jointScale(2.0f, 2.0f, 2.0f);
-					pJoint->addAttachmentScaleOverride(jointScale, mesh_id, avString());
-				}
-			}
-		}
 	}
 					
 	//Rebuild body data if we altered joints/pelvis
@@ -8491,6 +8481,20 @@ void LLVOAvatar::dumpArchetypeXML(const std::string& prefix, bool group_by_weara
 								 pJoint->getName().c_str(), pos[0], pos[1], pos[2], mesh_id.asString().c_str());
 			}
 		}
+        // Joint scale overrides
+		for (iter = mSkeleton.begin(); iter != end; ++iter)
+		{
+			LLJoint* pJoint = (*iter);
+		
+			LLVector3 scale;
+			LLUUID mesh_id;
+
+			if (pJoint->hasAttachmentScaleOverride(scale,mesh_id))
+			{
+				apr_file_printf( file, "\t\t<joint_scale name=\"%s\" scale=\"%f %f %f\" mesh_id=\"%s\"/>\n", 
+								 pJoint->getName().c_str(), scale[0], scale[1], scale[2], mesh_id.asString().c_str());
+			}
+		}
 		F32 pelvis_fixup;
 		LLUUID mesh_id;
 		if (hasPelvisFixup(pelvis_fixup, mesh_id))