From fe7750152b69aa89731ca95ac59ef402b6df137d Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Wed, 4 Nov 2009 14:49:48 -0500 Subject: Added placeholder art for missing icons. --- indra/newview/skins/default/textures/icons/Inv_Alpha.png | Bin 0 -> 253 bytes indra/newview/skins/default/textures/icons/Inv_Tattoo.png | Bin 0 -> 253 bytes 2 files changed, 0 insertions(+), 0 deletions(-) create mode 100644 indra/newview/skins/default/textures/icons/Inv_Alpha.png create mode 100644 indra/newview/skins/default/textures/icons/Inv_Tattoo.png (limited to 'indra/newview') diff --git a/indra/newview/skins/default/textures/icons/Inv_Alpha.png b/indra/newview/skins/default/textures/icons/Inv_Alpha.png new file mode 100644 index 0000000000..e8d246c6fa Binary files /dev/null and b/indra/newview/skins/default/textures/icons/Inv_Alpha.png differ diff --git a/indra/newview/skins/default/textures/icons/Inv_Tattoo.png b/indra/newview/skins/default/textures/icons/Inv_Tattoo.png new file mode 100644 index 0000000000..e8d246c6fa Binary files /dev/null and b/indra/newview/skins/default/textures/icons/Inv_Tattoo.png differ -- cgit v1.2.3 From 98a24938b3cd95f7c93283b91dc95582925265f5 Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Wed, 4 Nov 2009 15:28:07 -0500 Subject: LLAppearanceManager::wearItem() - always check for extra links of same type, even if requested object is already linked. --- indra/newview/llappearancemgr.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp index 382947e464..033df053ad 100644 --- a/indra/newview/llappearancemgr.cpp +++ b/indra/newview/llappearancemgr.cpp @@ -1103,14 +1103,16 @@ void LLAppearanceManager::wearItem( LLInventoryItem* item, bool do_update ) bool linked_already = false; for (S32 i=0; igetLinkedUUID() == item->getLinkedUUID()) { linked_already = true; - break; } - // Are of same type but are not the same - new item will replace old. - if (areMatchingWearables(vitem,inv_item)) + // Are these links to different items of the same wearable + // type? If so, new item will replace old. + // MULTI-WEARABLES: revisit if more than one per type is allowed. + else if (areMatchingWearables(vitem,inv_item)) { gAgentWearables.removeWearable(inv_item->getWearableType(),true,0); gInventory.purgeObject(inv_item->getUUID()); -- cgit v1.2.3 From dc365be4d23d8070a4f9e670918dbe8ccbe8cc79 Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Wed, 4 Nov 2009 18:03:04 -0500 Subject: For EXT-1985: Clothing previously taken off is re-worn when creating a new clothing item in appearance mode. General problem with failing to update the COF when clothing items were removed. Added hook in removeWearableFinal, which should guarantee that we're always removing clothing links when we need to. --- indra/newview/llagentwearables.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'indra/newview') diff --git a/indra/newview/llagentwearables.cpp b/indra/newview/llagentwearables.cpp index 4b3d27767c..7d215b5778 100644 --- a/indra/newview/llagentwearables.cpp +++ b/indra/newview/llagentwearables.cpp @@ -1393,6 +1393,7 @@ void LLAgentWearables::removeWearableFinal(const EWearableType type, bool do_rem const LLUUID &item_id = getWearableItemID(type,i); popWearable(type,i); gInventory.addChangedMask(LLInventoryObserver::LABEL, item_id); + LLAppearanceManager::removeItemLinks(item_id,false); //queryWearableCache(); // moved below if (old_wearable) @@ -1409,6 +1410,7 @@ void LLAgentWearables::removeWearableFinal(const EWearableType type, bool do_rem const LLUUID &item_id = getWearableItemID(type,index); popWearable(type, index); gInventory.addChangedMask(LLInventoryObserver::LABEL, item_id); + LLAppearanceManager::removeItemLinks(item_id,false); //queryWearableCache(); // moved below -- cgit v1.2.3 From 5c2d187d6fb296876c2c3cba5817c749598f4283 Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Wed, 4 Nov 2009 18:58:27 -0500 Subject: Small cleanup in LLAgentWearables.cpp --- indra/newview/llagentwearables.cpp | 6 +-- indra/newview/llagentwearables.h | 6 +-- indra/newview/llviewermenu.cpp | 102 ++++--------------------------------- 3 files changed, 15 insertions(+), 99 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llagentwearables.cpp b/indra/newview/llagentwearables.cpp index 7d215b5778..d8aca860d5 100644 --- a/indra/newview/llagentwearables.cpp +++ b/indra/newview/llagentwearables.cpp @@ -1724,10 +1724,8 @@ void LLAgentWearables::queryWearableCache() // MULTI_WEARABLE: need a way to specify by wearable rather than by type. // User has picked "remove from avatar" from a menu. // static -void LLAgentWearables::userRemoveWearable(void* userdata) +void LLAgentWearables::userRemoveWearable(EWearableType& type) { - EWearableType type = (EWearableType)(intptr_t)userdata; - if (!(type==WT_SHAPE || type==WT_SKIN || type==WT_HAIR)) //&& //!((!gAgent.isTeen()) && (type==WT_UNDERPANTS || type==WT_UNDERSHIRT))) { @@ -1737,7 +1735,7 @@ void LLAgentWearables::userRemoveWearable(void* userdata) } // static -void LLAgentWearables::userRemoveAllClothes(void* userdata) +void LLAgentWearables::userRemoveAllClothes() { // We have to do this up front to avoid having to deal with the case of multiple wearables being dirty. if (gFloaterCustomize) diff --git a/indra/newview/llagentwearables.h b/indra/newview/llagentwearables.h index 97de785c87..317f4a7e4f 100644 --- a/indra/newview/llagentwearables.h +++ b/indra/newview/llagentwearables.h @@ -191,9 +191,9 @@ public: //-------------------------------------------------------------------- public: // MULTI-WEARABLE: assuming one wearable per type. Need upstream changes. - static void userRemoveWearable(void* userdata); // userdata is EWearableType - static void userRemoveAllClothes(void* userdata); // userdata is NULL - + static void userRemoveWearable(EWearableType& type); + static void userRemoveAllClothes(); + typedef std::vector llvo_vec_t; static void userUpdateAttachments(LLInventoryModel::item_array_t& obj_item_array); diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index 23ceb1e72d..c85ed46cd6 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -7461,52 +7461,10 @@ class LLEditEnableTakeOff : public view_listener_t bool handleEvent(const LLSD& userdata) { std::string clothing = userdata.asString(); - bool new_value = false; - if (clothing == "shirt") - { - new_value = LLAgentWearables::selfHasWearable(WT_SHIRT); - } - if (clothing == "pants") - { - new_value = LLAgentWearables::selfHasWearable(WT_PANTS); - } - if (clothing == "shoes") - { - new_value = LLAgentWearables::selfHasWearable(WT_SHOES); - } - if (clothing == "socks") - { - new_value = LLAgentWearables::selfHasWearable(WT_SOCKS); - } - if (clothing == "jacket") - { - new_value = LLAgentWearables::selfHasWearable(WT_JACKET); - } - if (clothing == "gloves") - { - new_value = LLAgentWearables::selfHasWearable(WT_GLOVES); - } - if (clothing == "undershirt") - { - new_value = LLAgentWearables::selfHasWearable(WT_UNDERSHIRT); - } - if (clothing == "underpants") - { - new_value = LLAgentWearables::selfHasWearable(WT_UNDERPANTS); - } - if (clothing == "skirt") - { - new_value = LLAgentWearables::selfHasWearable(WT_SKIRT); - } - if (clothing == "alpha") - { - new_value = LLAgentWearables::selfHasWearable(WT_ALPHA); - } - if (clothing == "tattoo") - { - new_value = LLAgentWearables::selfHasWearable(WT_TATTOO); - } - return new_value; + EWearableType type = LLWearableDictionary::typeNameToType(clothing); + if (type >= WT_SHAPE && type < WT_COUNT) + return LLAgentWearables::selfHasWearable(type); + return false; } }; @@ -7515,53 +7473,13 @@ class LLEditTakeOff : public view_listener_t bool handleEvent(const LLSD& userdata) { std::string clothing = userdata.asString(); - if (clothing == "shirt") - { - LLAgentWearables::userRemoveWearable((void*)WT_SHIRT); - } - else if (clothing == "pants") - { - LLAgentWearables::userRemoveWearable((void*)WT_PANTS); - } - else if (clothing == "shoes") - { - LLAgentWearables::userRemoveWearable((void*)WT_SHOES); - } - else if (clothing == "socks") - { - LLAgentWearables::userRemoveWearable((void*)WT_SOCKS); - } - else if (clothing == "jacket") - { - LLAgentWearables::userRemoveWearable((void*)WT_JACKET); - } - else if (clothing == "gloves") - { - LLAgentWearables::userRemoveWearable((void*)WT_GLOVES); - } - else if (clothing == "undershirt") - { - LLAgentWearables::userRemoveWearable((void*)WT_UNDERSHIRT); - } - else if (clothing == "underpants") - { - LLAgentWearables::userRemoveWearable((void*)WT_UNDERPANTS); - } - else if (clothing == "skirt") - { - LLAgentWearables::userRemoveWearable((void*)WT_SKIRT); - } - else if (clothing == "alpha") - { - LLAgentWearables::userRemoveWearable((void*)WT_ALPHA); - } - else if (clothing == "tattoo") - { - LLAgentWearables::userRemoveWearable((void*)WT_TATTOO); - } - else if (clothing == "all") + if (clothing == "all") + LLAgentWearables::userRemoveAllClothes(); + else { - LLAgentWearables::userRemoveAllClothes(NULL); + EWearableType type = LLWearableDictionary::typeNameToType(clothing); + if (type >= WT_SHAPE && type < WT_COUNT) + LLAgentWearables::userRemoveWearable(type); } return true; } -- cgit v1.2.3