summaryrefslogtreecommitdiff
path: root/indra/newview/llvoavatar.cpp
diff options
context:
space:
mode:
authorNyx Linden <nyx@lindenlab.com>2013-02-28 17:26:14 -0500
committerNyx Linden <nyx@lindenlab.com>2013-02-28 17:26:14 -0500
commit3005bdf7aa628953bf640c1ab69ea7299b5876b1 (patch)
tree3dead4cf3b5d4108a963cfb0fded739bd74422e0 /indra/newview/llvoavatar.cpp
parentd1c144519306cae7eff7f781417482c85068988c (diff)
parent105c286bf3906a17d4c8560573e81b09fc29086b (diff)
merge
Diffstat (limited to 'indra/newview/llvoavatar.cpp')
-rwxr-xr-xindra/newview/llvoavatar.cpp57
1 files changed, 31 insertions, 26 deletions
diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp
index aa90cbc5d2..f6fd8b2409 100755
--- a/indra/newview/llvoavatar.cpp
+++ b/indra/newview/llvoavatar.cpp
@@ -190,11 +190,6 @@ enum ERenderName
RENDER_NAME_FADE
};
-
-// Utility func - FIXME move out of avatar.
-std::string get_sequential_numbered_file_name(const std::string& prefix,
- const std::string& suffix);
-
//-----------------------------------------------------------------------------
// Callback data
//-----------------------------------------------------------------------------
@@ -215,6 +210,24 @@ struct LLTextureMaskData
**
**/
+struct LLAppearanceMessageContents
+{
+ LLAppearanceMessageContents():
+ mAppearanceVersion(-1),
+ mParamAppearanceVersion(-1),
+ mCOFVersion(LLViewerInventoryCategory::VERSION_UNKNOWN)
+ {
+ }
+ LLTEContents mTEContents;
+ S32 mAppearanceVersion;
+ S32 mParamAppearanceVersion;
+ S32 mCOFVersion;
+ // For future use:
+ //U32 appearance_flags = 0;
+ std::vector<F32> mParamWeights;
+ std::vector<LLVisualParam*> mParams;
+};
+
//-----------------------------------------------------------------------------
// class LLBodyNoiseMotion
//-----------------------------------------------------------------------------
@@ -6732,10 +6745,11 @@ void dump_visual_param(apr_file_t* file, LLVisualParam* viewer_param, F32 value)
void LLVOAvatar::dumpAppearanceMsgParams( const std::string& dump_prefix,
- const std::vector<F32>& params_for_dump,
- const LLTEContents& tec)
+ const LLAppearanceMessageContents& contents)
{
std::string outfilename = get_sequential_numbered_file_name(dump_prefix,".xml");
+ const std::vector<F32>& params_for_dump = contents.mParamWeights;
+ const LLTEContents& tec = contents.mTEContents;
LLAPRFile outfile;
std::string fullpath = gDirUtilp->getExpandedFilename(LL_PATH_LOGS,outfilename);
@@ -6750,7 +6764,12 @@ void LLVOAvatar::dumpAppearanceMsgParams( const std::string& dump_prefix,
LL_DEBUGS("Avatar") << "dumping appearance message to " << fullpath << llendl;
}
+ apr_file_printf(file, "<header>\n");
+ apr_file_printf(file, "\t\t<cof_version %i />\n", contents.mCOFVersion);
+ apr_file_printf(file, "\t\t<appearance_version %i />\n", contents.mAppearanceVersion);
+ apr_file_printf(file, "</header>\n");
+ apr_file_printf(file, "\n<params>\n");
LLVisualParam* param = getFirstVisualParam();
for (S32 i = 0; i < params_for_dump.size(); i++)
{
@@ -6763,32 +6782,18 @@ void LLVOAvatar::dumpAppearanceMsgParams( const std::string& dump_prefix,
dump_visual_param(file, viewer_param, value);
param = getNextVisualParam();
}
+ apr_file_printf(file, "</params>\n");
+
+ apr_file_printf(file, "\n<textures>\n");
for (U32 i = 0; i < tec.face_count; i++)
{
std::string uuid_str;
((LLUUID*)tec.image_data)[i].toString(uuid_str);
apr_file_printf( file, "\t\t<texture te=\"%i\" uuid=\"%s\"/>\n", i, uuid_str.c_str());
}
+ apr_file_printf(file, "</textures>\n");
}
-struct LLAppearanceMessageContents
-{
- LLAppearanceMessageContents():
- mAppearanceVersion(-1),
- mParamAppearanceVersion(-1),
- mCOFVersion(LLViewerInventoryCategory::VERSION_UNKNOWN)
- {
- }
- LLTEContents mTEContents;
- S32 mAppearanceVersion;
- S32 mParamAppearanceVersion;
- S32 mCOFVersion;
- // For future use:
- //U32 appearance_flags = 0;
- std::vector<F32> mParamWeights;
- std::vector<LLVisualParam*> mParams;
-};
-
void LLVOAvatar::parseAppearanceMessage(LLMessageSystem* mesgsys, LLAppearanceMessageContents& contents)
{
parseTEMessage(mesgsys, _PREHASH_ObjectData, -1, contents.mTEContents);
@@ -6927,7 +6932,7 @@ void LLVOAvatar::processAvatarAppearance( LLMessageSystem* mesgsys )
parseAppearanceMessage(mesgsys, contents);
if (enable_verbose_dumps)
{
- dumpAppearanceMsgParams(dump_prefix + "appearance_msg", contents.mParamWeights, contents.mTEContents);
+ dumpAppearanceMsgParams(dump_prefix + "appearance_msg", contents);
}
S32 appearance_version;