summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--indra/llcharacter/lljoint.cpp28
-rw-r--r--indra/llcharacter/lljoint.h5
-rw-r--r--indra/newview/llvoavatar.cpp24
-rw-r--r--indra/newview/llvovolume.cpp2
4 files changed, 49 insertions, 10 deletions
diff --git a/indra/llcharacter/lljoint.cpp b/indra/llcharacter/lljoint.cpp
index 8d101ff1fc..6ea2953e89 100644
--- a/indra/llcharacter/lljoint.cpp
+++ b/indra/llcharacter/lljoint.cpp
@@ -515,6 +515,34 @@ void LLJoint::clearAttachmentPosOverrides()
}
//--------------------------------------------------------------------
+// getAllAttachmentPosOverrides()
+//--------------------------------------------------------------------
+void LLJoint::getAllAttachmentPosOverrides(S32& num_pos_overrides,
+ std::set<LLVector3>& distinct_pos_overrides)
+{
+ num_pos_overrides = m_attachmentPosOverrides.count();
+ LLVector3OverrideMap::map_type::const_iterator it = m_attachmentPosOverrides.getMap().begin();
+ for (; it != m_attachmentPosOverrides.getMap().end(); ++it)
+ {
+ distinct_pos_overrides.insert(it->second);
+ }
+}
+
+//--------------------------------------------------------------------
+// getAllAttachmentScaleOverrides()
+//--------------------------------------------------------------------
+void LLJoint::getAllAttachmentScaleOverrides(S32& num_scale_overrides,
+ std::set<LLVector3>& distinct_scale_overrides)
+{
+ num_scale_overrides = m_attachmentScaleOverrides.count();
+ LLVector3OverrideMap::map_type::const_iterator it = m_attachmentScaleOverrides.getMap().begin();
+ for (; it != m_attachmentScaleOverrides.getMap().end(); ++it)
+ {
+ distinct_scale_overrides.insert(it->second);
+ }
+}
+
+//--------------------------------------------------------------------
// showAttachmentPosOverrides()
//--------------------------------------------------------------------
void LLJoint::showAttachmentPosOverrides(const std::string& av_info) const
diff --git a/indra/llcharacter/lljoint.h b/indra/llcharacter/lljoint.h
index 42c2c6f1ad..b2df90dc92 100644
--- a/indra/llcharacter/lljoint.h
+++ b/indra/llcharacter/lljoint.h
@@ -278,6 +278,11 @@ public:
void clearAttachmentScaleOverrides();
void showAttachmentScaleOverrides(const std::string& av_info) const;
+ void getAllAttachmentPosOverrides(S32& num_pos_overrides,
+ std::set<LLVector3>& distinct_pos_overrides);
+ void getAllAttachmentScaleOverrides(S32& num_scale_overrides,
+ std::set<LLVector3>& distinct_scale_overrides);
+
// 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;
diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp
index d7d6d875f6..ec90321139 100644
--- a/indra/newview/llvoavatar.cpp
+++ b/indra/newview/llvoavatar.cpp
@@ -7684,12 +7684,10 @@ void dump_visual_param(apr_file_t* file, LLVisualParam* viewer_param, F32 value)
wtype = vparam->getWearableType();
}
S32 u8_value = F32_to_U8(value,viewer_param->getMinWeight(),viewer_param->getMaxWeight());
- apr_file_printf(file, "\t\t<param id=\"%d\" name=\"%s\" value=\"%.3f\" u8=\"%d\" type=\"%s\" wearable=\"%s\" group=\"%d\"/>\n",
- viewer_param->getID(), viewer_param->getName().c_str(), value, u8_value, type_string.c_str(),
+ apr_file_printf(file, "\t\t<param id=\"%d\" name=\"%s\" display=\"%s\" value=\"%.3f\" u8=\"%d\" type=\"%s\" wearable=\"%s\" group=\"%d\"/>\n",
+ viewer_param->getID(), viewer_param->getName().c_str(), viewer_param->getDisplayName().c_str(), value, u8_value, type_string.c_str(),
LLWearableType::getTypeName(LLWearableType::EType(wtype)).c_str(),
- viewer_param->getGroup()
-// param_location_name(vparam->getParamLocation()).c_str()
- );
+ viewer_param->getGroup());
}
@@ -8554,8 +8552,12 @@ void LLVOAvatar::dumpArchetypeXML(const std::string& prefix, bool group_by_weara
if (pJoint && 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());
+ S32 num_pos_overrides;
+ std::set<LLVector3> distinct_pos_overrides;
+ pJoint->getAllAttachmentPosOverrides(num_pos_overrides, distinct_pos_overrides);
+ apr_file_printf( file, "\t\t<joint_offset name=\"%s\" position=\"%f %f %f\" mesh_id=\"%s\" count=\"%d\" distinct=\"%d\"/>\n",
+ pJoint->getName().c_str(), pos[0], pos[1], pos[2], mesh_id.asString().c_str(),
+ num_pos_overrides, distinct_pos_overrides.size());
}
}
// Joint scale overrides
@@ -8569,8 +8571,12 @@ void LLVOAvatar::dumpArchetypeXML(const std::string& prefix, bool group_by_weara
if (pJoint && 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());
+ S32 num_scale_overrides;
+ std::set<LLVector3> distinct_scale_overrides;
+ pJoint->getAllAttachmentPosOverrides(num_scale_overrides, distinct_scale_overrides);
+ apr_file_printf( file, "\t\t<joint_scale name=\"%s\" scale=\"%f %f %f\" mesh_id=\"%s\" count=\"%d\" distinct=\"%d\"/>\n",
+ pJoint->getName().c_str(), scale[0], scale[1], scale[2], mesh_id.asString().c_str(),
+ num_scale_overrides, distinct_scale_overrides.size());
}
}
F32 pelvis_fixup;
diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp
index d9877d6def..5b3354a472 100644
--- a/indra/newview/llvovolume.cpp
+++ b/indra/newview/llvovolume.cpp
@@ -4779,7 +4779,7 @@ void LLVolumeGeometryManager::rebuildGeom(LLSpatialGroup* group)
if (rigged && pAvatarVO)
{
pAvatarVO->addAttachmentOverridesForObject(vobj);
- if (debugLoggingEnabled("AvatarAttachments") && pAvatarVO->isSelf())
+ if (!LLApp::isExiting() && pAvatarVO->isSelf() && debugLoggingEnabled("AvatarAttachments"))
{
bool verbose = true;
pAvatarVO->showAttachmentOverrides(verbose);