From c5859778bc18ef8114b57b616675de15a8e177cb Mon Sep 17 00:00:00 2001
From: andreykproductengine <andreykproductengine@lindenlab.com>
Date: Fri, 17 Jan 2020 21:08:38 +0200
Subject: SL-379 WIP Joint overrides tab

---
 indra/llcharacter/lljoint.cpp | 4 ++--
 indra/llcharacter/lljoint.h   | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

(limited to 'indra/llcharacter')

diff --git a/indra/llcharacter/lljoint.cpp b/indra/llcharacter/lljoint.cpp
index e2f512f86e..441ef1a352 100644
--- a/indra/llcharacter/lljoint.cpp
+++ b/indra/llcharacter/lljoint.cpp
@@ -510,7 +510,7 @@ void LLJoint::clearAttachmentPosOverrides()
 // getAllAttachmentPosOverrides()
 //--------------------------------------------------------------------
 void LLJoint::getAllAttachmentPosOverrides(S32& num_pos_overrides,
-                                           std::set<LLVector3>& distinct_pos_overrides)
+                                           std::set<LLVector3>& distinct_pos_overrides) const
 {
     num_pos_overrides = m_attachmentPosOverrides.count();
     LLVector3OverrideMap::map_type::const_iterator it = m_attachmentPosOverrides.getMap().begin();
@@ -524,7 +524,7 @@ void LLJoint::getAllAttachmentPosOverrides(S32& num_pos_overrides,
 // getAllAttachmentScaleOverrides()
 //--------------------------------------------------------------------
 void LLJoint::getAllAttachmentScaleOverrides(S32& num_scale_overrides,
-                                             std::set<LLVector3>& distinct_scale_overrides)
+                                             std::set<LLVector3>& distinct_scale_overrides) const
 {
     num_scale_overrides = m_attachmentScaleOverrides.count();
     LLVector3OverrideMap::map_type::const_iterator it = m_attachmentScaleOverrides.getMap().begin();
diff --git a/indra/llcharacter/lljoint.h b/indra/llcharacter/lljoint.h
index 8112d246f2..6f69786f53 100644
--- a/indra/llcharacter/lljoint.h
+++ b/indra/llcharacter/lljoint.h
@@ -287,9 +287,9 @@ public:
     void showAttachmentScaleOverrides(const std::string& av_info) const;
 
     void getAllAttachmentPosOverrides(S32& num_pos_overrides,
-                                      std::set<LLVector3>& distinct_pos_overrides);
+                                      std::set<LLVector3>& distinct_pos_overrides) const;
     void getAllAttachmentScaleOverrides(S32& num_scale_overrides,
-                                        std::set<LLVector3>& distinct_scale_overrides);
+                                        std::set<LLVector3>& distinct_scale_overrides) const;
     
     // These are used in checks of whether a pos/scale override is considered significant.
     bool aboveJointPosThreshold(const LLVector3& pos) const;
-- 
cgit v1.2.3


From 6a3cb73009bccdef6ae1fbb5d8b632f90343ad91 Mon Sep 17 00:00:00 2001
From: Andrey Kleshchev <andreykproductengine@lindenlab.com>
Date: Mon, 10 Feb 2020 18:29:52 +0200
Subject: SL-379 Joint overrides tab

---
 indra/llcharacter/lljoint.cpp | 2 +-
 indra/llcharacter/lljoint.h   | 2 ++
 2 files changed, 3 insertions(+), 1 deletion(-)

(limited to 'indra/llcharacter')

diff --git a/indra/llcharacter/lljoint.cpp b/indra/llcharacter/lljoint.cpp
index 441ef1a352..bf99db2ce4 100644
--- a/indra/llcharacter/lljoint.cpp
+++ b/indra/llcharacter/lljoint.cpp
@@ -407,7 +407,7 @@ void showJointScaleOverrides( const LLJoint& joint, const std::string& note, con
 bool LLJoint::aboveJointPosThreshold(const LLVector3& pos) const
 {
     LLVector3 diff = pos - getDefaultPosition();
-	const F32 max_joint_pos_offset = 0.0001f; // 0.1 mm
+    const F32 max_joint_pos_offset = LL_JOINT_TRESHOLD_POS_OFFSET; // 0.1 mm
 	return diff.lengthSquared() > max_joint_pos_offset * max_joint_pos_offset;
 }
 
diff --git a/indra/llcharacter/lljoint.h b/indra/llcharacter/lljoint.h
index 6f69786f53..79d9637f21 100644
--- a/indra/llcharacter/lljoint.h
+++ b/indra/llcharacter/lljoint.h
@@ -53,6 +53,8 @@ const U32 LL_FACE_JOINT_NUM = (LL_CHARACTER_MAX_ANIMATED_JOINTS-2);
 const S32 LL_CHARACTER_MAX_PRIORITY = 7;
 const F32 LL_MAX_PELVIS_OFFSET = 5.f;
 
+const F32 LL_JOINT_TRESHOLD_POS_OFFSET = 0.0001f; //0.1 mm
+
 class LLVector3OverrideMap
 {
 public:
-- 
cgit v1.2.3