summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorcallum <none@none>2010-10-21 16:55:15 -0700
committercallum <none@none>2010-10-21 16:55:15 -0700
commita0e3c4380d3cbfbb5e0589d081a7068c1525ebce (patch)
tree2a226df1c2caad8e2c6e991458a22b31730d56df /indra/newview
parent2a2256e8b06dfcefa10f32bf2c6775df19dfc782 (diff)
EXP-271 FIX Implement slapp functionality for changing avatars
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llappearancemgr.cpp29
1 files changed, 29 insertions, 0 deletions
diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp
index ed5e8ceee3..8737e97b47 100644
--- a/indra/newview/llappearancemgr.cpp
+++ b/indra/newview/llappearancemgr.cpp
@@ -2943,3 +2943,32 @@ void wear_multiple(const uuid_vec_t& ids, bool replace)
}
}
+// SLapp for easy-wearing of a stock (library) avatar
+//
+class LLWearFolderHandler : public LLCommandHandler
+{
+public:
+ // not allowed from outside the app
+ LLWearFolderHandler() : LLCommandHandler("wear_folder", UNTRUSTED_BLOCK) { }
+
+ bool handle(const LLSD& tokens, const LLSD& query_map,
+ LLMediaCtrl* web)
+ {
+ LLPointer<LLInventoryCategory> category = new LLInventoryCategory(query_map["folder_id"],
+ LLUUID::null,
+ LLFolderType::FT_CLOTHING,
+ "Quick Appearance");
+ LLSD::UUID folder_uuid = query_map["folder_id"].asUUID();
+ if ( gInventory.getCategory( folder_uuid ) != NULL )
+ {
+ LLAppearanceMgr::getInstance()->wearInventoryCategory(category, true, false);
+
+ // *TODOw: This may not be necessary if initial outfit is chosen already -- josh
+ gAgent.setGenderChosen(TRUE);
+ }
+
+ return true;
+ }
+};
+
+LLWearFolderHandler gWearFolderHandler;