summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xindra/llcharacter/llvisualparam.cpp12
-rwxr-xr-xindra/llcharacter/llvisualparam.h2
-rwxr-xr-xindra/newview/llvoavatar.cpp12
-rwxr-xr-xindra/newview/llvoavatarself.cpp35
-rwxr-xr-xindra/newview/llvoavatarself.h1
5 files changed, 60 insertions, 2 deletions
diff --git a/indra/llcharacter/llvisualparam.cpp b/indra/llcharacter/llvisualparam.cpp
index d80dfb8c21..f7cb0f76b7 100755
--- a/indra/llcharacter/llvisualparam.cpp
+++ b/indra/llcharacter/llvisualparam.cpp
@@ -322,6 +322,18 @@ void LLVisualParam::resetDrivenParams()
return;
}
+const std::string param_location_name(const EParamLocation& loc)
+{
+ switch (loc)
+ {
+ case LOC_UNKNOWN: return "unknown";
+ case LOC_AV_SELF: return "self";
+ case LOC_AV_OTHER: return "other";
+ case LOC_WEARABLE: return "wearable";
+ default: return "error";
+ }
+}
+
void LLVisualParam::setParamLocation(EParamLocation loc)
{
if (mParamLocation == LOC_UNKNOWN || loc == LOC_UNKNOWN)
diff --git a/indra/llcharacter/llvisualparam.h b/indra/llcharacter/llvisualparam.h
index 8345990f47..a5864c15ce 100755
--- a/indra/llcharacter/llvisualparam.h
+++ b/indra/llcharacter/llvisualparam.h
@@ -58,6 +58,8 @@ enum EParamLocation
LOC_WEARABLE
};
+const std::string param_location_name(const EParamLocation& loc);
+
const S32 MAX_TRANSMITTED_VISUAL_PARAMS = 255;
//-----------------------------------------------------------------------------
diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp
index 75e71a7613..ae6af96d4a 100755
--- a/indra/newview/llvoavatar.cpp
+++ b/indra/newview/llvoavatar.cpp
@@ -6320,9 +6320,11 @@ 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\"/>\n",
+ apr_file_printf(file, "\t\t<param id=\"%d\" name=\"%s\" value=\"%.3f\" u8=\"%d\" type=\"%s\" wearable=\"%s\" loc=\"%s\"/>\n",
viewer_param->getID(), viewer_param->getName().c_str(), value, u8_value, type_string.c_str(),
- LLWearableType::getTypeName(LLWearableType::EType(wtype)).c_str());
+ LLWearableType::getTypeName(LLWearableType::EType(wtype)).c_str(),
+ param_location_name(vparam->getParamLocation()).c_str()
+ );
}
@@ -6929,6 +6931,12 @@ void LLVOAvatar::dumpArchetypeXML(const std::string& prefix, bool group_by_weara
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);
+ }
// File will close when handle goes out of scope
}
diff --git a/indra/newview/llvoavatarself.cpp b/indra/newview/llvoavatarself.cpp
index a01188d7dc..2b95a38086 100755
--- a/indra/newview/llvoavatarself.cpp
+++ b/indra/newview/llvoavatarself.cpp
@@ -2777,3 +2777,38 @@ void LLVOAvatarSelf::dumpScratchTextureByteCount()
{
llinfos << "Scratch Texture GL: " << (sScratchTexBytes/1024) << "KB" << llendl;
}
+
+void dump_visual_param(apr_file_t* file, LLVisualParam* viewer_param, F32 value);
+
+void LLVOAvatarSelf::dumpWearableInfo(LLAPRFile& outfile)
+{
+ apr_file_t* file = outfile.getFileHandle();
+ if (!file)
+ {
+ return;
+ }
+
+
+ apr_file_printf( file, "\n<wearable_info>\n" );
+
+ LLWearableData *wd = getWearableData();
+ for (S32 type = 0; type < LLWearableType::WT_COUNT; type++)
+ {
+ const std::string& type_name = LLWearableType::getTypeName((LLWearableType::EType)type);
+ for (U32 j=0; j< wd->getWearableCount((LLWearableType::EType)type); j++)
+ {
+ LLViewerWearable *wearable = gAgentWearables.getViewerWearable((LLWearableType::EType)type,j);
+ apr_file_printf( file, "\n\t <wearable type=\"%s\" name=\"%s\"/>\n",
+ type_name.c_str(), wearable->getName().c_str() );
+ LLWearable::visual_param_vec_t v_params;
+ wearable->getVisualParams(v_params);
+ for (LLWearable::visual_param_vec_t::iterator it = v_params.begin();
+ it != v_params.end(); ++it)
+ {
+ LLVisualParam *param = *it;
+ dump_visual_param(file, param, param->getWeight());
+ }
+ }
+ }
+ apr_file_printf( file, "\n</wearable_info>\n" );
+}
diff --git a/indra/newview/llvoavatarself.h b/indra/newview/llvoavatarself.h
index 89bb8bf5c9..eeac5ddaeb 100755
--- a/indra/newview/llvoavatarself.h
+++ b/indra/newview/llvoavatarself.h
@@ -364,6 +364,7 @@ public:
static void dumpTotalLocalTextureByteCount();
void dumpLocalTextures() const;
static void dumpScratchTextureByteCount();
+ void dumpWearableInfo(LLAPRFile& outfile);
//--------------------------------------------------------------------
// Avatar Rez Metrics