summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
Diffstat (limited to 'indra')
-rwxr-xr-xindra/newview/llviewermenu.cpp9
-rwxr-xr-xindra/newview/llvoavatar.cpp37
-rwxr-xr-xindra/newview/llvoavatar.h6
-rwxr-xr-x[-rw-r--r--]indra/newview/skins/default/xui/en/menu_attachment_other.xml8
-rwxr-xr-x[-rw-r--r--]indra/newview/skins/default/xui/en/menu_attachment_self.xml8
-rwxr-xr-x[-rw-r--r--]indra/newview/skins/default/xui/en/menu_avatar_other.xml8
-rwxr-xr-x[-rw-r--r--]indra/newview/skins/default/xui/en/menu_avatar_self.xml16
-rwxr-xr-x[-rw-r--r--]indra/newview/skins/default/xui/en/menu_inspect_avatar_gear.xml8
-rwxr-xr-x[-rw-r--r--]indra/newview/skins/default/xui/en/menu_inspect_self_gear.xml8
9 files changed, 99 insertions, 9 deletions
diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp
index 3c0136c258..9c748c7f86 100755
--- a/indra/newview/llviewermenu.cpp
+++ b/indra/newview/llviewermenu.cpp
@@ -1600,7 +1600,14 @@ class LLAdvancedAppearanceToXML : public view_listener_t
{
bool handleEvent(const LLSD& userdata)
{
- LLVOAvatar::dumpArchetypeXML(NULL);
+ std::string emptyname;
+ LLVOAvatar* avatar =
+ find_avatar_from_object( LLSelectMgr::getInstance()->getSelection()->getPrimaryObject() );
+ if (!avatar)
+ {
+ avatar = gAgentAvatarp;
+ }
+ avatar->dumpArchetypeXML(emptyname);
return true;
}
};
diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp
index d92caf1edb..39ad8fc8d6 100755
--- a/indra/newview/llvoavatar.cpp
+++ b/indra/newview/llvoavatar.cpp
@@ -36,6 +36,7 @@
#include <stdio.h>
#include <ctype.h>
+#include <sstream>
#include "llaudioengine.h"
#include "noise.h"
@@ -7762,11 +7763,35 @@ void LLVOAvatar::useBakedTexture( const LLUUID& id )
dirtyMesh();
}
-// static
-void LLVOAvatar::dumpArchetypeXML( void* )
+void LLVOAvatar::dumpArchetypeXML(const std::string& filename )
{
+ std::string outfilename(filename);
+ if (outfilename.empty())
+ {
+ std::string fullname = getFullname();
+ if (!fullname.empty())
+ {
+ typedef std::map<std::string,S32> file_num_type;
+ static file_num_type file_nums;
+ file_num_type::iterator it = file_nums.find(fullname);
+ S32 num = 0;
+ if (it != file_nums.end())
+ {
+ num = it->second;
+ }
+ std::ostringstream temp;
+ temp << std::setw(4) << std::setfill('0') << num;
+ file_nums[fullname] = num+1;
+ outfilename = fullname + " " + temp.str() + ".xml";
+ }
+ }
+ if (outfilename.empty())
+ {
+ outfilename = std::string("new archetype.xml");
+ }
+
LLAPRFile outfile;
- outfile.open(gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS,"new archetype.xml"), LL_APR_WB );
+ outfile.open(gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS,outfilename), LL_APR_WB );
apr_file_t* file = outfile.getFileHandle();
if (!file)
{
@@ -7782,12 +7807,12 @@ void LLVOAvatar::dumpArchetypeXML( void* )
apr_file_printf( file, "\n\t<archetype name=\"???\">\n" );
// only body parts, not clothing.
- for (S32 type = LLWearableType::WT_SHAPE; type <= LLWearableType::WT_EYES; type++)
+ for (S32 type = LLWearableType::WT_SHAPE; type <= LLWearableType::WT_COUNT; type++)
{
const std::string& wearable_name = LLWearableType::getTypeName((LLWearableType::EType)type);
apr_file_printf( file, "\n\t\t<!-- wearable: %s -->\n", wearable_name.c_str() );
- for (LLVisualParam* param = gAgentAvatarp->getFirstVisualParam(); param; param = gAgentAvatarp->getNextVisualParam())
+ for (LLVisualParam* param = getFirstVisualParam(); param; param = getNextVisualParam())
{
LLViewerVisualParam* viewer_param = (LLViewerVisualParam*)param;
if( (viewer_param->getWearableType() == type) &&
@@ -7803,7 +7828,7 @@ void LLVOAvatar::dumpArchetypeXML( void* )
if (LLVOAvatarDictionary::getTEWearableType((ETextureIndex)te) == type)
{
// MULTIPLE_WEARABLES: extend to multiple wearables?
- LLViewerTexture* te_image = ((LLVOAvatar *)(gAgentAvatarp))->getImage((ETextureIndex)te, 0);
+ LLViewerTexture* te_image = getImage((ETextureIndex)te, 0);
if( te_image )
{
std::string uuid_str;
diff --git a/indra/newview/llvoavatar.h b/indra/newview/llvoavatar.h
index 3f65dec11c..5ec2009971 100755
--- a/indra/newview/llvoavatar.h
+++ b/indra/newview/llvoavatar.h
@@ -710,7 +710,9 @@ public:
//--------------------------------------------------------------------
public:
BOOL getIsAppearanceAnimating() const { return mAppearanceAnimating; }
- BOOL isUsingBakedTextures() const { return mUseServerBakes; } // e.g. false if in appearance edit mode
+ BOOL isUsingBakedTextures() const { return mUseServerBakes; } // e.g. false if in appearance edit mode
+ BOOL isUsingLocalAppearance() const { return mUseLocalAppearance; }
+
private:
BOOL mAppearanceAnimating;
LLFrameTimer mAppearanceMorphTimer;
@@ -1014,7 +1016,7 @@ private:
// General
//--------------------------------------------------------------------
public:
- static void dumpArchetypeXML(void*);
+ void dumpArchetypeXML(const std::string& filename);
static void dumpBakedStatus();
const std::string getBakedStatusForPrintout() const;
void dumpAvatarTEs(const std::string& context) const;
diff --git a/indra/newview/skins/default/xui/en/menu_attachment_other.xml b/indra/newview/skins/default/xui/en/menu_attachment_other.xml
index b46b62ec4d..6f92273097 100644..100755
--- a/indra/newview/skins/default/xui/en/menu_attachment_other.xml
+++ b/indra/newview/skins/default/xui/en/menu_attachment_other.xml
@@ -79,6 +79,14 @@
<menu_item_call.on_visible
function="IsGodCustomerService"/>
</menu_item_call>
+ <menu_item_call
+ label="Dump XML"
+ name="Dump XML">
+ <menu_item_call.on_click
+ function="Advanced.AppearanceToXML" />
+ <menu_item_call.on_visible
+ function="IsGodCustomerService"/>
+ </menu_item_call>
<menu_item_call
label="Zoom In"
name="Zoom In">
diff --git a/indra/newview/skins/default/xui/en/menu_attachment_self.xml b/indra/newview/skins/default/xui/en/menu_attachment_self.xml
index b8128da358..84e26268bd 100644..100755
--- a/indra/newview/skins/default/xui/en/menu_attachment_self.xml
+++ b/indra/newview/skins/default/xui/en/menu_attachment_self.xml
@@ -123,6 +123,14 @@ name="Edit Outfit">
<menu_item_call.on_visible
function="IsGodCustomerService"/>
</menu_item_call>
+ <menu_item_call
+ label="Dump XML"
+ name="Dump XML">
+ <menu_item_call.on_click
+ function="Advanced.AppearanceToXML" />
+ <menu_item_call.on_visible
+ function="IsGodCustomerService"/>
+ </menu_item_call>
<menu_item_separator
layout="topleft" />
<menu_item_call
diff --git a/indra/newview/skins/default/xui/en/menu_avatar_other.xml b/indra/newview/skins/default/xui/en/menu_avatar_other.xml
index 276b5f106f..1c39984625 100644..100755
--- a/indra/newview/skins/default/xui/en/menu_avatar_other.xml
+++ b/indra/newview/skins/default/xui/en/menu_avatar_other.xml
@@ -79,6 +79,14 @@
<menu_item_call.on_visible
function="IsGodCustomerService"/>
</menu_item_call>
+ <menu_item_call
+ label="Dump XML"
+ name="Dump XML">
+ <menu_item_call.on_click
+ function="Advanced.AppearanceToXML" />
+ <menu_item_call.on_visible
+ function="IsGodCustomerService"/>
+ </menu_item_call>
<menu_item_call
label="Zoom In"
name="Zoom In">
diff --git a/indra/newview/skins/default/xui/en/menu_avatar_self.xml b/indra/newview/skins/default/xui/en/menu_avatar_self.xml
index d9bdfece38..0e79b0fee3 100644..100755
--- a/indra/newview/skins/default/xui/en/menu_avatar_self.xml
+++ b/indra/newview/skins/default/xui/en/menu_avatar_self.xml
@@ -261,4 +261,20 @@
<menu_item_call.on_visible
function="IsGodCustomerService"/>
</menu_item_call>
+ <menu_item_call
+ label="Dump XML"
+ name="Dump XML">
+ <menu_item_call.on_click
+ function="Advanced.AppearanceToXML" />
+ <menu_item_call.on_visible
+ function="IsGodCustomerService"/>
+ </menu_item_call>
+ <menu_item_call
+ label="Dump XML"
+ name="Dump XML">
+ <menu_item_call.on_click
+ function="Advanced.AppearanceToXML" />
+ <menu_item_call.on_visible
+ function="IsGodCustomerService"/>
+ </menu_item_call>
</context_menu>
diff --git a/indra/newview/skins/default/xui/en/menu_inspect_avatar_gear.xml b/indra/newview/skins/default/xui/en/menu_inspect_avatar_gear.xml
index 76b188220d..4fdfb2281b 100644..100755
--- a/indra/newview/skins/default/xui/en/menu_inspect_avatar_gear.xml
+++ b/indra/newview/skins/default/xui/en/menu_inspect_avatar_gear.xml
@@ -112,6 +112,14 @@
<menu_item_call.on_visible
function="IsGodCustomerService"/>
</menu_item_call>
+ <menu_item_call
+ label="Dump XML"
+ name="Dump XML">
+ <menu_item_call.on_click
+ function="Advanced.AppearanceToXML" />
+ <menu_item_call.on_visible
+ function="IsGodCustomerService"/>
+ </menu_item_call>
<menu_item_call
label="Find On Map"
name="find_on_map">
diff --git a/indra/newview/skins/default/xui/en/menu_inspect_self_gear.xml b/indra/newview/skins/default/xui/en/menu_inspect_self_gear.xml
index 5e7b16ed4a..f935f0f312 100644..100755
--- a/indra/newview/skins/default/xui/en/menu_inspect_self_gear.xml
+++ b/indra/newview/skins/default/xui/en/menu_inspect_self_gear.xml
@@ -249,4 +249,12 @@
<menu_item_call.on_visible
function="IsGodCustomerService"/>
</menu_item_call>
+ <menu_item_call
+ label="Dump XML"
+ name="Dump XML">
+ <menu_item_call.on_click
+ function="Advanced.AppearanceToXML" />
+ <menu_item_call.on_visible
+ function="IsGodCustomerService"/>
+ </menu_item_call>
</toggleable_menu>