summaryrefslogtreecommitdiff
path: root/indra/newview/llappearancemgr.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llappearancemgr.cpp')
-rwxr-xr-xindra/newview/llappearancemgr.cpp35
1 files changed, 35 insertions, 0 deletions
diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp
index faadfb4b87..480a8e0d73 100755
--- a/indra/newview/llappearancemgr.cpp
+++ b/indra/newview/llappearancemgr.cpp
@@ -1730,6 +1730,12 @@ void LLAppearanceMgr::updateAppearanceFromCOF(bool update_base_outfit_ordering)
// the saved outfit stored as a folder link
updateIsDirty();
+ // Send server request for appearance update
+ if (useServerTextureBaking())
+ {
+ requestServerAppearanceUpdate();
+ }
+
//dumpCat(getCOF(),"COF, start");
bool follow_folder_links = true;
@@ -2581,8 +2587,37 @@ void LLAppearanceMgr::updateClothingOrderingInfo(LLUUID cat_id, bool update_base
if (inventory_changed) gInventory.notifyObservers();
}
+// Should be true iff both the appropriate debug setting is enabled
+// and the corresponding cap has been found.
+bool LLAppearanceMgr::useServerTextureBaking()
+{
+ // TODO: add cap check.
+ return gSavedSettings.getBOOL("UseServerTextureBaking");
+}
+class RequestAgentUpdateAppearanceResponder: public LLHTTPClient::Responder
+{
+public:
+ RequestAgentUpdateAppearanceResponder() {}
+ /*virtual*/ void error(U32 status, const std::string& reason)
+ {
+ llwarns << "appearance update request failed, reason: " << reason << llendl;
+ }
+};
+void LLAppearanceMgr::requestServerAppearanceUpdate()
+{
+ std::string url = gAgent.getRegion()->getCapability("UpdateAvatarAppearance");
+ if (!url.empty())
+ {
+ LLSD body;
+ LLHTTPClient::post(url, body, new RequestAgentUpdateAppearanceResponder);
+ }
+ else
+ {
+ llwarns << "no cap for UpdateAvatarAppearance" << llendl;
+ }
+}
class LLShowCreatedOutfit: public LLInventoryCallback
{