diff options
| author | Monroe Linden <monroe@lindenlab.com> | 2010-12-09 16:48:07 -0800 |
|---|---|---|
| committer | Monroe Linden <monroe@lindenlab.com> | 2010-12-09 16:48:07 -0800 |
| commit | 95445fb1b56a60145933db0891133230c87274b8 (patch) | |
| tree | f9b03971e89800c68b4c4430b13c90af6cba51e7 /indra/newview/llappearancemgr.cpp | |
| parent | 089665ce4eab97d0ab58e08914f852219ed3fae7 (diff) | |
| parent | cf6147f7c092e6ca10697dea341099c5e281df00 (diff) | |
Merge with viewer-development.
Diffstat (limited to 'indra/newview/llappearancemgr.cpp')
| -rw-r--r-- | indra/newview/llappearancemgr.cpp | 29 |
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; |
