summaryrefslogtreecommitdiff
path: root/indra/newview/llappearancemgr.cpp
diff options
context:
space:
mode:
authorOz Linden <oz@lindenlab.com>2010-12-14 14:44:23 -0500
committerOz Linden <oz@lindenlab.com>2010-12-14 14:44:23 -0500
commit3aa12e85f04f0608da5df05b2cbb01685ef62944 (patch)
tree02e78886d530c92e3eddf0f73f3eb7f8a5b641da /indra/newview/llappearancemgr.cpp
parentbae83c7eac98229271a6baf4c961fe167c74a597 (diff)
parenta702b34394e4b38b27338eb6d68d22b498984118 (diff)
merge fix(es) for storm-378
Diffstat (limited to 'indra/newview/llappearancemgr.cpp')
-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 4e0bfb2e22..80734b0d41 100644
--- a/indra/newview/llappearancemgr.cpp
+++ b/indra/newview/llappearancemgr.cpp
@@ -2947,3 +2947,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;