summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorBrad Payne (Vir Linden) <vir@lindenlab.com>2016-03-23 11:03:55 -0400
committerBrad Payne (Vir Linden) <vir@lindenlab.com>2016-03-23 11:03:55 -0400
commite19c4098d4af38271549a8fbe697138b5acbbba1 (patch)
tree15de17e8f93f5eb783e43210795e7b5120467788 /indra
parent0879c48d832a69050e6fc6ac67b0d5f95b52e054 (diff)
SL-344 - hook for debugging wearable contents during slider testing.
Diffstat (limited to 'indra')
-rwxr-xr-xindra/newview/app_settings/settings.xml11
-rwxr-xr-xindra/newview/llviewerwearable.cpp16
2 files changed, 22 insertions, 5 deletions
diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml
index 5ea847599b..21ca2a86d0 100755
--- a/indra/newview/app_settings/settings.xml
+++ b/indra/newview/app_settings/settings.xml
@@ -14406,6 +14406,17 @@
<key>Value</key>
<integer>0</integer>
</map>
+ <key>LogWearableAssetSave</key>
+ <map>
+ <key>Comment</key>
+ <string>Save copy of saved wearables to log dir</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>Boolean</string>
+ <key>Value</key>
+ <integer>0</integer>
+ </map>
<key>LogTextureDownloadsToViewerLog</key>
<map>
<key>Comment</key>
diff --git a/indra/newview/llviewerwearable.cpp b/indra/newview/llviewerwearable.cpp
index 0f73515b5d..8d482b2e34 100755
--- a/indra/newview/llviewerwearable.cpp
+++ b/indra/newview/llviewerwearable.cpp
@@ -70,7 +70,7 @@ private:
};
// Private local functions
-static std::string asset_id_to_filename(const LLUUID &asset_id);
+static std::string asset_id_to_filename(const LLUUID &asset_id, const ELLPath dir_spec);
LLViewerWearable::LLViewerWearable(const LLTransactionID& transaction_id) :
LLWearable(),
@@ -508,7 +508,7 @@ void LLViewerWearable::saveNewAsset() const
// LL_INFOS() << "LLViewerWearable::saveNewAsset() type: " << getTypeName() << LL_ENDL;
//LL_INFOS() << *this << LL_ENDL;
- const std::string filename = asset_id_to_filename(mAssetID);
+ const std::string filename = asset_id_to_filename(mAssetID, LL_PATH_CACHE);
if(! exportFile(filename))
{
std::string buffer = llformat("Unable to save '%s' to wearable file.", mName.c_str());
@@ -520,6 +520,12 @@ void LLViewerWearable::saveNewAsset() const
return;
}
+ if (gSavedSettings.getBOOL("LogWearableAssetSave"))
+ {
+ const std::string log_filename = asset_id_to_filename(mAssetID, LL_PATH_LOGS);
+ exportFile(log_filename);
+ }
+
// save it out to database
if( gAssetStorage )
{
@@ -568,7 +574,7 @@ void LLViewerWearable::onSaveNewAssetComplete(const LLUUID& new_asset_id, void*
}
// Delete temp file
- const std::string src_filename = asset_id_to_filename(new_asset_id);
+ const std::string src_filename = asset_id_to_filename(new_asset_id, LL_PATH_CACHE);
LLFile::remove(src_filename);
// delete the context data
@@ -605,10 +611,10 @@ std::ostream& operator<<(std::ostream &s, const LLViewerWearable &w)
return s;
}
-std::string asset_id_to_filename(const LLUUID &asset_id)
+std::string asset_id_to_filename(const LLUUID &asset_id, const ELLPath dir_spec)
{
std::string asset_id_string;
asset_id.toString(asset_id_string);
- std::string filename = gDirUtilp->getExpandedFilename(LL_PATH_CACHE,asset_id_string) + ".wbl";
+ std::string filename = gDirUtilp->getExpandedFilename(dir_spec,asset_id_string) + ".wbl";
return filename;
}