SL-503 - more info in archetype dump files

meow-7.2.2
Brad Payne (Vir Linden) 2016-10-27 09:39:39 -04:00
parent 31e91957db
commit 7447da6943
4 changed files with 49 additions and 10 deletions

View File

@ -514,6 +514,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()
//--------------------------------------------------------------------

View File

@ -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;

View File

@ -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;

View File

@ -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);