From 894f649da792173ad456b3591dc8afe7a269cc78 Mon Sep 17 00:00:00 2001 From: Kitty Barnett Date: Sat, 28 Aug 2010 17:43:04 +0200 Subject: [PATCH 01/39] [Appearance/Misc] --HG-- branch : Appearance-Misc --- .hgpatchinfo/Appearance-Misc.dep | 1 + 1 file changed, 1 insertion(+) create mode 100644 .hgpatchinfo/Appearance-Misc.dep diff --git a/.hgpatchinfo/Appearance-Misc.dep b/.hgpatchinfo/Appearance-Misc.dep new file mode 100644 index 0000000000..1b77f49183 --- /dev/null +++ b/.hgpatchinfo/Appearance-Misc.dep @@ -0,0 +1 @@ +e7794a7b9728b07b5d3e1796dd578777396b21f4 \ No newline at end of file From baa6794d0ca6df87401fea55af7d5575051fc15a Mon Sep 17 00:00:00 2001 From: Kitty Barnett Date: Sat, 28 Aug 2010 20:40:14 +0200 Subject: [PATCH 02/39] [Appearance/Misc] - fixed : LLAppearanceMgr::filterWearableItems() doesn't properly filter body parts - fixed : LLWearableList::processGetAssetReply() creates multiple LLWearable instances for the same asset UUID -> fix for http://jira.secondlife.com/browse/VWR-20608 - changed : deprecated removeItemFromAvatar() in favour of having LLAppearanceMgr::removeItemFromAvatar() handle it directly/correctly -> wearables can't be worn/removed in 2.X without the viewer already having an LLWearable instance for it anyway - added : InitialWearablesLoadedSignal signal which is emitted *once* when the initial wearables are loaded - fixed : attachments sometimes detach only to instantly get reattached after logon - added : LegacyMultiAttachmentSupport debug setting to route "secondary attachment points" to the primary attachment point -> maps secondary attachment point range [39,68] onto [1,30] -> only dislays "secondary attachment points" correctly for *other* avatars (by design) --HG-- branch : Appearance-Misc --- .hgpatchinfo/Appearance-Misc.desc | 11 ++++++++ indra/newview/app_settings/settings.xml | 11 ++++++++ indra/newview/llagentwearables.cpp | 17 +++++++++++++ indra/newview/llagentwearables.h | 12 +++++++++ indra/newview/llappearancemgr.cpp | 34 +++++++++++++++++++++---- indra/newview/llinventorybridge.cpp | 18 +++++++++++++ indra/newview/llinventorybridge.h | 8 +++--- indra/newview/llvoavatar.cpp | 8 +++++- indra/newview/llwearablelist.cpp | 14 ++++++++-- 9 files changed, 121 insertions(+), 12 deletions(-) create mode 100644 .hgpatchinfo/Appearance-Misc.desc diff --git a/.hgpatchinfo/Appearance-Misc.desc b/.hgpatchinfo/Appearance-Misc.desc new file mode 100644 index 0000000000..73ba073384 --- /dev/null +++ b/.hgpatchinfo/Appearance-Misc.desc @@ -0,0 +1,11 @@ +[Appearance/Misc] +- fixed : LLAppearanceMgr::filterWearableItems() doesn't properly filter body parts +- fixed : LLWearableList::processGetAssetReply() creates multiple LLWearable instances for the same asset UUID + -> fix for http://jira.secondlife.com/browse/VWR-20608 +- changed : deprecated removeItemFromAvatar() in favour of having LLAppearanceMgr::removeItemFromAvatar() handle it directly/correctly + -> wearables can't be worn/removed in 2.X without the viewer already having an LLWearable instance for it anyway +- added : InitialWearablesLoadedSignal signal which is emitted *once* when the initial wearables are loaded +- fixed : attachments sometimes detach only to instantly get reattached after logon +- added : LegacyMultiAttachmentSupport debug setting to route "secondary attachment points" to the primary attachment point + -> maps secondary attachment point range [39,68] onto [1,30] + -> only dislays "secondary attachment points" correctly for *other* avatars (by design) diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 07418d1b5e..fce5c2ecce 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -4394,6 +4394,17 @@ Value 0 + LegacyMultiAttachmentSupport + + Comment + Converts legacy "secondary attachment points" to multi-attachments for other avatars + Persist + 1 + Type + Boolean + Value + 0 + LimitDragDistance Comment diff --git a/indra/newview/llagentwearables.cpp b/indra/newview/llagentwearables.cpp index 4c2caae2c6..d7d2cadfe6 100644 --- a/indra/newview/llagentwearables.cpp +++ b/indra/newview/llagentwearables.cpp @@ -55,6 +55,9 @@ LLAgentWearables gAgentWearables; BOOL LLAgentWearables::mInitialWearablesUpdateReceived = FALSE; +// [SL:KB] - Patch: Appearance-InitialWearablesLoadedCallback | Checked: 2010-08-14 (Catznip-2.1.2a) | Added: Catznip-2.1.1d +bool LLAgentWearables::mInitialWearablesLoaded = false; +// [/SL:KB] using namespace LLVOAvatarDefines; @@ -2097,9 +2100,23 @@ boost::signals2::connection LLAgentWearables::addLoadedCallback(loaded_callback_ return mLoadedSignal.connect(cb); } +// [SL:KB] - Patch: Appearance-InitialWearablesLoadedCallback | Checked: 2010-08-14 (Catznip-2.1.2a) | Added: Catznip-2.1.1d +boost::signals2::connection LLAgentWearables::addInitialWearablesLoadedCallback(loaded_callback_t cb) +{ + return mInitialWearablesLoadedSignal.connect(cb); +} +// [/SL:KB] + void LLAgentWearables::notifyLoadingStarted() { mCOFChangeInProgress = true; +// [SL:KB] - Patch: Appearance-InitialWearablesLoadedCallback | Checked: 2010-08-14 (Catznip-2.1.2a) | Added: Catznip-2.1.1d + if (!mInitialWearablesLoaded) + { + mInitialWearablesLoaded = true; + mInitialWearablesLoadedSignal(); + } +// [/SL:KB] mLoadingStartedSignal(); } diff --git a/indra/newview/llagentwearables.h b/indra/newview/llagentwearables.h index d7e77a5a5b..45829f2b66 100644 --- a/indra/newview/llagentwearables.h +++ b/indra/newview/llagentwearables.h @@ -76,6 +76,9 @@ public: BOOL isWearableCopyable(LLWearableType::EType type, U32 index /*= 0*/) const; BOOL areWearablesLoaded() const; +// [SL:KB] - Patch: Appearance-InitialWearablesLoadedCallback | Checked: 2010-08-14 (Catznip-2.1.2a) | Added: Catznip-2.1.1d + bool areInitalWearablesLoaded() const { return mInitialWearablesLoaded; } +// [/SL:KB] bool isCOFChangeInProgress() const { return mCOFChangeInProgress; } void updateWearablesLoaded(); void checkWearablesLoaded() const; @@ -234,6 +237,9 @@ public: typedef boost::function loaded_callback_t; typedef boost::signals2::signal loaded_signal_t; boost::signals2::connection addLoadedCallback(loaded_callback_t cb); +// [SL:KB] - Patch: Appearance-InitialWearablesLoadedCallback | Checked: 2010-08-14 (Catznip-2.1.2a) | Added: Catznip-2.1.1d + boost::signals2::connection addInitialWearablesLoadedCallback(loaded_callback_t cb); +// [/SL:KB] void notifyLoadingStarted(); void notifyLoadingFinished(); @@ -241,6 +247,9 @@ public: private: loading_started_signal_t mLoadingStartedSignal; // should be called before wearables are changed loaded_signal_t mLoadedSignal; // emitted when all agent wearables get loaded +// [SL:KB] - Patch: Appearance-InitialWearablesLoadedCallback | Checked: 2010-08-14 (Catznip-2.1.2a) | Added: Catznip-2.1.1d + loaded_signal_t mInitialWearablesLoadedSignal; // emitted once when the initial wearables are loaded +// [/SL:KB] //-------------------------------------------------------------------- // Member variables @@ -251,6 +260,9 @@ private: wearableentry_map_t mWearableDatas; static BOOL mInitialWearablesUpdateReceived; +// [SL:KB] - Patch: Appearance-InitialWearablesLoadedCallback | Checked: 2010-08-14 (Catznip-2.1.2a) | Added: Catznip-2.1.1d + static bool mInitialWearablesLoaded; +// [/SL:KB] BOOL mWearablesLoaded; std::set mItemsAwaitingWearableUpdate; diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp index 94286fd799..80d260caba 100644 --- a/indra/newview/llappearancemgr.cpp +++ b/indra/newview/llappearancemgr.cpp @@ -458,7 +458,11 @@ void LLWearableHoldingPattern::onAllComplete() LLAppearanceMgr::instance().updateAgentWearables(this, false); // Update attachments to match those requested. - if (isAgentAvatarValid()) +// if (isAgentAvatarValid()) +// [SL:KB] - Patch: Appearance-Misc | Checked: 2010-08-14 (Catznip-2.1.2a) | Modified: Catznip-2.1.1d + // Don't update attachments until initial wearables have loaded (should reduce random attaching/detaching/reattaching at log-on) + if ( (isAgentAvatarValid()) && (gAgentWearables.areInitalWearablesLoaded()) ) +// [/SL:KB] { llinfos << "Updating " << mObjItems.count() << " attachments" << llendl; LLAgentWearables::userUpdateAttachments(mObjItems); @@ -1359,7 +1363,11 @@ void LLAppearanceMgr::filterWearableItems( S32 size = items_by_type[i].size(); if (size <= 0) continue; - S32 start_index = llmax(0,size-max_per_type); +// S32 start_index = llmax(0,size-max_per_type); +// [SL:KB] - Patch: Appearance-Misc | Checked: 2010-05-11 (Catznip-2.1.2a) | Added: Catznip-2.0.0h + S32 start_index = + llmax(0, size - ((LLAssetType::AT_BODYPART == LLWearableType::getAssetType((LLWearableType::EType)i)) ? 1 : max_per_type)); +// [/SL:KB[ for (S32 j = start_index; jgetType()) { case LLAssetType::AT_CLOTHING: - if (get_is_item_worn(id_to_remove)) +// if (get_is_item_worn(id_to_remove)) +// { +// //*TODO move here the exact removing code from LLWearableBridge::removeItemFromAvatar in the future +// LLWearableBridge::removeItemFromAvatar(item_to_remove); +// } +// [SL:KB] - Patch: Appearance-RemoveWearableFromAvatar | Checked: 2010-08-13 (Catznip-2.1.2a) | Added: Catznip-2.1.1d { - //*TODO move here the exact removing code from LLWearableBridge::removeItemFromAvatar in the future - LLWearableBridge::removeItemFromAvatar(item_to_remove); + /*const*/ LLWearable* pWearable = gAgentWearables.getWearableFromItemID(item_to_remove->getLinkedUUID()); + if ( (pWearable) && (LLAssetType::AT_BODYPART != pWearable->getAssetType()) ) + { + U32 idxWearable = gAgentWearables.getWearableIndex(pWearable); + if (idxWearable < LLAgentWearables::MAX_CLOTHING_PER_TYPE) + { + gAgentWearables.removeWearable(pWearable->getType(), false, idxWearable); + + LLAppearanceMgr::instance().removeCOFItemLinks(item_to_remove->getLinkedUUID(), false); + gInventory.notifyObservers(); + } + } } +// [/SL:KB] break; case LLAssetType::AT_OBJECT: LLVOAvatarSelf::detachAttachmentIntoInventory(item_to_remove->getLinkedUUID()); diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index aff0bc4099..81174730c7 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -4316,11 +4316,16 @@ void remove_inventory_category_from_avatar_step2( BOOL proceed, LLUUID category_ continue; if (get_is_item_worn(item->getUUID())) { +/* LLWearableList::instance().getAsset(item->getAssetUUID(), item->getName(), item->getType(), LLWearableBridge::onRemoveFromAvatarArrived, new OnRemoveStruct(item->getLinkedUUID())); +*/ +// [SL:KB] - Patch: Appearance-RemoveWearableFromAvatar | Checked: 2010-08-13 (Catznip-2.1.2a) | Added: Catznip-2.1.1d + LLAppearanceMgr::instance().removeItemFromAvatar(item->getUUID()); +// [/SL:KB] } } } @@ -4551,6 +4556,7 @@ void LLWearableBridge::wearAddOnAvatar() } // static +/* void LLWearableBridge::onWearOnAvatarArrived( LLWearable* wearable, void* userdata ) { LLUUID* item_id = (LLUUID*) userdata; @@ -4574,9 +4580,11 @@ void LLWearableBridge::onWearOnAvatarArrived( LLWearable* wearable, void* userda } delete item_id; } +*/ // static // BAP remove the "add" code path once everything is fully COF-ified. +/* void LLWearableBridge::onWearAddOnAvatarArrived( LLWearable* wearable, void* userdata ) { LLUUID* item_id = (LLUUID*) userdata; @@ -4601,6 +4609,7 @@ void LLWearableBridge::onWearAddOnAvatarArrived( LLWearable* wearable, void* use } delete item_id; } +*/ // static BOOL LLWearableBridge::canEditOnAvatar(void* user_data) @@ -4638,6 +4647,7 @@ BOOL LLWearableBridge::canRemoveFromAvatar(void* user_data) } // static +/* void LLWearableBridge::onRemoveFromAvatar(void* user_data) { LLWearableBridge* self = (LLWearableBridge*)user_data; @@ -4656,8 +4666,10 @@ void LLWearableBridge::onRemoveFromAvatar(void* user_data) } } } +*/ // static +/* void LLWearableBridge::onRemoveFromAvatarArrived(LLWearable* wearable, void* userdata) { @@ -4685,6 +4697,7 @@ void LLWearableBridge::onRemoveFromAvatarArrived(LLWearable* wearable, delete on_remove_struct; } +*/ // static void LLWearableBridge::removeAllClothesFromAvatar() @@ -4721,11 +4734,16 @@ void LLWearableBridge::removeItemFromAvatar(LLViewerInventoryItem *item) { if (item) { +/* LLWearableList::instance().getAsset(item->getAssetUUID(), item->getName(), item->getType(), LLWearableBridge::onRemoveFromAvatarArrived, new OnRemoveStruct(item->getUUID())); +*/ +// [SL:KB] - Patch: Appearance-Misc | Checked: 2010-08-13 (Catznip-2.1.2a) | Added: Catznip-2.1.1d + LLAppearanceMgr::instance().removeItemFromAvatar(item->getUUID()); +// [/SL:KB] } } diff --git a/indra/newview/llinventorybridge.h b/indra/newview/llinventorybridge.h index 14abdd76b9..2e3535eea6 100644 --- a/indra/newview/llinventorybridge.h +++ b/indra/newview/llinventorybridge.h @@ -470,10 +470,10 @@ public: static void onWearOnAvatar( void* userdata ); // Access to wearOnAvatar() from menu static BOOL canWearOnAvatar( void* userdata ); - static void onWearOnAvatarArrived( LLWearable* wearable, void* userdata ); +// static void onWearOnAvatarArrived( LLWearable* wearable, void* userdata ); void wearOnAvatar(); - static void onWearAddOnAvatarArrived( LLWearable* wearable, void* userdata ); +// static void onWearAddOnAvatarArrived( LLWearable* wearable, void* userdata ); void wearAddOnAvatar(); static BOOL canEditOnAvatar( void* userdata ); // Access to editOnAvatar() from menu @@ -481,8 +481,8 @@ public: void editOnAvatar(); static BOOL canRemoveFromAvatar( void* userdata ); - static void onRemoveFromAvatar( void* userdata ); - static void onRemoveFromAvatarArrived( LLWearable* wearable, void* userdata ); +// static void onRemoveFromAvatar( void* userdata ); +// static void onRemoveFromAvatarArrived( LLWearable* wearable, void* userdata ); static void removeItemFromAvatar(LLViewerInventoryItem *item); static void removeAllClothesFromAvatar(); void removeFromAvatar(); diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index 9af1198df1..8b9a511f9d 100644 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -5585,7 +5585,13 @@ LLViewerJointAttachment* LLVOAvatar::getTargetAttachmentPoint(LLViewerObject* vi if (!attachment) { llwarns << "Object attachment point invalid: " << attachmentID << llendl; - attachment = get_if_there(mAttachmentPoints, 1, (LLViewerJointAttachment*)NULL); // Arbitrary using 1 (chest) +// attachment = get_if_there(mAttachmentPoints, 1, (LLViewerJointAttachment*)NULL); // Arbitrary using 1 (chest) +// [SL:KB] - Patch: Appearance-LegacyMultiAttachment | Checked: 2010-08-28 (Catznip-2.1.2a) | Added: Catznip2.1.2a + S32 idxAttachPt = 1; + if ( (!isSelf()) && (gSavedSettings.getBOOL("LegacyMultiAttachmentSupport")) && (attachmentID > 38) && (attachmentID <= 68) ) + idxAttachPt = attachmentID - 38; + attachment = get_if_there(mAttachmentPoints, idxAttachPt, (LLViewerJointAttachment*)NULL); // Arbitrary using 1 (chest) +// [/SL:KB] } return attachment; diff --git a/indra/newview/llwearablelist.cpp b/indra/newview/llwearablelist.cpp index ddbcdfc3f7..d88e7531fc 100644 --- a/indra/newview/llwearablelist.cpp +++ b/indra/newview/llwearablelist.cpp @@ -95,8 +95,18 @@ void LLWearableList::processGetAssetReply( const char* filename, const LLAssetID { BOOL isNewWearable = FALSE; LLWearableArrivedData* data = (LLWearableArrivedData*) userdata; - LLWearable* wearable = NULL; // NULL indicates failure - +// LLWearable* wearable = NULL; // NULL indicates failure +// [SL:KB] - Patch: Appearance-Misc | Checked: 2010-08-13 (Catznip-2.1.2a) | Added: Catznip-2.1.1d + LLWearable* wearable = get_if_there(LLWearableList::instance().mList, uuid, (LLWearable*)NULL); + if (wearable) + { + if(data->mCallback) + data->mCallback(wearable, data->mUserdata); + delete data; + return; + } +// [/SL:KB] + if( !filename ) { LL_WARNS("Wearable") << "Bad Wearable Asset: missing file." << LL_ENDL; From 646926e00b6502de24584372827d274a6d5201b5 Mon Sep 17 00:00:00 2001 From: Kitty Barnett Date: Tue, 31 Aug 2010 16:30:14 +0200 Subject: [PATCH 03/39] [Appearance/Misc] - fixed : Add to/Replace Outfit removes newly worn attachments on completion -> (partial) fix for http://jira.secondlife.com/browse/VWR-18512 -> copies over from RLVa since it's really just a viewer (appearance) bug --HG-- branch : Appearance-Misc --- indra/newview/llappearancemgr.cpp | 58 +++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp index 80d260caba..191bf85cef 100644 --- a/indra/newview/llappearancemgr.cpp +++ b/indra/newview/llappearancemgr.cpp @@ -291,8 +291,13 @@ public: private: found_list_t mFoundList; +// [SL:KB] - Patch: Appearance-SyncAttach | Checked: 2010-03-22 (Catznip-2.1.2a) | Added: Catznip-2.1.2a + // Fix for http://jira.secondlife.com/browse/VWR-18512 +/* LLInventoryModel::item_array_t mObjItems; LLInventoryModel::item_array_t mGestItems; +*/ +// [/SL:KB] typedef std::set type_set_t; type_set_t mTypesToRecover; type_set_t mTypesToLink; @@ -357,6 +362,9 @@ void LLWearableHoldingPattern::eraseTypeToRecover(LLWearableType::EType type) mTypesToRecover.erase(type); } +// [SL:KB] - Patch: Appearance-SyncAttach | Checked: 2010-06-19 (Catznip-2.1.2a) | Added: Catznip-2.1.2a +// Fix for http://jira.secondlife.com/browse/VWR-18512 +/* void LLWearableHoldingPattern::setObjItems(const LLInventoryModel::item_array_t& items) { mObjItems = items; @@ -366,6 +374,8 @@ void LLWearableHoldingPattern::setGestItems(const LLInventoryModel::item_array_t { mGestItems = items; } +*/ +// [/SL:KB] bool LLWearableHoldingPattern::isFetchCompleted() { @@ -435,6 +445,9 @@ void LLWearableHoldingPattern::onAllComplete() } // Activate all gestures in this folder +// [SL:KB] - Patch: Appearance-SyncAttach | Checked: 2010-03-22 (Catznip-2.1.2a) | Added: Catznip-2.1.2a + // Fix for http://jira.secondlife.com/browse/VWR-18512 +/* if (mGestItems.count() > 0) { llinfos << "Activating " << mGestItems.count() << " gestures" << llendl; @@ -452,11 +465,16 @@ void LLWearableHoldingPattern::onAllComplete() gInventory.notifyObservers(); } } +*/ +// [/SL:KB] // Update wearables. llinfos << "Updating agent wearables with " << mResolved << " wearable items " << llendl; LLAppearanceMgr::instance().updateAgentWearables(this, false); +// [SL:KB] - Patch: Appearance-SyncAttach | Checked: 2010-03-22 (Catznip-2.1.2a) | Added: Catznip-2.1.2a + // Fix for http://jira.secondlife.com/browse/VWR-18512 +/* // Update attachments to match those requested. // if (isAgentAvatarValid()) // [SL:KB] - Patch: Appearance-Misc | Checked: 2010-08-14 (Catznip-2.1.2a) | Modified: Catznip-2.1.1d @@ -467,6 +485,8 @@ void LLWearableHoldingPattern::onAllComplete() llinfos << "Updating " << mObjItems.count() << " attachments" << llendl; LLAgentWearables::userUpdateAttachments(mObjItems); } +*/ +// [/SL:KB] if (isFetchCompleted() && isMissingCompleted()) { @@ -1708,11 +1728,49 @@ void LLAppearanceMgr::updateAppearanceFromCOF(bool update_base_outfit_ordering) //preparing the list of wearables in the correct order for LLAgentWearables sortItemsByActualDescription(wear_items); +// [SL:KB] - Patch: Appearance-SyncAttach | Checked: 2010-03-22 (Catznip-2.1.2a) | Added: Catznip-2.1.2a + // Fix for http://jira.secondlife.com/browse/VWR-18512 [code below copied from LLWearableHoldingPattern::pollCompletion()] + + // Activate all gestures in this folder + if (gest_items.count() > 0) + { + llinfos << "Activating " << gest_items.count() << " gestures" << llendl; + + LLGestureMgr::instance().activateGestures(gest_items); + + // Update the inventory item labels to reflect the fact + // they are active. + LLViewerInventoryCategory* catp = + gInventory.getCategory(LLAppearanceMgr::instance().getCOF()); + + if (catp) + { + gInventory.updateCategory(catp); + gInventory.notifyObservers(); + } + } + + // Update attachments to match those requested. +// if (isAgentAvatarValid()) +// [SL:KB] - Patch: Appearance-Misc | Checked: 2010-08-14 (Catznip-2.1.2a) | Modified: Catznip-2.1.1d + // Don't update attachments until initial wearables have loaded (should reduce random attaching/detaching/reattaching at log-on) + if ( (isAgentAvatarValid()) && (gAgentWearables.areInitalWearablesLoaded()) ) +// [/SL:KB] + { + llinfos << "Updating " << obj_items.count() << " attachments" << llendl; + LLAgentWearables::userUpdateAttachments(obj_items); + } +// [/SL:KB] LLWearableHoldingPattern* holder = new LLWearableHoldingPattern; +// [SL:KB] - Patch: Appearance-SyncAttach | Checked: 2010-03-22 (Catznip-2.1.2a) | Added: Catznip-2.1.2a + // Fix for http://jira.secondlife.com/browse/VWR-18512 +/* holder->setObjItems(obj_items); holder->setGestItems(gest_items); +*/ +// [/SL:KB] // Note: can't do normal iteration, because if all the // wearables can be resolved immediately, then the From 0477d49012822b14bd55c049a5bacd79346c87d8 Mon Sep 17 00:00:00 2001 From: Kitty Barnett Date: Tue, 31 Aug 2010 16:37:24 +0200 Subject: [PATCH 04/39] [Appearance/Misc] - fixed : Add to/Replace Outfit removes newly worn attachments on completion -> additional fix for http://jira.secondlife.com/browse/VWR-18512 -> copied over from RLVa since it's really just a viewer (appearance) bug --HG-- branch : Appearance-Misc --- indra/newview/llappearancemgr.cpp | 29 ++++++++++++++++++++++++++++- indra/newview/llappearancemgr.h | 26 ++++++++++++++++++++++++++ 2 files changed, 54 insertions(+), 1 deletion(-) diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp index 191bf85cef..4d01bf2c86 100644 --- a/indra/newview/llappearancemgr.cpp +++ b/indra/newview/llappearancemgr.cpp @@ -1716,6 +1716,29 @@ void LLAppearanceMgr::updateAppearanceFromCOF(bool update_base_outfit_ordering) remove_non_link_items(obj_items); remove_non_link_items(gest_items); +// [SL:KB] - Patch: Appearance-SyncAttach | Checked: 2010-08-31 (Catznip-2.1.2a) | Added: Catznip-2.1.2a + // Include attachments which should be in COF but don't have their link created yet + if (isAgentAvatarValid()) + { + uuid_vec_t::iterator itPendingObjLink = mPendingObjLinks.begin(); + while (itPendingObjLink != mPendingObjLinks.end()) + { + const LLUUID& idItem = *itPendingObjLink; + if (!gAgentAvatarp->isWearingAttachment(idItem)) + { + mPendingObjLinks.erase(itPendingObjLink++); + continue; + } + + LLViewerInventoryItem* pItem = gInventory.getItem(idItem); + if (pItem) + obj_items.push_back(pItem); + + ++itPendingObjLink; + } + } +// [/SL:KB] + dumpItemArray(wear_items,"asset_dump: wear_item"); dumpItemArray(obj_items,"asset_dump: obj_item"); @@ -2758,7 +2781,11 @@ void LLAppearanceMgr::registerAttachment(const LLUUID& item_id) // we have to pass do_update = true to call LLAppearanceMgr::updateAppearanceFromCOF. // it will trigger gAgentWariables.notifyLoadingFinished() // But it is not acceptable solution. See EXT-7777 - LLAppearanceMgr::addCOFItemLink(item_id, false); // Add COF link for item. +// LLAppearanceMgr::addCOFItemLink(item_id, false); // Add COF link for item. +// [SL:KB] - Patch: Appearance-SyncAttach | Checked: 2010-08-31 (Catznip-2.1.2a) | Added: Catznip-2.1.2a + mPendingObjLinks.push_back(item_id); + LLAppearanceMgr::addCOFItemLink(item_id, false, new LLRegisterAttachmentCallback()); // Add COF link for item. +// [/SL:KB] } else { diff --git a/indra/newview/llappearancemgr.h b/indra/newview/llappearancemgr.h index 78c2142ea5..8f573441a1 100644 --- a/indra/newview/llappearancemgr.h +++ b/indra/newview/llappearancemgr.h @@ -215,6 +215,19 @@ private: std::auto_ptr mUnlockOutfitTimer; +// [SL:KB] - Patch: Appearance-SyncAttach | Checked: 2010-08-31 (Catznip-2.1.2a) | Added: Catznip-2.1.2a +public: + void onRegisterAttachmentComplete(const LLUUID& idItem) + { + const LLUUID& idItemBase = gInventory.getLinkedItemID(idItem); + uuid_vec_t::const_iterator itPendingObjLink = std::find(mPendingObjLinks.begin(), mPendingObjLinks.end(), idItemBase); + if (itPendingObjLink != mPendingObjLinks.end()) + mPendingObjLinks.erase(itPendingObjLink); + } +private: + uuid_vec_t mPendingObjLinks; +// [/SL:KB] + ////////////////////////////////////////////////////////////////////////////////// // Item-specific convenience functions public: @@ -241,6 +254,19 @@ private: bool mUpdateBaseOrder; }; +// [SL:KB] - Patch: Appearance-SyncAttach | Checked: 2010-08-31 (Catznip-2.1.2a) | Added: Catznip-2.1.2a +class LLRegisterAttachmentCallback : public LLInventoryCallback +{ +public: + LLRegisterAttachmentCallback() {} + /*virtual*/ ~LLRegisterAttachmentCallback() {} + + /*virtual*/ void fire(const LLUUID& idItem) + { + LLAppearanceMgr::instance().onRegisterAttachmentComplete(idItem); + } +}; +// [/SL:KB] #define SUPPORT_ENSEMBLES 0 From 105ac7346455f84ed16f0b07749ad688e29b4ba6 Mon Sep 17 00:00:00 2001 From: Kitty Barnett Date: Sat, 4 Sep 2010 04:07:10 +0200 Subject: [PATCH 05/39] [Appearance/Misc] - fixed : LLWearableBridge::removeAllClothesFromAvatar() doesn't remove all clothing from the avatar --HG-- branch : Appearance-Misc --- indra/newview/llinventorybridge.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index 81174730c7..78327a25fb 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -4708,7 +4708,10 @@ void LLWearableBridge::removeAllClothesFromAvatar() if (itype == LLWearableType::WT_SHAPE || itype == LLWearableType::WT_SKIN || itype == LLWearableType::WT_HAIR || itype == LLWearableType::WT_EYES) continue; - for (S32 index = gAgentWearables.getWearableCount(itype)-1; index >= 0 ; --index) +// for (S32 index = gAgentWearables.getWearableCount(itype)-1; index >= 0 ; --index) +// [SL:KB] - Patch: Appearance-Misc | Checked: 2010-09-04 (Catznip-2.1.2a) | Added: Catznip-2.1.2a + for (S32 index = gAgentWearables.getWearableCount((LLWearableType::EType)itype)-1; index >= 0 ; --index) +// [/SL:KB] { LLViewerInventoryItem *item = dynamic_cast( gAgentWearables.getWearableInventoryItem((LLWearableType::EType)itype, index)); From 91cd437a358c0e07e03467e663638872c2fb3659 Mon Sep 17 00:00:00 2001 From: Kitty Barnett Date: Sat, 4 Sep 2010 04:07:40 +0200 Subject: [PATCH 06/39] [Appearance/Misc] - fixed : crash in LLAppearanceMgr::updateAppearanceFromCOF() due to "Appearance-SyncAttach" patch --HG-- branch : Appearance-Misc --- indra/newview/llappearancemgr.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp index 134231422d..d5e8f3da30 100644 --- a/indra/newview/llappearancemgr.cpp +++ b/indra/newview/llappearancemgr.cpp @@ -1726,7 +1726,7 @@ void LLAppearanceMgr::updateAppearanceFromCOF(bool update_base_outfit_ordering) const LLUUID& idItem = *itPendingObjLink; if (!gAgentAvatarp->isWearingAttachment(idItem)) { - mPendingObjLinks.erase(itPendingObjLink++); + itPendingObjLink = mPendingObjLinks.erase(itPendingObjLink); continue; } From be4ef986756bc8a128f0e4ea8e528330ca92c8ea Mon Sep 17 00:00:00 2001 From: Kitty Barnett Date: Mon, 6 Sep 2010 06:25:30 +0200 Subject: [PATCH 07/39] [Appearance/Misc] - fixed : VS2005 compiler issue (calling std::vector::erase with a const_iterator) --HG-- branch : Appearance-Misc --- indra/newview/llappearancemgr.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/newview/llappearancemgr.h b/indra/newview/llappearancemgr.h index 2349f6cc23..d77d726b74 100644 --- a/indra/newview/llappearancemgr.h +++ b/indra/newview/llappearancemgr.h @@ -222,7 +222,7 @@ public: void onRegisterAttachmentComplete(const LLUUID& idItem) { const LLUUID& idItemBase = gInventory.getLinkedItemID(idItem); - uuid_vec_t::const_iterator itPendingObjLink = std::find(mPendingObjLinks.begin(), mPendingObjLinks.end(), idItemBase); + uuid_vec_t::iterator itPendingObjLink = std::find(mPendingObjLinks.begin(), mPendingObjLinks.end(), idItemBase); if (itPendingObjLink != mPendingObjLinks.end()) mPendingObjLinks.erase(itPendingObjLink); } From d991b390fe30b7101b0f9506c44693f4f16c821b Mon Sep 17 00:00:00 2001 From: Kitty Barnett Date: Wed, 8 Sep 2010 02:39:13 +0200 Subject: [PATCH 08/39] [Appearance/Misc] Updated patch description from commit messages --HG-- branch : Appearance-Misc --- .hgpatchinfo/Appearance-Misc.desc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.hgpatchinfo/Appearance-Misc.desc b/.hgpatchinfo/Appearance-Misc.desc index 73ba073384..fff24b744a 100644 --- a/.hgpatchinfo/Appearance-Misc.desc +++ b/.hgpatchinfo/Appearance-Misc.desc @@ -9,3 +9,5 @@ - added : LegacyMultiAttachmentSupport debug setting to route "secondary attachment points" to the primary attachment point -> maps secondary attachment point range [39,68] onto [1,30] -> only dislays "secondary attachment points" correctly for *other* avatars (by design) +- fixed : Add to/Replace Outfit removes newly worn attachments on completion +- fixed : LLWearableBridge::removeAllClothesFromAvatar() doesn't remove all clothing from the avatar \ No newline at end of file From 61baa570fbc4b0be5bb124e816784c252e66a76f Mon Sep 17 00:00:00 2001 From: Kitty Barnett Date: Sat, 18 Sep 2010 08:56:08 +0200 Subject: [PATCH 09/39] [Appearance/Misc] - fixed : attachments that attach and then instantly detach don't have their COF link removed --HG-- branch : Appearance-Misc --- .hgpatchinfo/Appearance-Misc.desc | 3 ++- indra/newview/llappearancemgr.cpp | 16 ++++++++++++++++ indra/newview/llappearancemgr.h | 10 ++-------- 3 files changed, 20 insertions(+), 9 deletions(-) diff --git a/.hgpatchinfo/Appearance-Misc.desc b/.hgpatchinfo/Appearance-Misc.desc index fff24b744a..86570b97ac 100644 --- a/.hgpatchinfo/Appearance-Misc.desc +++ b/.hgpatchinfo/Appearance-Misc.desc @@ -10,4 +10,5 @@ -> maps secondary attachment point range [39,68] onto [1,30] -> only dislays "secondary attachment points" correctly for *other* avatars (by design) - fixed : Add to/Replace Outfit removes newly worn attachments on completion -- fixed : LLWearableBridge::removeAllClothesFromAvatar() doesn't remove all clothing from the avatar \ No newline at end of file +- fixed : LLWearableBridge::removeAllClothesFromAvatar() doesn't remove all clothing from the avatar +- fixed : attachments that attach and then instantly detach don't have their COF link removed diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp index b7687a29f4..2672110651 100644 --- a/indra/newview/llappearancemgr.cpp +++ b/indra/newview/llappearancemgr.cpp @@ -2816,6 +2816,22 @@ void LLAppearanceMgr::unregisterAttachment(const LLUUID& item_id) } } +// [SL:KB] - Patch: Appearance-SyncAttach | Checked: 2010-09-18 (Catznip-2.1.2e) | Modified: Catznip-2.1.2e +void LLAppearanceMgr::onRegisterAttachmentComplete(const LLUUID& idItem) +{ + const LLUUID& idItemBase = gInventory.getLinkedItemID(idItem); + + // Remove the attachment from the pending list + uuid_vec_t::iterator itPendingObjLink = std::find(mPendingObjLinks.begin(), mPendingObjLinks.end(), idItemBase); + if (itPendingObjLink != mPendingObjLinks.end()) + mPendingObjLinks.erase(itPendingObjLink); + + // It may have been detached already in which case we should remove the COF link + if ( (isAgentAvatarValid()) && (!gAgentAvatarp->isWearingAttachment(idItemBase)) ) + removeCOFItemLinks(idItem, false); +} +// [/SL:KB] + BOOL LLAppearanceMgr::getIsInCOF(const LLUUID& obj_id) const { return gInventory.isObjectDescendentOf(obj_id, getCOF()); diff --git a/indra/newview/llappearancemgr.h b/indra/newview/llappearancemgr.h index d77d726b74..e7fdd73c8c 100644 --- a/indra/newview/llappearancemgr.h +++ b/indra/newview/llappearancemgr.h @@ -217,15 +217,9 @@ private: std::auto_ptr mUnlockOutfitTimer; -// [SL:KB] - Patch: Appearance-SyncAttach | Checked: 2010-08-31 (Catznip-2.1.2a) | Added: Catznip-2.1.2a +// [SL:KB] - Patch: Appearance-SyncAttach | Checked: 2010-09-18 (Catznip-2.1.2e) | Modified: Catznip-2.1.2e public: - void onRegisterAttachmentComplete(const LLUUID& idItem) - { - const LLUUID& idItemBase = gInventory.getLinkedItemID(idItem); - uuid_vec_t::iterator itPendingObjLink = std::find(mPendingObjLinks.begin(), mPendingObjLinks.end(), idItemBase); - if (itPendingObjLink != mPendingObjLinks.end()) - mPendingObjLinks.erase(itPendingObjLink); - } + void onRegisterAttachmentComplete(const LLUUID& idItem); private: uuid_vec_t mPendingObjLinks; // [/SL:KB] From 9f8b7cceb5e00bc11789dd9cb0427d5020746ccd Mon Sep 17 00:00:00 2001 From: Kitty Barnett Date: Tue, 21 Sep 2010 07:34:12 +0200 Subject: [PATCH 10/39] [Appearance/Misc] - changed : enable "Replace Current Outfit" on the base outfit if it's marked dirty --HG-- branch : Appearance-Misc --- .hgpatchinfo/Appearance-Misc.desc | 1 + indra/newview/llappearancemgr.cpp | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/.hgpatchinfo/Appearance-Misc.desc b/.hgpatchinfo/Appearance-Misc.desc index 86570b97ac..acca6ea276 100644 --- a/.hgpatchinfo/Appearance-Misc.desc +++ b/.hgpatchinfo/Appearance-Misc.desc @@ -12,3 +12,4 @@ - fixed : Add to/Replace Outfit removes newly worn attachments on completion - fixed : LLWearableBridge::removeAllClothesFromAvatar() doesn't remove all clothing from the avatar - fixed : attachments that attach and then instantly detach don't have their COF link removed +- changed : enable "Replace Current Outfit" on the base outfit if it's marked dirty \ No newline at end of file diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp index 2672110651..6c565134cb 100644 --- a/indra/newview/llappearancemgr.cpp +++ b/indra/newview/llappearancemgr.cpp @@ -1319,7 +1319,10 @@ bool LLAppearanceMgr::getCanReplaceCOF(const LLUUID& outfit_cat_id) } // Check whether it's the base outfit. - if (outfit_cat_id.isNull() || outfit_cat_id == getBaseOutfitUUID()) +// if (outfit_cat_id.isNull() || outfit_cat_id == getBaseOutfitUUID()) +// [SL:KB] - Patch: Appearance-Misc | Checked: 2010-09-21 (Catznip-2.1.2d) | Added: Catznip-2.1.2d + if ( (outfit_cat_id.isNull()) || ((outfit_cat_id == getBaseOutfitUUID()) && (!isOutfitDirty())) ) +// [/SL:KB] { return false; } From 60fca653aae17c2984afe416c833dceaea67df7d Mon Sep 17 00:00:00 2001 From: Kitty Barnett Date: Wed, 22 Sep 2010 04:12:23 +0200 Subject: [PATCH 11/39] [Appearance/Misc] - fixed : multiple LLWearableHoldingPattern instances lead to "COF corruption" --HG-- branch : Appearance-Misc --- .hgpatchinfo/Appearance-Misc.desc | 1 + indra/newview/llappearancemgr.cpp | 34 +++++++++++++++++++++++++++++++ 2 files changed, 35 insertions(+) diff --git a/.hgpatchinfo/Appearance-Misc.desc b/.hgpatchinfo/Appearance-Misc.desc index acca6ea276..9a5c7ac844 100644 --- a/.hgpatchinfo/Appearance-Misc.desc +++ b/.hgpatchinfo/Appearance-Misc.desc @@ -1,4 +1,5 @@ [Appearance/Misc] +- fixed : multiple LLWearableHoldingPattern instances lead to "COF corruption" - fixed : LLAppearanceMgr::filterWearableItems() doesn't properly filter body parts - fixed : LLWearableList::processGetAssetReply() creates multiple LLWearable instances for the same asset UUID -> fix for http://jira.secondlife.com/browse/VWR-20608 diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp index 6c565134cb..aabae4e658 100644 --- a/indra/newview/llappearancemgr.cpp +++ b/indra/newview/llappearancemgr.cpp @@ -280,6 +280,10 @@ public: void onWearableAssetFetch(LLWearable *wearable); void onAllComplete(); +// [SL:KB] - Patch: Appearance-COFCorruption | Checked: 2010-04-14 (Catznip-2.0.1a) | Added: Catznip-2.0.0a + bool pollStopped(); +// [/SL:KB] + typedef std::list found_list_t; found_list_t& getFoundList(); void eraseTypeToLink(LLWearableType::EType type); @@ -517,6 +521,12 @@ bool LLWearableHoldingPattern::pollFetchCompletion() if (!isMostRecent()) { llwarns << "skipping because LLWearableHolding pattern is invalid (superceded by later outfit request)" << llendl; + +// [SL:KB] - Patch: Appearance-COFCorruption | Checked: 2010-04-14 (Catznip-2.0.1a) | Added: Catznip-2.0.0a + // If we were signalled to stop then we shouldn't do anything else except poll for when it's safe to delete ourselves + doOnIdleRepeating(boost::bind(&LLWearableHoldingPattern::pollStopped, this)); + return true; +// [/SL:KB] } bool completed = isFetchCompleted(); @@ -608,6 +618,11 @@ public: if (!mHolder->isMostRecent()) { llwarns << "skipping because LLWearableHolding pattern is invalid (superceded by later outfit request)" << llendl; + +// [SL:KB] - Patch: Appearance-COFCorruption | Checked: 2010-04-14 (Catznip-2.0.1a) | Added: Catznip-2.0.0a + // If we were signalled to stop then we shouldn't do anything else except poll for when it's safe to delete ourselves + return; +// [/SL:KB] } llinfos << "Recovered item for type " << mType << llendl; @@ -682,11 +697,30 @@ void LLWearableHoldingPattern::clearCOFLinksForMissingWearables() } } +// [SL:KB] - Patch: Appearance-COFCorruption | Checked: 2010-04-14 (Catznip-2.0.1a) | Added: Catznip-2.0.0a +bool LLWearableHoldingPattern::pollStopped() +{ + // We have to keep on polling until we're sure that all callbacks have completed or they'll cause a crash + if ( (isFetchCompleted()) && (isMissingCompleted()) ) + { + delete this; + return true; + } + return false; +} +// [/SL:KB] + bool LLWearableHoldingPattern::pollMissingWearables() { if (!isMostRecent()) { llwarns << "skipping because LLWearableHolding pattern is invalid (superceded by later outfit request)" << llendl; + +// [SL:KB] - Patch: Appearance-COFCorruption | Checked: 2010-04-14 (Catznip-2.0.1a) | Added: Catznip-2.0.0a + // If we were signalled to stop then we shouldn't do anything else except poll for when it's safe to delete ourselves + doOnIdleRepeating(boost::bind(&LLWearableHoldingPattern::pollStopped, this)); + return true; +// [/SL:KB] } bool timed_out = isTimedOut(); From aa6fda8113ec91bcf457b97679a56f43b0c9bd30 Mon Sep 17 00:00:00 2001 From: Kitty Barnett Date: Wed, 22 Sep 2010 04:43:36 +0200 Subject: [PATCH 12/39] [Appearance/Misc] - fixed : LLAgentWearables::mInitialWearablesLoaded doesn't accurately reflect whether the initial wearables have actually loaded -> if LL ever gets rid of all the legacy (mostly dead) code in llagentwearables.* we can just use mWearablesLoaded --HG-- branch : Appearance-Misc --- indra/newview/llagentwearables.cpp | 18 +++++++++--------- indra/newview/llagentwearables.h | 8 ++++---- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/indra/newview/llagentwearables.cpp b/indra/newview/llagentwearables.cpp index 7a7ec5dcc4..50e0262202 100644 --- a/indra/newview/llagentwearables.cpp +++ b/indra/newview/llagentwearables.cpp @@ -55,7 +55,7 @@ LLAgentWearables gAgentWearables; BOOL LLAgentWearables::mInitialWearablesUpdateReceived = FALSE; -// [SL:KB] - Patch: Appearance-InitialWearablesLoadedCallback | Checked: 2010-08-14 (Catznip-2.1.2a) | Added: Catznip-2.1.1d +// [SL:KB] - Patch: Appearance-InitialWearablesLoadedCallback | Checked: 2010-08-14 (Catznip-2.2.0a) | Added: Catznip-2.1.1d bool LLAgentWearables::mInitialWearablesLoaded = false; // [/SL:KB] @@ -1451,6 +1451,13 @@ void LLAgentWearables::setWearableOutfit(const LLInventoryItem::item_array_t& it // Start rendering & update the server mWearablesLoaded = TRUE; checkWearablesLoaded(); +// [SL:KB] - Patch: Appearance-InitialWearablesLoadedCallback | Checked: 2010-09-22 (Catznip-2.2.0a) | Modified: Catznip-2.2.0a + if (!mInitialWearablesLoaded) + { + mInitialWearablesLoaded = true; + mInitialWearablesLoadedSignal(); + } +// [/SL:KB] notifyLoadingFinished(); queryWearableCache(); updateServer(); @@ -2103,7 +2110,7 @@ boost::signals2::connection LLAgentWearables::addLoadedCallback(loaded_callback_ return mLoadedSignal.connect(cb); } -// [SL:KB] - Patch: Appearance-InitialWearablesLoadedCallback | Checked: 2010-08-14 (Catznip-2.1.2a) | Added: Catznip-2.1.1d +// [SL:KB] - Patch: Appearance-InitialWearablesLoadedCallback | Checked: 2010-08-14 (Catznip-2.2.0a) | Added: Catznip-2.1.1d boost::signals2::connection LLAgentWearables::addInitialWearablesLoadedCallback(loaded_callback_t cb) { return mInitialWearablesLoadedSignal.connect(cb); @@ -2113,13 +2120,6 @@ boost::signals2::connection LLAgentWearables::addInitialWearablesLoadedCallback( void LLAgentWearables::notifyLoadingStarted() { mCOFChangeInProgress = true; -// [SL:KB] - Patch: Appearance-InitialWearablesLoadedCallback | Checked: 2010-08-14 (Catznip-2.1.2a) | Added: Catznip-2.1.1d - if (!mInitialWearablesLoaded) - { - mInitialWearablesLoaded = true; - mInitialWearablesLoadedSignal(); - } -// [/SL:KB] mLoadingStartedSignal(); } diff --git a/indra/newview/llagentwearables.h b/indra/newview/llagentwearables.h index 45829f2b66..4a23eaba07 100644 --- a/indra/newview/llagentwearables.h +++ b/indra/newview/llagentwearables.h @@ -76,7 +76,7 @@ public: BOOL isWearableCopyable(LLWearableType::EType type, U32 index /*= 0*/) const; BOOL areWearablesLoaded() const; -// [SL:KB] - Patch: Appearance-InitialWearablesLoadedCallback | Checked: 2010-08-14 (Catznip-2.1.2a) | Added: Catznip-2.1.1d +// [SL:KB] - Patch: Appearance-InitialWearablesLoadedCallback | Checked: 2010-08-14 (Catznip-2.2.0a) | Added: Catznip-2.1.1d bool areInitalWearablesLoaded() const { return mInitialWearablesLoaded; } // [/SL:KB] bool isCOFChangeInProgress() const { return mCOFChangeInProgress; } @@ -237,7 +237,7 @@ public: typedef boost::function loaded_callback_t; typedef boost::signals2::signal loaded_signal_t; boost::signals2::connection addLoadedCallback(loaded_callback_t cb); -// [SL:KB] - Patch: Appearance-InitialWearablesLoadedCallback | Checked: 2010-08-14 (Catznip-2.1.2a) | Added: Catznip-2.1.1d +// [SL:KB] - Patch: Appearance-InitialWearablesLoadedCallback | Checked: 2010-08-14 (Catznip-2.2.0a) | Added: Catznip-2.1.1d boost::signals2::connection addInitialWearablesLoadedCallback(loaded_callback_t cb); // [/SL:KB] @@ -247,7 +247,7 @@ public: private: loading_started_signal_t mLoadingStartedSignal; // should be called before wearables are changed loaded_signal_t mLoadedSignal; // emitted when all agent wearables get loaded -// [SL:KB] - Patch: Appearance-InitialWearablesLoadedCallback | Checked: 2010-08-14 (Catznip-2.1.2a) | Added: Catznip-2.1.1d +// [SL:KB] - Patch: Appearance-InitialWearablesLoadedCallback | Checked: 2010-08-14 (Catznip-2.2.0a) | Added: Catznip-2.1.1d loaded_signal_t mInitialWearablesLoadedSignal; // emitted once when the initial wearables are loaded // [/SL:KB] @@ -260,7 +260,7 @@ private: wearableentry_map_t mWearableDatas; static BOOL mInitialWearablesUpdateReceived; -// [SL:KB] - Patch: Appearance-InitialWearablesLoadedCallback | Checked: 2010-08-14 (Catznip-2.1.2a) | Added: Catznip-2.1.1d +// [SL:KB] - Patch: Appearance-InitialWearablesLoadedCallback | Checked: 2010-08-14 (Catznip-2.2.0a) | Added: Catznip-2.2.0a static bool mInitialWearablesLoaded; // [/SL:KB] BOOL mWearablesLoaded; From 723e874e3880c92d57aa6b6a4c4d8bc0226361be Mon Sep 17 00:00:00 2001 From: Kitty Barnett Date: Wed, 22 Sep 2010 08:06:03 +0200 Subject: [PATCH 13/39] [Appearance/Misc] - fixed : rewrote fix for http://jira.secondlife.com/browse/VWR-18512 --HG-- branch : Appearance-Misc --- indra/newview/llagentwearables.cpp | 13 ++++- indra/newview/llagentwearables.h | 6 +- indra/newview/llappearancemgr.cpp | 88 +++++++----------------------- indra/newview/llappearancemgr.h | 4 +- indra/newview/llvoavatar.cpp | 9 ++- 5 files changed, 46 insertions(+), 74 deletions(-) diff --git a/indra/newview/llagentwearables.cpp b/indra/newview/llagentwearables.cpp index 50e0262202..eedf29d0e3 100644 --- a/indra/newview/llagentwearables.cpp +++ b/indra/newview/llagentwearables.cpp @@ -1735,7 +1735,10 @@ void LLAgentWearables::userRemoveAllClothesStep2(BOOL proceed) // Combines userRemoveAllAttachments() and userAttachMultipleAttachments() logic to // get attachments into desired state with minimal number of adds/removes. -void LLAgentWearables::userUpdateAttachments(LLInventoryModel::item_array_t& obj_item_array) +//void LLAgentWearables::userUpdateAttachments(LLInventoryModel::item_array_t& obj_item_array) +// [SL:KB] - Patch: Appearance-SyncAttach | Checked: 2010-09-22 (Catznip-2.2.0a) | Added: Catznip-2.2.0a +void LLAgentWearables::userUpdateAttachments(LLInventoryModel::item_array_t& obj_item_array, bool fAttachOnly) +// [/SL:KB] { // Possible cases: // already wearing but not in request set -> take off. @@ -1800,7 +1803,13 @@ void LLAgentWearables::userUpdateAttachments(LLInventoryModel::item_array_t& obj // llinfos << "remove " << remove_count << " add " << add_count << llendl; // Remove everything in objects_to_remove - userRemoveMultipleAttachments(objects_to_remove); +// userRemoveMultipleAttachments(objects_to_remove); +// [SL:KB] - Patch: Appearance-SyncAttach | Checked: 2010-09-22 (Catznip-2.2.0a) | Added: Catznip-2.2.0a + if (!fAttachOnly) + { + userRemoveMultipleAttachments(objects_to_remove); + } +// [/SL:KB] // Add everything in items_to_add userAttachMultipleAttachments(items_to_add); diff --git a/indra/newview/llagentwearables.h b/indra/newview/llagentwearables.h index 4a23eaba07..80531f62db 100644 --- a/indra/newview/llagentwearables.h +++ b/indra/newview/llagentwearables.h @@ -218,7 +218,11 @@ public: typedef std::vector llvo_vec_t; - static void userUpdateAttachments(LLInventoryModel::item_array_t& obj_item_array); +// static void userUpdateAttachments(LLInventoryModel::item_array_t& obj_item_array); +// [SL:KB] - Patch: Appearance-SyncAttach | Checked: 2010-09-22 (Catznip-2.2.0a) | Added: Catznip-2.2.0a + // Not the best way to go about this but other attempts changed far too much LL code to be a viable solution + static void userUpdateAttachments(LLInventoryModel::item_array_t& obj_item_array, bool fAttachOnly = false); +// [/SL:KB] static void userRemoveMultipleAttachments(llvo_vec_t& llvo_array); static void userRemoveAllAttachments(); static void userAttachMultipleAttachments(LLInventoryModel::item_array_t& obj_item_array); diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp index aabae4e658..e414084421 100644 --- a/indra/newview/llappearancemgr.cpp +++ b/indra/newview/llappearancemgr.cpp @@ -288,7 +288,7 @@ public: found_list_t& getFoundList(); void eraseTypeToLink(LLWearableType::EType type); void eraseTypeToRecover(LLWearableType::EType type); - void setObjItems(const LLInventoryModel::item_array_t& items); +// void setObjItems(const LLInventoryModel::item_array_t& items); void setGestItems(const LLInventoryModel::item_array_t& items); bool isMostRecent(); void handleLateArrivals(); @@ -296,13 +296,8 @@ public: private: found_list_t mFoundList; -// [SL:KB] - Patch: Appearance-SyncAttach | Checked: 2010-03-22 (Catznip-2.1.2a) | Added: Catznip-2.1.2a - // Fix for http://jira.secondlife.com/browse/VWR-18512 -/* - LLInventoryModel::item_array_t mObjItems; +// LLInventoryModel::item_array_t mObjItems; LLInventoryModel::item_array_t mGestItems; -*/ -// [/SL:KB] typedef std::set type_set_t; type_set_t mTypesToRecover; type_set_t mTypesToLink; @@ -367,20 +362,20 @@ void LLWearableHoldingPattern::eraseTypeToRecover(LLWearableType::EType type) mTypesToRecover.erase(type); } -// [SL:KB] - Patch: Appearance-SyncAttach | Checked: 2010-06-19 (Catznip-2.1.2a) | Added: Catznip-2.1.2a +// [SL:KB] - Patch: Appearance-SyncAttach | Checked: 2010-06-19 (Catznip-2.2.0a) | Added: Catznip-2.1.2a // Fix for http://jira.secondlife.com/browse/VWR-18512 /* void LLWearableHoldingPattern::setObjItems(const LLInventoryModel::item_array_t& items) { mObjItems = items; } +*/ +// [/SL:KB] void LLWearableHoldingPattern::setGestItems(const LLInventoryModel::item_array_t& items) { mGestItems = items; } -*/ -// [/SL:KB] bool LLWearableHoldingPattern::isFetchCompleted() { @@ -450,9 +445,6 @@ void LLWearableHoldingPattern::onAllComplete() } // Activate all gestures in this folder -// [SL:KB] - Patch: Appearance-SyncAttach | Checked: 2010-03-22 (Catznip-2.1.2a) | Added: Catznip-2.1.2a - // Fix for http://jira.secondlife.com/browse/VWR-18512 -/* if (mGestItems.count() > 0) { llinfos << "Activating " << mGestItems.count() << " gestures" << llendl; @@ -470,22 +462,16 @@ void LLWearableHoldingPattern::onAllComplete() gInventory.notifyObservers(); } } -*/ -// [/SL:KB] // Update wearables. llinfos << "Updating agent wearables with " << mResolved << " wearable items " << llendl; LLAppearanceMgr::instance().updateAgentWearables(this, false); -// [SL:KB] - Patch: Appearance-SyncAttach | Checked: 2010-03-22 (Catznip-2.1.2a) | Added: Catznip-2.1.2a +// [SL:KB] - Patch: Appearance-SyncAttach | Checked: 2010-03-22 (Catznip-2.2.0a) | Added: Catznip-2.1.2a // Fix for http://jira.secondlife.com/browse/VWR-18512 /* // Update attachments to match those requested. -// if (isAgentAvatarValid()) -// [SL:KB] - Patch: Appearance-Misc | Checked: 2010-08-14 (Catznip-2.1.2a) | Modified: Catznip-2.1.1d - // Don't update attachments until initial wearables have loaded (should reduce random attaching/detaching/reattaching at log-on) - if ( (isAgentAvatarValid()) && (gAgentWearables.areInitalWearablesLoaded()) ) -// [/SL:KB] + if (isAgentAvatarValid()) { llinfos << "Updating " << mObjItems.count() << " attachments" << llendl; LLAgentWearables::userUpdateAttachments(mObjItems); @@ -1754,10 +1740,14 @@ void LLAppearanceMgr::updateAppearanceFromCOF(bool update_base_outfit_ordering) remove_non_link_items(obj_items); remove_non_link_items(gest_items); -// [SL:KB] - Patch: Appearance-SyncAttach | Checked: 2010-08-31 (Catznip-2.1.2a) | Added: Catznip-2.1.2a - // Include attachments which should be in COF but don't have their link created yet + dumpItemArray(wear_items,"asset_dump: wear_item"); + dumpItemArray(obj_items,"asset_dump: obj_item"); + +// [SL:KB] - Patch: Appearance-SyncAttach | Checked: 2010-09-22 (Catznip-2.2.0a) | Added: Catznip-2.2.0a + // Update attachments to match those requested. if (isAgentAvatarValid()) { + // Include attachments which should be in COF but don't have their link created yet uuid_vec_t::iterator itPendingObjLink = mPendingObjLinks.begin(); while (itPendingObjLink != mPendingObjLinks.end()) { @@ -1774,12 +1764,13 @@ void LLAppearanceMgr::updateAppearanceFromCOF(bool update_base_outfit_ordering) ++itPendingObjLink; } + + // Don't remove attachments until avatar is fully loaded (should reduce random attaching/detaching/reattaching at log-on) + llinfos << "Updating " << obj_items.count() << " attachments" << llendl; + LLAgentWearables::userUpdateAttachments(obj_items, !gAgentAvatarp->isFullyLoaded()); } // [/SL:KB] - dumpItemArray(wear_items,"asset_dump: wear_item"); - dumpItemArray(obj_items,"asset_dump: obj_item"); - if(!wear_items.count()) { LLNotificationsUtil::add("CouldNotPutOnOutfit"); @@ -1789,49 +1780,10 @@ void LLAppearanceMgr::updateAppearanceFromCOF(bool update_base_outfit_ordering) //preparing the list of wearables in the correct order for LLAgentWearables sortItemsByActualDescription(wear_items); -// [SL:KB] - Patch: Appearance-SyncAttach | Checked: 2010-03-22 (Catznip-2.1.2a) | Added: Catznip-2.1.2a - // Fix for http://jira.secondlife.com/browse/VWR-18512 [code below copied from LLWearableHoldingPattern::pollCompletion()] - - // Activate all gestures in this folder - if (gest_items.count() > 0) - { - llinfos << "Activating " << gest_items.count() << " gestures" << llendl; - - LLGestureMgr::instance().activateGestures(gest_items); - - // Update the inventory item labels to reflect the fact - // they are active. - LLViewerInventoryCategory* catp = - gInventory.getCategory(LLAppearanceMgr::instance().getCOF()); - - if (catp) - { - gInventory.updateCategory(catp); - gInventory.notifyObservers(); - } - } - - // Update attachments to match those requested. -// if (isAgentAvatarValid()) -// [SL:KB] - Patch: Appearance-Misc | Checked: 2010-08-14 (Catznip-2.1.2a) | Modified: Catznip-2.1.1d - // Don't update attachments until initial wearables have loaded (should reduce random attaching/detaching/reattaching at log-on) - if ( (isAgentAvatarValid()) && (gAgentWearables.areInitalWearablesLoaded()) ) -// [/SL:KB] - { - llinfos << "Updating " << obj_items.count() << " attachments" << llendl; - LLAgentWearables::userUpdateAttachments(obj_items); - } -// [/SL:KB] - LLWearableHoldingPattern* holder = new LLWearableHoldingPattern; -// [SL:KB] - Patch: Appearance-SyncAttach | Checked: 2010-03-22 (Catznip-2.1.2a) | Added: Catznip-2.1.2a - // Fix for http://jira.secondlife.com/browse/VWR-18512 -/* - holder->setObjItems(obj_items); +// holder->setObjItems(obj_items); holder->setGestItems(gest_items); -*/ -// [/SL:KB] // Note: can't do normal iteration, because if all the // wearables can be resolved immediately, then the @@ -2828,7 +2780,7 @@ void LLAppearanceMgr::registerAttachment(const LLUUID& item_id) // it will trigger gAgentWariables.notifyLoadingFinished() // But it is not acceptable solution. See EXT-7777 // LLAppearanceMgr::addCOFItemLink(item_id, false); // Add COF link for item. -// [SL:KB] - Patch: Appearance-SyncAttach | Checked: 2010-08-31 (Catznip-2.1.2a) | Added: Catznip-2.1.2a +// [SL:KB] - Patch: Appearance-SyncAttach | Checked: 2010-08-31 (Catznip-2.2.0a) | Added: Catznip-2.1.2a mPendingObjLinks.push_back(item_id); LLAppearanceMgr::addCOFItemLink(item_id, false, new LLRegisterAttachmentCallback()); // Add COF link for item. // [/SL:KB] @@ -2865,7 +2817,7 @@ void LLAppearanceMgr::onRegisterAttachmentComplete(const LLUUID& idItem) // It may have been detached already in which case we should remove the COF link if ( (isAgentAvatarValid()) && (!gAgentAvatarp->isWearingAttachment(idItemBase)) ) - removeCOFItemLinks(idItem, false); + removeCOFItemLinks(idItemBase, false); } // [/SL:KB] diff --git a/indra/newview/llappearancemgr.h b/indra/newview/llappearancemgr.h index e7fdd73c8c..6a13308f16 100644 --- a/indra/newview/llappearancemgr.h +++ b/indra/newview/llappearancemgr.h @@ -217,7 +217,7 @@ private: std::auto_ptr mUnlockOutfitTimer; -// [SL:KB] - Patch: Appearance-SyncAttach | Checked: 2010-09-18 (Catznip-2.1.2e) | Modified: Catznip-2.1.2e +// [SL:KB] - Patch: Appearance-SyncAttach | Checked: 2010-09-18 (Catznip-2.2.0a) | Modified: Catznip-2.1.2e public: void onRegisterAttachmentComplete(const LLUUID& idItem); private: @@ -250,7 +250,7 @@ private: bool mUpdateBaseOrder; }; -// [SL:KB] - Patch: Appearance-SyncAttach | Checked: 2010-08-31 (Catznip-2.1.2a) | Added: Catznip-2.1.2a +// [SL:KB] - Patch: Appearance-SyncAttach | Checked: 2010-08-31 (Catznip-2.2.0a) | Added: Catznip-2.1.2a class LLRegisterAttachmentCallback : public LLInventoryCallback { public: diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index 35dc8d4caf..1af3c336bc 100644 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -6035,10 +6035,17 @@ BOOL LLVOAvatar::processFullyLoadedChange(bool loading) BOOL LLVOAvatar::isFullyLoaded() const { - if (gSavedSettings.getBOOL("RenderUnloadedAvatar")) +// if (gSavedSettings.getBOOL("RenderUnloadedAvatar")) +// return TRUE; +// else +// return mFullyLoaded; +// [SL:KB] - Patch: Appearance-SyncAttach | Checked: 2010-09-22 (Catznip-2.2.0a) | Added: Catznip-2.2.0a + // Changes to LLAppearanceMgr::updateAppearanceFromCOF() expect this function to actually return mFullyLoaded for gAgentAvatarp + if ( (!isSelf()) && (gSavedSettings.getBOOL("RenderUnloadedAvatar")) ) return TRUE; else return mFullyLoaded; +// [/SL:KB] } From 6c32648b102bf914e3ed9993d06504a0bfab91bf Mon Sep 17 00:00:00 2001 From: Kitty Barnett Date: Wed, 22 Sep 2010 15:52:26 +0200 Subject: [PATCH 14/39] [Appearance/Misc] - review : reviewed remaining changes for SL-2.2.0 and updated patch description --HG-- branch : Appearance-Misc --- .hgpatchinfo/Appearance-Misc.desc | 11 +++++++---- indra/newview/llappearancemgr.cpp | 17 +++++++++-------- indra/newview/llinventorybridge.cpp | 6 +++--- indra/newview/llvoavatar.cpp | 4 ++-- indra/newview/llwearablelist.cpp | 2 +- 5 files changed, 22 insertions(+), 18 deletions(-) diff --git a/.hgpatchinfo/Appearance-Misc.desc b/.hgpatchinfo/Appearance-Misc.desc index 9a5c7ac844..e44288b5fb 100644 --- a/.hgpatchinfo/Appearance-Misc.desc +++ b/.hgpatchinfo/Appearance-Misc.desc @@ -5,12 +5,15 @@ -> fix for http://jira.secondlife.com/browse/VWR-20608 - changed : deprecated removeItemFromAvatar() in favour of having LLAppearanceMgr::removeItemFromAvatar() handle it directly/correctly -> wearables can't be worn/removed in 2.X without the viewer already having an LLWearable instance for it anyway -- added : InitialWearablesLoadedSignal signal which is emitted *once* when the initial wearables are loaded +- fixed : attachments that attach and then instantly detach don't have their COF link removed - fixed : attachments sometimes detach only to instantly get reattached after logon +- changed : "RenderUnloadedAvatar" no longer affects the user's own avatar + -> side-effect of the fix above due to the change to LLVOAvatar::isFullyLoaded() +- fixed : Add to/Replace Outfit removes newly worn attachments on completion + -> fix for http://jira.secondlife.com/browse/VWR-18512 +- added : InitialWearablesLoadedSignal signal which is emitted *once* when the initial wearables are loaded - added : LegacyMultiAttachmentSupport debug setting to route "secondary attachment points" to the primary attachment point -> maps secondary attachment point range [39,68] onto [1,30] -> only dislays "secondary attachment points" correctly for *other* avatars (by design) -- fixed : Add to/Replace Outfit removes newly worn attachments on completion - fixed : LLWearableBridge::removeAllClothesFromAvatar() doesn't remove all clothing from the avatar -- fixed : attachments that attach and then instantly detach don't have their COF link removed -- changed : enable "Replace Current Outfit" on the base outfit if it's marked dirty \ No newline at end of file +- changed : enable "Replace Current Outfit" on the base outfit if it's marked dirty diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp index e414084421..9859931feb 100644 --- a/indra/newview/llappearancemgr.cpp +++ b/indra/newview/llappearancemgr.cpp @@ -280,7 +280,7 @@ public: void onWearableAssetFetch(LLWearable *wearable); void onAllComplete(); -// [SL:KB] - Patch: Appearance-COFCorruption | Checked: 2010-04-14 (Catznip-2.0.1a) | Added: Catznip-2.0.0a +// [SL:KB] - Patch: Appearance-COFCorruption | Checked: 2010-04-14 (Catznip-2.2.0a) | Added: Catznip-2.0.0a bool pollStopped(); // [/SL:KB] @@ -508,7 +508,7 @@ bool LLWearableHoldingPattern::pollFetchCompletion() { llwarns << "skipping because LLWearableHolding pattern is invalid (superceded by later outfit request)" << llendl; -// [SL:KB] - Patch: Appearance-COFCorruption | Checked: 2010-04-14 (Catznip-2.0.1a) | Added: Catznip-2.0.0a +// [SL:KB] - Patch: Appearance-COFCorruption | Checked: 2010-04-14 (Catznip-2.2.0a) | Added: Catznip-2.0.0a // If we were signalled to stop then we shouldn't do anything else except poll for when it's safe to delete ourselves doOnIdleRepeating(boost::bind(&LLWearableHoldingPattern::pollStopped, this)); return true; @@ -605,7 +605,7 @@ public: { llwarns << "skipping because LLWearableHolding pattern is invalid (superceded by later outfit request)" << llendl; -// [SL:KB] - Patch: Appearance-COFCorruption | Checked: 2010-04-14 (Catznip-2.0.1a) | Added: Catznip-2.0.0a +// [SL:KB] - Patch: Appearance-COFCorruption | Checked: 2010-04-14 (Catznip-2.2.0a) | Added: Catznip-2.0.0a // If we were signalled to stop then we shouldn't do anything else except poll for when it's safe to delete ourselves return; // [/SL:KB] @@ -683,7 +683,7 @@ void LLWearableHoldingPattern::clearCOFLinksForMissingWearables() } } -// [SL:KB] - Patch: Appearance-COFCorruption | Checked: 2010-04-14 (Catznip-2.0.1a) | Added: Catznip-2.0.0a +// [SL:KB] - Patch: Appearance-COFCorruption | Checked: 2010-04-14 (Catznip-2.2.0a) | Added: Catznip-2.0.0a bool LLWearableHoldingPattern::pollStopped() { // We have to keep on polling until we're sure that all callbacks have completed or they'll cause a crash @@ -702,7 +702,7 @@ bool LLWearableHoldingPattern::pollMissingWearables() { llwarns << "skipping because LLWearableHolding pattern is invalid (superceded by later outfit request)" << llendl; -// [SL:KB] - Patch: Appearance-COFCorruption | Checked: 2010-04-14 (Catznip-2.0.1a) | Added: Catznip-2.0.0a +// [SL:KB] - Patch: Appearance-COFCorruption | Checked: 2010-04-14 (Catznip-2.2.0a) | Added: Catznip-2.0.0a // If we were signalled to stop then we shouldn't do anything else except poll for when it's safe to delete ourselves doOnIdleRepeating(boost::bind(&LLWearableHoldingPattern::pollStopped, this)); return true; @@ -1340,7 +1340,7 @@ bool LLAppearanceMgr::getCanReplaceCOF(const LLUUID& outfit_cat_id) // Check whether it's the base outfit. // if (outfit_cat_id.isNull() || outfit_cat_id == getBaseOutfitUUID()) -// [SL:KB] - Patch: Appearance-Misc | Checked: 2010-09-21 (Catznip-2.1.2d) | Added: Catznip-2.1.2d +// [SL:KB] - Patch: Appearance-Misc | Checked: 2010-09-21 (Catznip-2.2.0a) | Added: Catznip-2.1.2d if ( (outfit_cat_id.isNull()) || ((outfit_cat_id == getBaseOutfitUUID()) && (!isOutfitDirty())) ) // [/SL:KB] { @@ -1408,7 +1408,7 @@ void LLAppearanceMgr::filterWearableItems( if (size <= 0) continue; // S32 start_index = llmax(0,size-max_per_type); -// [SL:KB] - Patch: Appearance-Misc | Checked: 2010-05-11 (Catznip-2.1.2a) | Added: Catznip-2.0.0h +// [SL:KB] - Patch: Appearance-Misc | Checked: 2010-05-11 (Catznip-2.2.0a) | Added: Catznip-2.0.0h S32 start_index = llmax(0, size - ((LLAssetType::AT_BODYPART == LLWearableType::getAssetType((LLWearableType::EType)i)) ? 1 : max_per_type)); // [/SL:KB[ @@ -1780,6 +1780,7 @@ void LLAppearanceMgr::updateAppearanceFromCOF(bool update_base_outfit_ordering) //preparing the list of wearables in the correct order for LLAgentWearables sortItemsByActualDescription(wear_items); + LLWearableHoldingPattern* holder = new LLWearableHoldingPattern; // holder->setObjItems(obj_items); @@ -2591,7 +2592,7 @@ void LLAppearanceMgr::removeItemFromAvatar(const LLUUID& id_to_remove) // //*TODO move here the exact removing code from LLWearableBridge::removeItemFromAvatar in the future // LLWearableBridge::removeItemFromAvatar(item_to_remove); // } -// [SL:KB] - Patch: Appearance-RemoveWearableFromAvatar | Checked: 2010-08-13 (Catznip-2.1.2a) | Added: Catznip-2.1.1d +// [SL:KB] - Patch: Appearance-RemoveWearableFromAvatar | Checked: 2010-08-13 (Catznip-2.2.0a) | Added: Catznip-2.1.1d { /*const*/ LLWearable* pWearable = gAgentWearables.getWearableFromItemID(item_to_remove->getLinkedUUID()); if ( (pWearable) && (LLAssetType::AT_BODYPART != pWearable->getAssetType()) ) diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index 5f5082d116..20176a6e55 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -4338,7 +4338,7 @@ void remove_inventory_category_from_avatar_step2( BOOL proceed, LLUUID category_ LLWearableBridge::onRemoveFromAvatarArrived, new OnRemoveStruct(item->getLinkedUUID())); */ -// [SL:KB] - Patch: Appearance-RemoveWearableFromAvatar | Checked: 2010-08-13 (Catznip-2.1.2a) | Added: Catznip-2.1.1d +// [SL:KB] - Patch: Appearance-RemoveWearableFromAvatar | Checked: 2010-08-13 (Catznip-2.2.0a) | Added: Catznip-2.1.1d LLAppearanceMgr::instance().removeItemFromAvatar(item->getUUID()); // [/SL:KB] } @@ -4724,7 +4724,7 @@ void LLWearableBridge::removeAllClothesFromAvatar() continue; // for (S32 index = gAgentWearables.getWearableCount(itype)-1; index >= 0 ; --index) -// [SL:KB] - Patch: Appearance-Misc | Checked: 2010-09-04 (Catznip-2.1.2a) | Added: Catznip-2.1.2a +// [SL:KB] - Patch: Appearance-Misc | Checked: 2010-09-04 (Catznip-2.2.0a) | Added: Catznip-2.1.2a for (S32 index = gAgentWearables.getWearableCount((LLWearableType::EType)itype)-1; index >= 0 ; --index) // [/SL:KB] { @@ -4759,7 +4759,7 @@ void LLWearableBridge::removeItemFromAvatar(LLViewerInventoryItem *item) LLWearableBridge::onRemoveFromAvatarArrived, new OnRemoveStruct(item->getUUID())); */ -// [SL:KB] - Patch: Appearance-Misc | Checked: 2010-08-13 (Catznip-2.1.2a) | Added: Catznip-2.1.1d +// [SL:KB] - Patch: Appearance-RemoveWearableFromAvatar | Checked: 2010-08-13 (Catznip-2.2.0a) | Added: Catznip-2.1.1d LLAppearanceMgr::instance().removeItemFromAvatar(item->getUUID()); // [/SL:KB] } diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index 1af3c336bc..431cad12f9 100644 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -5577,11 +5577,11 @@ LLViewerJointAttachment* LLVOAvatar::getTargetAttachmentPoint(LLViewerObject* vi { llwarns << "Object attachment point invalid: " << attachmentID << llendl; // attachment = get_if_there(mAttachmentPoints, 1, (LLViewerJointAttachment*)NULL); // Arbitrary using 1 (chest) -// [SL:KB] - Patch: Appearance-LegacyMultiAttachment | Checked: 2010-08-28 (Catznip-2.1.2a) | Added: Catznip2.1.2a +// [SL:KB] - Patch: Appearance-LegacyMultiAttachment | Checked: 2010-08-28 (Catznip-2.2.0a) | Added: Catznip2.1.2a S32 idxAttachPt = 1; if ( (!isSelf()) && (gSavedSettings.getBOOL("LegacyMultiAttachmentSupport")) && (attachmentID > 38) && (attachmentID <= 68) ) idxAttachPt = attachmentID - 38; - attachment = get_if_there(mAttachmentPoints, idxAttachPt, (LLViewerJointAttachment*)NULL); // Arbitrary using 1 (chest) + attachment = get_if_there(mAttachmentPoints, idxAttachPt, (LLViewerJointAttachment*)NULL); // [/SL:KB] } diff --git a/indra/newview/llwearablelist.cpp b/indra/newview/llwearablelist.cpp index d88e7531fc..ddf5cd4b70 100644 --- a/indra/newview/llwearablelist.cpp +++ b/indra/newview/llwearablelist.cpp @@ -96,7 +96,7 @@ void LLWearableList::processGetAssetReply( const char* filename, const LLAssetID BOOL isNewWearable = FALSE; LLWearableArrivedData* data = (LLWearableArrivedData*) userdata; // LLWearable* wearable = NULL; // NULL indicates failure -// [SL:KB] - Patch: Appearance-Misc | Checked: 2010-08-13 (Catznip-2.1.2a) | Added: Catznip-2.1.1d +// [SL:KB] - Patch: Appearance-Misc | Checked: 2010-08-13 (Catznip-2.2.0a) | Added: Catznip-2.1.1d LLWearable* wearable = get_if_there(LLWearableList::instance().mList, uuid, (LLWearable*)NULL); if (wearable) { From c4624454f1902f8f14f95f97eba42733b6610f77 Mon Sep 17 00:00:00 2001 From: Kitty Barnett Date: Fri, 24 Sep 2010 08:15:14 +0200 Subject: [PATCH 15/39] [Appearance/Misc] - fixed : "Add to Outfit" and "Replace Outfit" already place the attachment links into COF and don't need to be tracked through mPendingObjLinks - fixed : get_is_item_worn() shouldn't make the assumption that items in COFs are always worn --HG-- branch : Appearance-Misc --- indra/newview/llappearancemgr.cpp | 13 +++++++++---- indra/newview/llinventoryfunctions.cpp | 9 +++++---- 2 files changed, 14 insertions(+), 8 deletions(-) diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp index 9859931feb..0844c77729 100644 --- a/indra/newview/llappearancemgr.cpp +++ b/indra/newview/llappearancemgr.cpp @@ -1752,7 +1752,7 @@ void LLAppearanceMgr::updateAppearanceFromCOF(bool update_base_outfit_ordering) while (itPendingObjLink != mPendingObjLinks.end()) { const LLUUID& idItem = *itPendingObjLink; - if (!gAgentAvatarp->isWearingAttachment(idItem)) + if ( (!gAgentAvatarp->isWearingAttachment(idItem)) || (isLinkInCOF(idItem)) ) { itPendingObjLink = mPendingObjLinks.erase(itPendingObjLink); continue; @@ -2781,9 +2781,14 @@ void LLAppearanceMgr::registerAttachment(const LLUUID& item_id) // it will trigger gAgentWariables.notifyLoadingFinished() // But it is not acceptable solution. See EXT-7777 // LLAppearanceMgr::addCOFItemLink(item_id, false); // Add COF link for item. -// [SL:KB] - Patch: Appearance-SyncAttach | Checked: 2010-08-31 (Catznip-2.2.0a) | Added: Catznip-2.1.2a - mPendingObjLinks.push_back(item_id); - LLAppearanceMgr::addCOFItemLink(item_id, false, new LLRegisterAttachmentCallback()); // Add COF link for item. +// [SL:KB] - Patch: Appearance-SyncAttach | Checked: 2010-09-24 (Catznip-2.2.0a) | Modified: Catznip-2.2.0a + if (!isLinkInCOF(item_id)) + { + mPendingObjLinks.push_back(item_id); + + LLPointer cb = new LLRegisterAttachmentCallback(); + LLAppearanceMgr::addCOFItemLink(item_id, false, cb); // Add COF link for item. + } // [/SL:KB] } else diff --git a/indra/newview/llinventoryfunctions.cpp b/indra/newview/llinventoryfunctions.cpp index f3d9639dee..18ce152624 100644 --- a/indra/newview/llinventoryfunctions.cpp +++ b/indra/newview/llinventoryfunctions.cpp @@ -217,10 +217,11 @@ BOOL get_is_item_worn(const LLUUID& id) return FALSE; // Consider the item as worn if it has links in COF. - if (LLAppearanceMgr::instance().isLinkInCOF(id)) - { - return TRUE; - } +// [SL:KB] - The code below causes problems across the board so it really just needs to go +// if (LLAppearanceMgr::instance().isLinkInCOF(id)) +// { +// return TRUE; +// } switch(item->getType()) { From 37b68114fdea88709ef99e25bb2c0637e799f8af Mon Sep 17 00:00:00 2001 From: Kitty Barnett Date: Tue, 28 Sep 2010 15:06:32 +0200 Subject: [PATCH 16/39] - fixed : drag-and-drop wear behaviour of an attachment onto self isn't consistant with the drag-and-drop behaviour of wearables -> normal-drop : replace wear -> Ctrl-drop : add wear --HG-- branch : Appearance-Misc --- indra/newview/lltooldraganddrop.cpp | 12 ++++++++++-- indra/newview/llviewerinventory.cpp | 13 ++++++++++--- indra/newview/llviewerinventory.h | 8 +++++++- 3 files changed, 27 insertions(+), 6 deletions(-) diff --git a/indra/newview/lltooldraganddrop.cpp b/indra/newview/lltooldraganddrop.cpp index d6e069b3dc..e308c73d15 100644 --- a/indra/newview/lltooldraganddrop.cpp +++ b/indra/newview/lltooldraganddrop.cpp @@ -1623,7 +1623,11 @@ EAcceptance LLToolDragAndDrop::dad3dRezAttachmentFromInv( { if (mSource == SOURCE_LIBRARY) { - LLPointer cb = new RezAttachmentCallback(0); +// LLPointer cb = new RezAttachmentCallback(0); +// [SL:KB] - Patch: Appearance-Misc | Checked: 2010-09-28 (Catznip-2.2.0a) | Added: Catznip-2.2.0a + // Make this behave consistent with dad3dWearItem + LLPointer cb = new RezAttachmentCallback(0, !(mask & MASK_CONTROL)); +// [/SL:KB] copy_inventory_item( gAgent.getID(), item->getPermissions().getOwner(), @@ -1634,7 +1638,11 @@ EAcceptance LLToolDragAndDrop::dad3dRezAttachmentFromInv( } else { - rez_attachment(item, 0); +// rez_attachment(item, 0); +// [SL:KB] - Patch: Appearance-Misc | Checked: 2010-09-28 (Catznip-2.2.0a) | Added: Catznip-2.2.0a + // Make this behave consistent with dad3dWearItem + rez_attachment(item, 0, !(mask & MASK_CONTROL)); +// [/SL:KB] } } return ACCEPT_YES_SINGLE; diff --git a/indra/newview/llviewerinventory.cpp b/indra/newview/llviewerinventory.cpp index 75a5b14154..4aa9370674 100644 --- a/indra/newview/llviewerinventory.cpp +++ b/indra/newview/llviewerinventory.cpp @@ -941,9 +941,13 @@ void ModifiedCOFCallback::fire(const LLUUID& inv_item) } } -RezAttachmentCallback::RezAttachmentCallback(LLViewerJointAttachment *attachmentp) +//RezAttachmentCallback::RezAttachmentCallback(LLViewerJointAttachment *attachmentp) +// [SL:KB] - Patch: Appearance-Misc | Checked: 2010-09-28 (Catznip-2.2.0a) | Added: Catznip-2.2.0a +RezAttachmentCallback::RezAttachmentCallback(LLViewerJointAttachment *attachmentp, bool replace) + : mAttach(attachmentp), mReplace(replace) +// [/SL:KB] { - mAttach = attachmentp; +// mAttach = attachmentp; } RezAttachmentCallback::~RezAttachmentCallback() { @@ -957,7 +961,10 @@ void RezAttachmentCallback::fire(const LLUUID& inv_item) LLViewerInventoryItem *item = gInventory.getItem(inv_item); if (item) { - rez_attachment(item, mAttach); +// rez_attachment(item, mAttach); +// [SL:KB] - Patch: Appearance-Misc | Checked: 2010-09-28 (Catznip-2.2.0a) | Added: Catznip-2.2.0a + rez_attachment(item, mAttach, mReplace); +// [/SL:KB] } } diff --git a/indra/newview/llviewerinventory.h b/indra/newview/llviewerinventory.h index 7f5a92eeab..40ac11112f 100644 --- a/indra/newview/llviewerinventory.h +++ b/indra/newview/llviewerinventory.h @@ -262,7 +262,10 @@ class LLViewerJointAttachment; class RezAttachmentCallback : public LLInventoryCallback { public: - RezAttachmentCallback(LLViewerJointAttachment *attachmentp); +// RezAttachmentCallback(LLViewerJointAttachment *attachmentp); +// [SL:KB] - Patch: Appearance-Misc | Checked: 2010-09-28 (Catznip-2.2.0a) | Added: Catznip-2.2.0a + RezAttachmentCallback(LLViewerJointAttachment *attachmentp, bool replace = false); +// [/SL:KB] void fire(const LLUUID& inv_item); protected: @@ -270,6 +273,9 @@ protected: private: LLViewerJointAttachment* mAttach; +// [SL:KB] - Patch: Appearance-Misc | Checked: 2010-09-28 (Catznip-2.2.0a) | Added: Catznip-2.2.0a + bool mReplace; +// [/SL:KB] }; class ActivateGestureCallback : public LLInventoryCallback From 1771dedd95b70f9f27473bc1fbdc9bd828909504 Mon Sep 17 00:00:00 2001 From: Kitty Barnett Date: Tue, 28 Sep 2010 15:27:28 +0200 Subject: [PATCH 17/39] - fixed : LLAppearanceMgr::registerAttachment() fails to (re)add a link for worn attachments that aren't linked to in COF at log-on --HG-- branch : Appearance-Misc --- indra/newview/llappearancemgr.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp index 0844c77729..a38a5f6536 100644 --- a/indra/newview/llappearancemgr.cpp +++ b/indra/newview/llappearancemgr.cpp @@ -2728,7 +2728,11 @@ void LLAppearanceMgr::dumpItemArray(const LLInventoryModel::item_array_t& items, } LLAppearanceMgr::LLAppearanceMgr(): - mAttachmentInvLinkEnabled(false), +// mAttachmentInvLinkEnabled(false), +// [SL:KB] - Patch: Appearance-Misc | Checked: 2010-09-28 (Catznip-2.2.0a) | Added: Catznip-2.2.0a + // Really just always needs to be enabled (fixes issue where a relog won't readd attachments that are missing from COF for some reason) + mAttachmentInvLinkEnabled(true), +// [/SL:KB] mOutfitIsDirty(false), mIsInUpdateAppearanceFromCOF(false) { From 33b505c0b3b87468bb6029754ef74cd4021b73e5 Mon Sep 17 00:00:00 2001 From: Kitty Barnett Date: Tue, 5 Oct 2010 13:59:14 +0200 Subject: [PATCH 18/39] - fixed : SyncAttach patch creates duplicate attachment links if COF hasn't been fetched yet -> repro: clear cache + relog => isLinkInCOF() will always return false until we've actually fetched it => attachment link is created --HG-- branch : Appearance-Misc --- indra/newview/llappearancemgr.cpp | 71 +++++++++++++++++++++---------- indra/newview/llappearancemgr.h | 3 +- 2 files changed, 51 insertions(+), 23 deletions(-) diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp index a38a5f6536..a25132af5b 100644 --- a/indra/newview/llappearancemgr.cpp +++ b/indra/newview/llappearancemgr.cpp @@ -1748,13 +1748,13 @@ void LLAppearanceMgr::updateAppearanceFromCOF(bool update_base_outfit_ordering) if (isAgentAvatarValid()) { // Include attachments which should be in COF but don't have their link created yet - uuid_vec_t::iterator itPendingObjLink = mPendingObjLinks.begin(); - while (itPendingObjLink != mPendingObjLinks.end()) + uuid_vec_t::iterator itPendingAttachLink = mPendingAttachLinks.begin(); + while (itPendingAttachLink != mPendingAttachLinks.end()) { - const LLUUID& idItem = *itPendingObjLink; + const LLUUID& idItem = *itPendingAttachLink; if ( (!gAgentAvatarp->isWearingAttachment(idItem)) || (isLinkInCOF(idItem)) ) { - itPendingObjLink = mPendingObjLinks.erase(itPendingObjLink); + itPendingAttachLink = mPendingAttachLinks.erase(itPendingAttachLink); continue; } @@ -1762,7 +1762,7 @@ void LLAppearanceMgr::updateAppearanceFromCOF(bool update_base_outfit_ordering) if (pItem) obj_items.push_back(pItem); - ++itPendingObjLink; + ++itPendingAttachLink; } // Don't remove attachments until avatar is fully loaded (should reduce random attaching/detaching/reattaching at log-on) @@ -2728,11 +2728,7 @@ void LLAppearanceMgr::dumpItemArray(const LLInventoryModel::item_array_t& items, } LLAppearanceMgr::LLAppearanceMgr(): -// mAttachmentInvLinkEnabled(false), -// [SL:KB] - Patch: Appearance-Misc | Checked: 2010-09-28 (Catznip-2.2.0a) | Added: Catznip-2.2.0a - // Really just always needs to be enabled (fixes issue where a relog won't readd attachments that are missing from COF for some reason) - mAttachmentInvLinkEnabled(true), -// [/SL:KB] + mAttachmentInvLinkEnabled(false), mOutfitIsDirty(false), mIsInUpdateAppearanceFromCOF(false) { @@ -2756,6 +2752,12 @@ void LLAppearanceMgr::setAttachmentInvLinkEnable(bool val) { llinfos << "setAttachmentInvLinkEnable => " << (int) val << llendl; mAttachmentInvLinkEnabled = val; +// [SL:KB] - Patch: Appearance-SyncAttach | Checked: 2010-10-05 (Catznip-2.2.0a) | Added: Catznip-2.2.0a + if (mAttachmentInvLinkEnabled) + { + linkPendingAttachments(); + } +// [/SL:KB] } void dumpAttachmentSet(const std::set& atts, const std::string& msg) @@ -2778,6 +2780,13 @@ void dumpAttachmentSet(const std::set& atts, const std::string& msg) void LLAppearanceMgr::registerAttachment(const LLUUID& item_id) { gInventory.addChangedMask(LLInventoryObserver::LABEL, item_id); +// [SL:KB] - Patch: Appearance-SyncAttach | Checked: 2010-10-05 (Catznip-2.2.0a) | Added: Catznip-2.2.0a + if (isLinkInCOF(item_id)) + { + return; + } + mPendingAttachLinks.push_back(item_id); +// [/SL:KB] if (mAttachmentInvLinkEnabled) { @@ -2785,14 +2794,9 @@ void LLAppearanceMgr::registerAttachment(const LLUUID& item_id) // it will trigger gAgentWariables.notifyLoadingFinished() // But it is not acceptable solution. See EXT-7777 // LLAppearanceMgr::addCOFItemLink(item_id, false); // Add COF link for item. -// [SL:KB] - Patch: Appearance-SyncAttach | Checked: 2010-09-24 (Catznip-2.2.0a) | Modified: Catznip-2.2.0a - if (!isLinkInCOF(item_id)) - { - mPendingObjLinks.push_back(item_id); - - LLPointer cb = new LLRegisterAttachmentCallback(); - LLAppearanceMgr::addCOFItemLink(item_id, false, cb); // Add COF link for item. - } +// [SL:KB] - Patch: Appearance-SyncAttach | Checked: 2010-10-05 (Catznip-2.2.0a) | Modified: Catznip-2.2.0a + LLPointer cb = new LLRegisterAttachmentCallback(); + LLAppearanceMgr::addCOFItemLink(item_id, false, cb); // Add COF link for item. // [/SL:KB] } else @@ -2804,6 +2808,13 @@ void LLAppearanceMgr::registerAttachment(const LLUUID& item_id) void LLAppearanceMgr::unregisterAttachment(const LLUUID& item_id) { gInventory.addChangedMask(LLInventoryObserver::LABEL, item_id); +// [SL:KB] - Patch: Appearance-SyncAttach | Checked: 2010-10-05 (Catznip-2.2.0a) | Added: Catznip-2.2.0a + uuid_vec_t::iterator itPendingAttachLink = std::find(mPendingAttachLinks.begin(), mPendingAttachLinks.end(), item_id); + if (itPendingAttachLink != mPendingAttachLinks.end()) + { + mPendingAttachLinks.erase(itPendingAttachLink); + } +// [/SL:KB] if (mAttachmentInvLinkEnabled) { @@ -2815,15 +2826,31 @@ void LLAppearanceMgr::unregisterAttachment(const LLUUID& item_id) } } -// [SL:KB] - Patch: Appearance-SyncAttach | Checked: 2010-09-18 (Catznip-2.1.2e) | Modified: Catznip-2.1.2e +// [SL:KB] - Patch: Appearance-SyncAttach | Checked: 2010-09-18 (Catznip-2.2.0a) | Modified: Catznip-2.2.0a +void LLAppearanceMgr::linkPendingAttachments() +{ + LLPointer cb = NULL; + for (uuid_vec_t::const_iterator itPendingAttachLink = mPendingAttachLinks.begin(); + itPendingAttachLink != mPendingAttachLinks.end(); ++itPendingAttachLink) + { + const LLUUID& idAttachItem = *itPendingAttachLink; + if ( (gAgentAvatarp->isWearingAttachment(idAttachItem)) && (!isLinkInCOF(idAttachItem)) ) + { + if (!cb) + cb = new LLRegisterAttachmentCallback(); + LLAppearanceMgr::addCOFItemLink(idAttachItem, false, cb); + } + } +} + void LLAppearanceMgr::onRegisterAttachmentComplete(const LLUUID& idItem) { const LLUUID& idItemBase = gInventory.getLinkedItemID(idItem); // Remove the attachment from the pending list - uuid_vec_t::iterator itPendingObjLink = std::find(mPendingObjLinks.begin(), mPendingObjLinks.end(), idItemBase); - if (itPendingObjLink != mPendingObjLinks.end()) - mPendingObjLinks.erase(itPendingObjLink); + uuid_vec_t::iterator itPendingAttachLink = std::find(mPendingAttachLinks.begin(), mPendingAttachLinks.end(), idItemBase); + if (itPendingAttachLink != mPendingAttachLinks.end()) + mPendingAttachLinks.erase(itPendingAttachLink); // It may have been detached already in which case we should remove the COF link if ( (isAgentAvatarValid()) && (!gAgentAvatarp->isWearingAttachment(idItemBase)) ) diff --git a/indra/newview/llappearancemgr.h b/indra/newview/llappearancemgr.h index 6a13308f16..ba6a5dfa8a 100644 --- a/indra/newview/llappearancemgr.h +++ b/indra/newview/llappearancemgr.h @@ -219,9 +219,10 @@ private: // [SL:KB] - Patch: Appearance-SyncAttach | Checked: 2010-09-18 (Catznip-2.2.0a) | Modified: Catznip-2.1.2e public: + void linkPendingAttachments(); void onRegisterAttachmentComplete(const LLUUID& idItem); private: - uuid_vec_t mPendingObjLinks; + uuid_vec_t mPendingAttachLinks; // [/SL:KB] ////////////////////////////////////////////////////////////////////////////////// From 84088f6074af3dd41a7ca5631b1fca3f275d0efb Mon Sep 17 00:00:00 2001 From: Kitty Barnett Date: Tue, 5 Oct 2010 16:01:48 +0200 Subject: [PATCH 19/39] Updated patch description for Appearance-Misc --HG-- branch : Appearance-Misc --- .hgpatchinfo/Appearance-Misc.desc | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/.hgpatchinfo/Appearance-Misc.desc b/.hgpatchinfo/Appearance-Misc.desc index e44288b5fb..49491dd1f4 100644 --- a/.hgpatchinfo/Appearance-Misc.desc +++ b/.hgpatchinfo/Appearance-Misc.desc @@ -1,19 +1,24 @@ [Appearance/Misc] -- fixed : multiple LLWearableHoldingPattern instances lead to "COF corruption" - fixed : LLAppearanceMgr::filterWearableItems() doesn't properly filter body parts - fixed : LLWearableList::processGetAssetReply() creates multiple LLWearable instances for the same asset UUID -> fix for http://jira.secondlife.com/browse/VWR-20608 +- fixed : attachments sometimes detach only to instantly get reattached after logon +- fixed : Add to/Replace Outfit removes newly worn attachments on completion + -> fix for http://jira.secondlife.com/browse/VWR-18512 +- fixed : LLWearableBridge::removeAllClothesFromAvatar() doesn't remove all clothing from the avatar +- fixed : attachments that attach and then instantly detach don't have their COF link removed +- fixed : multiple LLWearableHoldingPattern instances lead to "COF corruption" +- fixed : get_is_item_worn() shouldn't make the assumption that items in COFs are always worn +- fixed : drag-and-drop wear behaviour of an attachment onto self isn't consistant with the drag-and-drop behaviour of wearables + -> normal-drop : replace wear + -> Ctrl-drop : add wear +- fixed : LLAppearanceMgr::registerAttachment() fails to (re)add a link for worn attachments that aren't linked to in COF at log-on - changed : deprecated removeItemFromAvatar() in favour of having LLAppearanceMgr::removeItemFromAvatar() handle it directly/correctly -> wearables can't be worn/removed in 2.X without the viewer already having an LLWearable instance for it anyway -- fixed : attachments that attach and then instantly detach don't have their COF link removed -- fixed : attachments sometimes detach only to instantly get reattached after logon +- changed : enable "Replace Current Outfit" on the base outfit if it's marked dirty - changed : "RenderUnloadedAvatar" no longer affects the user's own avatar -> side-effect of the fix above due to the change to LLVOAvatar::isFullyLoaded() -- fixed : Add to/Replace Outfit removes newly worn attachments on completion - -> fix for http://jira.secondlife.com/browse/VWR-18512 - added : InitialWearablesLoadedSignal signal which is emitted *once* when the initial wearables are loaded - added : LegacyMultiAttachmentSupport debug setting to route "secondary attachment points" to the primary attachment point -> maps secondary attachment point range [39,68] onto [1,30] -> only dislays "secondary attachment points" correctly for *other* avatars (by design) -- fixed : LLWearableBridge::removeAllClothesFromAvatar() doesn't remove all clothing from the avatar -- changed : enable "Replace Current Outfit" on the base outfit if it's marked dirty From 73a43d8f10436021f0f6a16612c050f976ee04e0 Mon Sep 17 00:00:00 2001 From: Kitty Barnett Date: Wed, 24 Nov 2010 13:05:37 +0100 Subject: [PATCH 20/39] - fixed : "Replace Outfit" isn't available for non-outfit folders that don't contain a full set of body parts (eyes, hair base, skin and shape) -> fix for http://jira.secondlife.com/browse/VWR-23972 --HG-- branch : Appearance-Misc --- indra/newview/llinventorybridge.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index 577575072c..4034b0e556 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -2449,6 +2449,9 @@ void LLFolderBridge::folderOptionsMenu() // BAP change once we're no longer treating regular categories as ensembles. const bool is_ensemble = (type == LLFolderType::FT_NONE || LLFolderType::lookupIsEnsembleType(type)); +// [SL:KB] - Checked: 2010-11-24 (Catznip-2.4.0e) | Added: Catznip-2.4.0e + const bool is_outfit = (type == LLFolderType::FT_OUTFIT); +// [/SL:KB] // Only enable calling-card related options for non-system folders. if (!is_system_folder) @@ -2501,7 +2504,11 @@ void LLFolderBridge::folderOptionsMenu() { disabled_items.push_back(std::string("Remove From Outfit")); } - if (!LLAppearanceMgr::instance().getCanReplaceCOF(mUUID)) +// if (!LLAppearanceMgr::instance().getCanReplaceCOF(mUUID)) +// [SL:KB] - Checked: 2010-11-24 (Catznip-2.4.0e) | Added: Catznip-2.4.0e + if ( ((is_outfit) && (!LLAppearanceMgr::instance().getCanReplaceCOF(mUUID))) || + ((!is_outfit) && (gAgentWearables.isCOFChangeInProgress())) ) +// [/SL:KB] { disabled_items.push_back(std::string("Replace Outfit")); } From 3fec89a6f3e652fb45b200cb8b6dc9d7141a3198 Mon Sep 17 00:00:00 2001 From: Kitty Barnett Date: Wed, 24 Nov 2010 01:54:14 +0100 Subject: [PATCH 21/39] - fixed : LLAppearanceMgr::updateAppearanceFromCOF() doesn't properly filter items collected from folder links -> SL bug: create an outfit with a folder link + "Replace Outfit" == wearables that exist in both COF and the linked folder will end up worn multiple times -> transplanted from RLVa-1.3.0a (revision 4fc9ba2cf8c1) --HG-- branch : Appearance-Misc --- indra/newview/llappearancemgr.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp index 007331ff9a..ec4cebb6f3 100644 --- a/indra/newview/llappearancemgr.cpp +++ b/indra/newview/llappearancemgr.cpp @@ -1739,6 +1739,13 @@ void LLAppearanceMgr::updateAppearanceFromCOF(bool update_base_outfit_ordering) remove_non_link_items(wear_items); remove_non_link_items(obj_items); remove_non_link_items(gest_items); +// [SL:KB] - Patch: Apperance-Misc | Checked: 2010-11-24 (Catznip-2.4.0f) | Added: Catzip-2.4.0f + // Since we're following folder links we might have picked up new duplicates, or exceeded MAX_CLOTHING_PER_TYPE + removeDuplicateItems(wear_items); + removeDuplicateItems(obj_items); + removeDuplicateItems(gest_items); + filterWearableItems(wear_items, LLAgentWearables::MAX_CLOTHING_PER_TYPE); +// [/SL:KB] dumpItemArray(wear_items,"asset_dump: wear_item"); dumpItemArray(obj_items,"asset_dump: obj_item"); From 57bd01f02dabe05d160bd637c622ec3198b27324 Mon Sep 17 00:00:00 2001 From: Kitty Barnett Date: Thu, 13 Jan 2011 01:02:06 +0100 Subject: [PATCH 22/39] - fixed : LLViewerObject::getAttachmentItemID() sometimes returns the NULL UUID for the avatar's own attachments --HG-- branch : Appearance-Misc --- indra/newview/llviewerjointattachment.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/indra/newview/llviewerjointattachment.cpp b/indra/newview/llviewerjointattachment.cpp index 4e14824e69..f0fcb7eeae 100644 --- a/indra/newview/llviewerjointattachment.cpp +++ b/indra/newview/llviewerjointattachment.cpp @@ -158,7 +158,7 @@ void LLViewerJointAttachment::setupDrawable(LLViewerObject *object) //----------------------------------------------------------------------------- BOOL LLViewerJointAttachment::addObject(LLViewerObject* object) { - object->extractAttachmentItemID(); +// object->extractAttachmentItemID(); // Same object reattached if (isObjectAttached(object)) @@ -169,6 +169,11 @@ BOOL LLViewerJointAttachment::addObject(LLViewerObject* object) // re-connect object to the joint correctly } +// [SL:KB] - Patch: Appearance-Misc | Checked: Catznip-2.4.0h (2011-01-13) | Added: Catznip-2.4.0h + // LLViewerJointAttachment::removeObject() sets the object's item to the NULL UUID so we need to extract it *after* the block above + object->extractAttachmentItemID(); +// [/SL:KB] + // Two instances of the same inventory item attached -- // Request detach, and kill the object in the meantime. if (getAttachedObject(object->getAttachmentItemID())) From 6d17e8613851c8417ac923f8e34547418b58b097 Mon Sep 17 00:00:00 2001 From: Kitty Barnett Date: Thu, 13 Jan 2011 01:52:15 +0100 Subject: [PATCH 23/39] - internal : reviewed for SL-2.5.0 --HG-- branch : Appearance-Misc --- indra/newview/llagentwearables.cpp | 10 ++++----- indra/newview/llagentwearables.h | 10 ++++----- indra/newview/llappearancemgr.cpp | 34 ++++++++++++++--------------- indra/newview/llappearancemgr.h | 4 ++-- indra/newview/llinventorybridge.cpp | 10 ++++----- indra/newview/lltooldraganddrop.cpp | 4 ++-- indra/newview/llviewerinventory.cpp | 4 ++-- indra/newview/llviewerinventory.h | 4 ++-- indra/newview/llvoavatar.cpp | 4 ++-- indra/newview/llwearablelist.cpp | 2 +- 10 files changed, 43 insertions(+), 43 deletions(-) diff --git a/indra/newview/llagentwearables.cpp b/indra/newview/llagentwearables.cpp index eedf29d0e3..9612193209 100644 --- a/indra/newview/llagentwearables.cpp +++ b/indra/newview/llagentwearables.cpp @@ -55,7 +55,7 @@ LLAgentWearables gAgentWearables; BOOL LLAgentWearables::mInitialWearablesUpdateReceived = FALSE; -// [SL:KB] - Patch: Appearance-InitialWearablesLoadedCallback | Checked: 2010-08-14 (Catznip-2.2.0a) | Added: Catznip-2.1.1d +// [SL:KB] - Patch: Appearance-InitialWearablesLoadedCallback | Checked: 2010-08-14 (Catznip-2.5.0a) | Added: Catznip-2.1.1d bool LLAgentWearables::mInitialWearablesLoaded = false; // [/SL:KB] @@ -1451,7 +1451,7 @@ void LLAgentWearables::setWearableOutfit(const LLInventoryItem::item_array_t& it // Start rendering & update the server mWearablesLoaded = TRUE; checkWearablesLoaded(); -// [SL:KB] - Patch: Appearance-InitialWearablesLoadedCallback | Checked: 2010-09-22 (Catznip-2.2.0a) | Modified: Catznip-2.2.0a +// [SL:KB] - Patch: Appearance-InitialWearablesLoadedCallback | Checked: 2010-09-22 (Catznip-2.5.0a) | Modified: Catznip-2.2.0a if (!mInitialWearablesLoaded) { mInitialWearablesLoaded = true; @@ -1736,7 +1736,7 @@ void LLAgentWearables::userRemoveAllClothesStep2(BOOL proceed) // Combines userRemoveAllAttachments() and userAttachMultipleAttachments() logic to // get attachments into desired state with minimal number of adds/removes. //void LLAgentWearables::userUpdateAttachments(LLInventoryModel::item_array_t& obj_item_array) -// [SL:KB] - Patch: Appearance-SyncAttach | Checked: 2010-09-22 (Catznip-2.2.0a) | Added: Catznip-2.2.0a +// [SL:KB] - Patch: Appearance-SyncAttach | Checked: 2010-09-22 (Catznip-2.5.0a) | Added: Catznip-2.2.0a void LLAgentWearables::userUpdateAttachments(LLInventoryModel::item_array_t& obj_item_array, bool fAttachOnly) // [/SL:KB] { @@ -1804,7 +1804,7 @@ void LLAgentWearables::userUpdateAttachments(LLInventoryModel::item_array_t& obj // Remove everything in objects_to_remove // userRemoveMultipleAttachments(objects_to_remove); -// [SL:KB] - Patch: Appearance-SyncAttach | Checked: 2010-09-22 (Catznip-2.2.0a) | Added: Catznip-2.2.0a +// [SL:KB] - Patch: Appearance-SyncAttach | Checked: 2010-09-22 (Catznip-2.5.0a) | Added: Catznip-2.2.0a if (!fAttachOnly) { userRemoveMultipleAttachments(objects_to_remove); @@ -2119,7 +2119,7 @@ boost::signals2::connection LLAgentWearables::addLoadedCallback(loaded_callback_ return mLoadedSignal.connect(cb); } -// [SL:KB] - Patch: Appearance-InitialWearablesLoadedCallback | Checked: 2010-08-14 (Catznip-2.2.0a) | Added: Catznip-2.1.1d +// [SL:KB] - Patch: Appearance-InitialWearablesLoadedCallback | Checked: 2010-08-14 (Catznip-2.5.0a) | Added: Catznip-2.1.1d boost::signals2::connection LLAgentWearables::addInitialWearablesLoadedCallback(loaded_callback_t cb) { return mInitialWearablesLoadedSignal.connect(cb); diff --git a/indra/newview/llagentwearables.h b/indra/newview/llagentwearables.h index 80531f62db..0c6b28985a 100644 --- a/indra/newview/llagentwearables.h +++ b/indra/newview/llagentwearables.h @@ -76,7 +76,7 @@ public: BOOL isWearableCopyable(LLWearableType::EType type, U32 index /*= 0*/) const; BOOL areWearablesLoaded() const; -// [SL:KB] - Patch: Appearance-InitialWearablesLoadedCallback | Checked: 2010-08-14 (Catznip-2.2.0a) | Added: Catznip-2.1.1d +// [SL:KB] - Patch: Appearance-InitialWearablesLoadedCallback | Checked: 2010-08-14 (Catznip-2.5.0a) | Added: Catznip-2.1.1d bool areInitalWearablesLoaded() const { return mInitialWearablesLoaded; } // [/SL:KB] bool isCOFChangeInProgress() const { return mCOFChangeInProgress; } @@ -219,7 +219,7 @@ public: typedef std::vector llvo_vec_t; // static void userUpdateAttachments(LLInventoryModel::item_array_t& obj_item_array); -// [SL:KB] - Patch: Appearance-SyncAttach | Checked: 2010-09-22 (Catznip-2.2.0a) | Added: Catznip-2.2.0a +// [SL:KB] - Patch: Appearance-SyncAttach | Checked: 2010-09-22 (Catznip-2.5.0a) | Added: Catznip-2.2.0a // Not the best way to go about this but other attempts changed far too much LL code to be a viable solution static void userUpdateAttachments(LLInventoryModel::item_array_t& obj_item_array, bool fAttachOnly = false); // [/SL:KB] @@ -241,7 +241,7 @@ public: typedef boost::function loaded_callback_t; typedef boost::signals2::signal loaded_signal_t; boost::signals2::connection addLoadedCallback(loaded_callback_t cb); -// [SL:KB] - Patch: Appearance-InitialWearablesLoadedCallback | Checked: 2010-08-14 (Catznip-2.2.0a) | Added: Catznip-2.1.1d +// [SL:KB] - Patch: Appearance-InitialWearablesLoadedCallback | Checked: 2010-08-14 (Catznip-2.5.0a) | Added: Catznip-2.1.1d boost::signals2::connection addInitialWearablesLoadedCallback(loaded_callback_t cb); // [/SL:KB] @@ -251,7 +251,7 @@ public: private: loading_started_signal_t mLoadingStartedSignal; // should be called before wearables are changed loaded_signal_t mLoadedSignal; // emitted when all agent wearables get loaded -// [SL:KB] - Patch: Appearance-InitialWearablesLoadedCallback | Checked: 2010-08-14 (Catznip-2.2.0a) | Added: Catznip-2.1.1d +// [SL:KB] - Patch: Appearance-InitialWearablesLoadedCallback | Checked: 2010-08-14 (Catznip-2.5.0a) | Added: Catznip-2.1.1d loaded_signal_t mInitialWearablesLoadedSignal; // emitted once when the initial wearables are loaded // [/SL:KB] @@ -264,7 +264,7 @@ private: wearableentry_map_t mWearableDatas; static BOOL mInitialWearablesUpdateReceived; -// [SL:KB] - Patch: Appearance-InitialWearablesLoadedCallback | Checked: 2010-08-14 (Catznip-2.2.0a) | Added: Catznip-2.2.0a +// [SL:KB] - Patch: Appearance-InitialWearablesLoadedCallback | Checked: 2010-08-14 (Catznip-2.5.0a) | Added: Catznip-2.2.0a static bool mInitialWearablesLoaded; // [/SL:KB] BOOL mWearablesLoaded; diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp index 153204ab19..f80920b2f1 100644 --- a/indra/newview/llappearancemgr.cpp +++ b/indra/newview/llappearancemgr.cpp @@ -280,7 +280,7 @@ public: void onWearableAssetFetch(LLWearable *wearable); void onAllComplete(); -// [SL:KB] - Patch: Appearance-COFCorruption | Checked: 2010-04-14 (Catznip-2.2.0a) | Added: Catznip-2.0.0a +// [SL:KB] - Patch: Appearance-COFCorruption | Checked: 2010-04-14 (Catznip-2.5.0a) | Added: Catznip-2.0.0a bool pollStopped(); // [/SL:KB] @@ -362,7 +362,7 @@ void LLWearableHoldingPattern::eraseTypeToRecover(LLWearableType::EType type) mTypesToRecover.erase(type); } -// [SL:KB] - Patch: Appearance-SyncAttach | Checked: 2010-06-19 (Catznip-2.2.0a) | Added: Catznip-2.1.2a +// [SL:KB] - Patch: Appearance-SyncAttach | Checked: 2010-06-19 (Catznip-2.5.0a) | Added: Catznip-2.1.2a // Fix for http://jira.secondlife.com/browse/VWR-18512 /* void LLWearableHoldingPattern::setObjItems(const LLInventoryModel::item_array_t& items) @@ -467,7 +467,7 @@ void LLWearableHoldingPattern::onAllComplete() llinfos << "Updating agent wearables with " << mResolved << " wearable items " << llendl; LLAppearanceMgr::instance().updateAgentWearables(this, false); -// [SL:KB] - Patch: Appearance-SyncAttach | Checked: 2010-03-22 (Catznip-2.2.0a) | Added: Catznip-2.1.2a +// [SL:KB] - Patch: Appearance-SyncAttach | Checked: 2010-03-22 (Catznip-2.5.0a) | Added: Catznip-2.1.2a // Fix for http://jira.secondlife.com/browse/VWR-18512 /* // Update attachments to match those requested. @@ -508,7 +508,7 @@ bool LLWearableHoldingPattern::pollFetchCompletion() { llwarns << "skipping because LLWearableHolding pattern is invalid (superceded by later outfit request)" << llendl; -// [SL:KB] - Patch: Appearance-COFCorruption | Checked: 2010-04-14 (Catznip-2.2.0a) | Added: Catznip-2.0.0a +// [SL:KB] - Patch: Appearance-COFCorruption | Checked: 2010-04-14 (Catznip-2.5.0a) | Added: Catznip-2.0.0a // If we were signalled to stop then we shouldn't do anything else except poll for when it's safe to delete ourselves doOnIdleRepeating(boost::bind(&LLWearableHoldingPattern::pollStopped, this)); return true; @@ -605,7 +605,7 @@ public: { llwarns << "skipping because LLWearableHolding pattern is invalid (superceded by later outfit request)" << llendl; -// [SL:KB] - Patch: Appearance-COFCorruption | Checked: 2010-04-14 (Catznip-2.2.0a) | Added: Catznip-2.0.0a +// [SL:KB] - Patch: Appearance-COFCorruption | Checked: 2010-04-14 (Catznip-2.5.0a) | Added: Catznip-2.0.0a // If we were signalled to stop then we shouldn't do anything else except poll for when it's safe to delete ourselves return; // [/SL:KB] @@ -683,7 +683,7 @@ void LLWearableHoldingPattern::clearCOFLinksForMissingWearables() } } -// [SL:KB] - Patch: Appearance-COFCorruption | Checked: 2010-04-14 (Catznip-2.2.0a) | Added: Catznip-2.0.0a +// [SL:KB] - Patch: Appearance-COFCorruption | Checked: 2010-04-14 (Catznip-2.5.0a) | Added: Catznip-2.0.0a bool LLWearableHoldingPattern::pollStopped() { // We have to keep on polling until we're sure that all callbacks have completed or they'll cause a crash @@ -702,7 +702,7 @@ bool LLWearableHoldingPattern::pollMissingWearables() { llwarns << "skipping because LLWearableHolding pattern is invalid (superceded by later outfit request)" << llendl; -// [SL:KB] - Patch: Appearance-COFCorruption | Checked: 2010-04-14 (Catznip-2.2.0a) | Added: Catznip-2.0.0a +// [SL:KB] - Patch: Appearance-COFCorruption | Checked: 2010-04-14 (Catznip-2.5.0a) | Added: Catznip-2.0.0a // If we were signalled to stop then we shouldn't do anything else except poll for when it's safe to delete ourselves doOnIdleRepeating(boost::bind(&LLWearableHoldingPattern::pollStopped, this)); return true; @@ -1340,7 +1340,7 @@ bool LLAppearanceMgr::getCanReplaceCOF(const LLUUID& outfit_cat_id) // Check whether it's the base outfit. // if (outfit_cat_id.isNull() || outfit_cat_id == getBaseOutfitUUID()) -// [SL:KB] - Patch: Appearance-Misc | Checked: 2010-09-21 (Catznip-2.2.0a) | Added: Catznip-2.1.2d +// [SL:KB] - Patch: Appearance-Misc | Checked: 2010-09-21 (Catznip-2.5.0a) | Added: Catznip-2.1.2d if ( (outfit_cat_id.isNull()) || ((outfit_cat_id == getBaseOutfitUUID()) && (!isOutfitDirty())) ) // [/SL:KB] { @@ -1408,7 +1408,7 @@ void LLAppearanceMgr::filterWearableItems( if (size <= 0) continue; // S32 start_index = llmax(0,size-max_per_type); -// [SL:KB] - Patch: Appearance-Misc | Checked: 2010-05-11 (Catznip-2.2.0a) | Added: Catznip-2.0.0h +// [SL:KB] - Patch: Appearance-Misc | Checked: 2010-05-11 (Catznip-2.5.0a) | Added: Catznip-2.0.0h S32 start_index = llmax(0, size - ((LLAssetType::AT_BODYPART == LLWearableType::getAssetType((LLWearableType::EType)i)) ? 1 : max_per_type)); // [/SL:KB[ @@ -1739,7 +1739,7 @@ void LLAppearanceMgr::updateAppearanceFromCOF(bool update_base_outfit_ordering) remove_non_link_items(wear_items); remove_non_link_items(obj_items); remove_non_link_items(gest_items); -// [SL:KB] - Patch: Apperance-Misc | Checked: 2010-11-24 (Catznip-2.4.0f) | Added: Catzip-2.4.0f +// [SL:KB] - Patch: Apperance-Misc | Checked: 2010-11-24 (Catznip-2.5.0a) | Added: Catzip-2.4.0f // Since we're following folder links we might have picked up new duplicates, or exceeded MAX_CLOTHING_PER_TYPE removeDuplicateItems(wear_items); removeDuplicateItems(obj_items); @@ -1750,7 +1750,7 @@ void LLAppearanceMgr::updateAppearanceFromCOF(bool update_base_outfit_ordering) dumpItemArray(wear_items,"asset_dump: wear_item"); dumpItemArray(obj_items,"asset_dump: obj_item"); -// [SL:KB] - Patch: Appearance-SyncAttach | Checked: 2010-09-22 (Catznip-2.2.0a) | Added: Catznip-2.2.0a +// [SL:KB] - Patch: Appearance-SyncAttach | Checked: 2010-09-22 (Catznip-2.5.0a) | Added: Catznip-2.2.0a // Update attachments to match those requested. if (isAgentAvatarValid()) { @@ -2602,7 +2602,7 @@ void LLAppearanceMgr::removeItemFromAvatar(const LLUUID& id_to_remove) // //*TODO move here the exact removing code from LLWearableBridge::removeItemFromAvatar in the future // LLWearableBridge::removeItemFromAvatar(item_to_remove); // } -// [SL:KB] - Patch: Appearance-RemoveWearableFromAvatar | Checked: 2010-08-13 (Catznip-2.2.0a) | Added: Catznip-2.1.1d +// [SL:KB] - Patch: Appearance-RemoveWearableFromAvatar | Checked: 2010-08-13 (Catznip-2.5.0a) | Added: Catznip-2.1.1d { /*const*/ LLWearable* pWearable = gAgentWearables.getWearableFromItemID(item_to_remove->getLinkedUUID()); if ( (pWearable) && (LLAssetType::AT_BODYPART != pWearable->getAssetType()) ) @@ -2763,7 +2763,7 @@ void LLAppearanceMgr::setAttachmentInvLinkEnable(bool val) { llinfos << "setAttachmentInvLinkEnable => " << (int) val << llendl; mAttachmentInvLinkEnabled = val; -// [SL:KB] - Patch: Appearance-SyncAttach | Checked: 2010-10-05 (Catznip-2.2.0a) | Added: Catznip-2.2.0a +// [SL:KB] - Patch: Appearance-SyncAttach | Checked: 2010-10-05 (Catznip-2.5.0a) | Added: Catznip-2.2.0a if (mAttachmentInvLinkEnabled) { linkPendingAttachments(); @@ -2791,7 +2791,7 @@ void dumpAttachmentSet(const std::set& atts, const std::string& msg) void LLAppearanceMgr::registerAttachment(const LLUUID& item_id) { gInventory.addChangedMask(LLInventoryObserver::LABEL, item_id); -// [SL:KB] - Patch: Appearance-SyncAttach | Checked: 2010-10-05 (Catznip-2.2.0a) | Added: Catznip-2.2.0a +// [SL:KB] - Patch: Appearance-SyncAttach | Checked: 2010-10-05 (Catznip-2.5.0a) | Added: Catznip-2.2.0a if (isLinkInCOF(item_id)) { return; @@ -2805,7 +2805,7 @@ void LLAppearanceMgr::registerAttachment(const LLUUID& item_id) // it will trigger gAgentWariables.notifyLoadingFinished() // But it is not acceptable solution. See EXT-7777 // LLAppearanceMgr::addCOFItemLink(item_id, false); // Add COF link for item. -// [SL:KB] - Patch: Appearance-SyncAttach | Checked: 2010-10-05 (Catznip-2.2.0a) | Modified: Catznip-2.2.0a +// [SL:KB] - Patch: Appearance-SyncAttach | Checked: 2010-10-05 (Catznip-2.5.0a) | Modified: Catznip-2.2.0a LLPointer cb = new LLRegisterAttachmentCallback(); LLAppearanceMgr::addCOFItemLink(item_id, false, cb); // Add COF link for item. // [/SL:KB] @@ -2819,7 +2819,7 @@ void LLAppearanceMgr::registerAttachment(const LLUUID& item_id) void LLAppearanceMgr::unregisterAttachment(const LLUUID& item_id) { gInventory.addChangedMask(LLInventoryObserver::LABEL, item_id); -// [SL:KB] - Patch: Appearance-SyncAttach | Checked: 2010-10-05 (Catznip-2.2.0a) | Added: Catznip-2.2.0a +// [SL:KB] - Patch: Appearance-SyncAttach | Checked: 2010-10-05 (Catznip-2.5.0a) | Added: Catznip-2.2.0a uuid_vec_t::iterator itPendingAttachLink = std::find(mPendingAttachLinks.begin(), mPendingAttachLinks.end(), item_id); if (itPendingAttachLink != mPendingAttachLinks.end()) { @@ -2837,7 +2837,7 @@ void LLAppearanceMgr::unregisterAttachment(const LLUUID& item_id) } } -// [SL:KB] - Patch: Appearance-SyncAttach | Checked: 2010-09-18 (Catznip-2.2.0a) | Modified: Catznip-2.2.0a +// [SL:KB] - Patch: Appearance-SyncAttach | Checked: 2010-09-18 (Catznip-2.5.0a) | Modified: Catznip-2.2.0a void LLAppearanceMgr::linkPendingAttachments() { LLPointer cb = NULL; diff --git a/indra/newview/llappearancemgr.h b/indra/newview/llappearancemgr.h index ba6a5dfa8a..5e06010407 100644 --- a/indra/newview/llappearancemgr.h +++ b/indra/newview/llappearancemgr.h @@ -217,7 +217,7 @@ private: std::auto_ptr mUnlockOutfitTimer; -// [SL:KB] - Patch: Appearance-SyncAttach | Checked: 2010-09-18 (Catznip-2.2.0a) | Modified: Catznip-2.1.2e +// [SL:KB] - Patch: Appearance-SyncAttach | Checked: 2010-09-18 (Catznip-2.5.0a) | Modified: Catznip-2.1.2e public: void linkPendingAttachments(); void onRegisterAttachmentComplete(const LLUUID& idItem); @@ -251,7 +251,7 @@ private: bool mUpdateBaseOrder; }; -// [SL:KB] - Patch: Appearance-SyncAttach | Checked: 2010-08-31 (Catznip-2.2.0a) | Added: Catznip-2.1.2a +// [SL:KB] - Patch: Appearance-SyncAttach | Checked: 2010-08-31 (Catznip-2.5.0a) | Added: Catznip-2.1.2a class LLRegisterAttachmentCallback : public LLInventoryCallback { public: diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index 4ee73d0aa3..c2636fff1b 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -2473,7 +2473,7 @@ void LLFolderBridge::folderOptionsMenu() // BAP change once we're no longer treating regular categories as ensembles. const bool is_ensemble = (type == LLFolderType::FT_NONE || LLFolderType::lookupIsEnsembleType(type)); -// [SL:KB] - Checked: 2010-11-24 (Catznip-2.4.0e) | Added: Catznip-2.4.0e +// [SL:KB] - Patch: Appearance-Misc | Checked: 2010-11-24 (Catznip-2.5.0a) | Added: Catznip-2.4.0e const bool is_outfit = (type == LLFolderType::FT_OUTFIT); // [/SL:KB] @@ -2529,7 +2529,7 @@ void LLFolderBridge::folderOptionsMenu() disabled_items.push_back(std::string("Remove From Outfit")); } // if (!LLAppearanceMgr::instance().getCanReplaceCOF(mUUID)) -// [SL:KB] - Checked: 2010-11-24 (Catznip-2.4.0e) | Added: Catznip-2.4.0e +// [SL:KB] - Patch: Appearance-Misc | Checked: 2010-11-24 (Catznip-2.5.0a) | Added: Catznip-2.4.0e if ( ((is_outfit) && (!LLAppearanceMgr::instance().getCanReplaceCOF(mUUID))) || ((!is_outfit) && (gAgentWearables.isCOFChangeInProgress())) ) // [/SL:KB] @@ -4509,7 +4509,7 @@ void remove_inventory_category_from_avatar_step2( BOOL proceed, LLUUID category_ LLWearableBridge::onRemoveFromAvatarArrived, new OnRemoveStruct(item->getLinkedUUID())); */ -// [SL:KB] - Patch: Appearance-RemoveWearableFromAvatar | Checked: 2010-08-13 (Catznip-2.2.0a) | Added: Catznip-2.1.1d +// [SL:KB] - Patch: Appearance-RemoveWearableFromAvatar | Checked: 2010-08-13 (Catznip-2.5.0a) | Added: Catznip-2.1.1d LLAppearanceMgr::instance().removeItemFromAvatar(item->getUUID()); // [/SL:KB] } @@ -4895,7 +4895,7 @@ void LLWearableBridge::removeAllClothesFromAvatar() continue; // for (S32 index = gAgentWearables.getWearableCount(itype)-1; index >= 0 ; --index) -// [SL:KB] - Patch: Appearance-Misc | Checked: 2010-09-04 (Catznip-2.2.0a) | Added: Catznip-2.1.2a +// [SL:KB] - Patch: Appearance-Misc | Checked: 2010-09-04 (Catznip-2.5.0a) | Added: Catznip-2.1.2a for (S32 index = gAgentWearables.getWearableCount((LLWearableType::EType)itype)-1; index >= 0 ; --index) // [/SL:KB] { @@ -4930,7 +4930,7 @@ void LLWearableBridge::removeItemFromAvatar(LLViewerInventoryItem *item) LLWearableBridge::onRemoveFromAvatarArrived, new OnRemoveStruct(item->getUUID())); */ -// [SL:KB] - Patch: Appearance-RemoveWearableFromAvatar | Checked: 2010-08-13 (Catznip-2.2.0a) | Added: Catznip-2.1.1d +// [SL:KB] - Patch: Appearance-RemoveWearableFromAvatar | Checked: 2010-08-13 (Catznip-2.5.0a) | Added: Catznip-2.1.1d LLAppearanceMgr::instance().removeItemFromAvatar(item->getUUID()); // [/SL:KB] } diff --git a/indra/newview/lltooldraganddrop.cpp b/indra/newview/lltooldraganddrop.cpp index 5140d81bb2..23b59839be 100644 --- a/indra/newview/lltooldraganddrop.cpp +++ b/indra/newview/lltooldraganddrop.cpp @@ -1623,7 +1623,7 @@ EAcceptance LLToolDragAndDrop::dad3dRezAttachmentFromInv( if (mSource == SOURCE_LIBRARY) { // LLPointer cb = new RezAttachmentCallback(0); -// [SL:KB] - Patch: Appearance-Misc | Checked: 2010-09-28 (Catznip-2.2.0a) | Added: Catznip-2.2.0a +// [SL:KB] - Patch: Appearance-Misc | Checked: 2010-09-28 (Catznip-2.5.0a) | Added: Catznip-2.2.0a // Make this behave consistent with dad3dWearItem LLPointer cb = new RezAttachmentCallback(0, !(mask & MASK_CONTROL)); // [/SL:KB] @@ -1638,7 +1638,7 @@ EAcceptance LLToolDragAndDrop::dad3dRezAttachmentFromInv( else { // rez_attachment(item, 0); -// [SL:KB] - Patch: Appearance-Misc | Checked: 2010-09-28 (Catznip-2.2.0a) | Added: Catznip-2.2.0a +// [SL:KB] - Patch: Appearance-Misc | Checked: 2010-09-28 (Catznip-2.5.0a) | Added: Catznip-2.2.0a // Make this behave consistent with dad3dWearItem rez_attachment(item, 0, !(mask & MASK_CONTROL)); // [/SL:KB] diff --git a/indra/newview/llviewerinventory.cpp b/indra/newview/llviewerinventory.cpp index 6810481082..60d629f227 100644 --- a/indra/newview/llviewerinventory.cpp +++ b/indra/newview/llviewerinventory.cpp @@ -947,7 +947,7 @@ void ModifiedCOFCallback::fire(const LLUUID& inv_item) } //RezAttachmentCallback::RezAttachmentCallback(LLViewerJointAttachment *attachmentp) -// [SL:KB] - Patch: Appearance-Misc | Checked: 2010-09-28 (Catznip-2.2.0a) | Added: Catznip-2.2.0a +// [SL:KB] - Patch: Appearance-Misc | Checked: 2010-09-28 (Catznip-2.5.0a) | Added: Catznip-2.2.0a RezAttachmentCallback::RezAttachmentCallback(LLViewerJointAttachment *attachmentp, bool replace) : mAttach(attachmentp), mReplace(replace) // [/SL:KB] @@ -967,7 +967,7 @@ void RezAttachmentCallback::fire(const LLUUID& inv_item) if (item) { // rez_attachment(item, mAttach); -// [SL:KB] - Patch: Appearance-Misc | Checked: 2010-09-28 (Catznip-2.2.0a) | Added: Catznip-2.2.0a +// [SL:KB] - Patch: Appearance-Misc | Checked: 2010-09-28 (Catznip-2.5.0a) | Added: Catznip-2.2.0a rez_attachment(item, mAttach, mReplace); // [/SL:KB] } diff --git a/indra/newview/llviewerinventory.h b/indra/newview/llviewerinventory.h index 8818be56fb..24f1935e60 100644 --- a/indra/newview/llviewerinventory.h +++ b/indra/newview/llviewerinventory.h @@ -264,7 +264,7 @@ class RezAttachmentCallback : public LLInventoryCallback { public: // RezAttachmentCallback(LLViewerJointAttachment *attachmentp); -// [SL:KB] - Patch: Appearance-Misc | Checked: 2010-09-28 (Catznip-2.2.0a) | Added: Catznip-2.2.0a +// [SL:KB] - Patch: Appearance-Misc | Checked: 2010-09-28 (Catznip-2.5.0a) | Added: Catznip-2.2.0a RezAttachmentCallback(LLViewerJointAttachment *attachmentp, bool replace = false); // [/SL:KB] void fire(const LLUUID& inv_item); @@ -274,7 +274,7 @@ protected: private: LLViewerJointAttachment* mAttach; -// [SL:KB] - Patch: Appearance-Misc | Checked: 2010-09-28 (Catznip-2.2.0a) | Added: Catznip-2.2.0a +// [SL:KB] - Patch: Appearance-Misc | Checked: 2010-09-28 (Catznip-2.5.0a) | Added: Catznip-2.2.0a bool mReplace; // [/SL:KB] }; diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index 4038fe31f6..ee979d6e8e 100644 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -5725,7 +5725,7 @@ LLViewerJointAttachment* LLVOAvatar::getTargetAttachmentPoint(LLViewerObject* vi { llwarns << "Object attachment point invalid: " << attachmentID << llendl; // attachment = get_if_there(mAttachmentPoints, 1, (LLViewerJointAttachment*)NULL); // Arbitrary using 1 (chest) -// [SL:KB] - Patch: Appearance-LegacyMultiAttachment | Checked: 2010-08-28 (Catznip-2.2.0a) | Added: Catznip2.1.2a +// [SL:KB] - Patch: Appearance-LegacyMultiAttachment | Checked: 2010-08-28 (Catznip-2.5.0a) | Added: Catznip-2.1.2a S32 idxAttachPt = 1; if ( (!isSelf()) && (gSavedSettings.getBOOL("LegacyMultiAttachmentSupport")) && (attachmentID > 38) && (attachmentID <= 68) ) idxAttachPt = attachmentID - 38; @@ -6187,7 +6187,7 @@ BOOL LLVOAvatar::isFullyLoaded() const // return TRUE; // else // return mFullyLoaded; -// [SL:KB] - Patch: Appearance-SyncAttach | Checked: 2010-09-22 (Catznip-2.2.0a) | Added: Catznip-2.2.0a +// [SL:KB] - Patch: Appearance-SyncAttach | Checked: 2010-09-22 (Catznip-2.5.0a) | Added: Catznip-2.2.0a // Changes to LLAppearanceMgr::updateAppearanceFromCOF() expect this function to actually return mFullyLoaded for gAgentAvatarp if ( (!isSelf()) && (gSavedSettings.getBOOL("RenderUnloadedAvatar")) ) return TRUE; diff --git a/indra/newview/llwearablelist.cpp b/indra/newview/llwearablelist.cpp index ddf5cd4b70..0f655969fc 100644 --- a/indra/newview/llwearablelist.cpp +++ b/indra/newview/llwearablelist.cpp @@ -96,7 +96,7 @@ void LLWearableList::processGetAssetReply( const char* filename, const LLAssetID BOOL isNewWearable = FALSE; LLWearableArrivedData* data = (LLWearableArrivedData*) userdata; // LLWearable* wearable = NULL; // NULL indicates failure -// [SL:KB] - Patch: Appearance-Misc | Checked: 2010-08-13 (Catznip-2.2.0a) | Added: Catznip-2.1.1d +// [SL:KB] - Patch: Appearance-Misc | Checked: 2010-08-13 (Catznip-2.5.0a) | Added: Catznip-2.1.1d LLWearable* wearable = get_if_there(LLWearableList::instance().mList, uuid, (LLWearable*)NULL); if (wearable) { From 855272b1ea67fa942e470bc059a6af944dbe2079 Mon Sep 17 00:00:00 2001 From: Kitty Barnett Date: Thu, 14 Apr 2011 15:00:35 +0200 Subject: [PATCH 24/39] - internal : reviewed for SL-2.6.0 --HG-- branch : Appearance-Misc --- .hgpatchinfo/Appearance-Misc.desc | 3 + indra/newview/llagentwearables.cpp | 10 +- indra/newview/llagentwearables.h | 10 +- indra/newview/llappearancemgr.cpp | 34 ++-- indra/newview/llappearancemgr.h | 4 +- indra/newview/llinventorybridge.cpp | 226 ++++++++++------------ indra/newview/lltooldraganddrop.cpp | 4 +- indra/newview/llviewerinventory.cpp | 4 +- indra/newview/llviewerinventory.h | 4 +- indra/newview/llviewerjointattachment.cpp | 2 +- indra/newview/llvoavatar.cpp | 4 +- indra/newview/llwearablelist.cpp | 2 +- 12 files changed, 149 insertions(+), 158 deletions(-) diff --git a/.hgpatchinfo/Appearance-Misc.desc b/.hgpatchinfo/Appearance-Misc.desc index 49491dd1f4..3ef1fb03d7 100644 --- a/.hgpatchinfo/Appearance-Misc.desc +++ b/.hgpatchinfo/Appearance-Misc.desc @@ -13,6 +13,9 @@ -> normal-drop : replace wear -> Ctrl-drop : add wear - fixed : LLAppearanceMgr::registerAttachment() fails to (re)add a link for worn attachments that aren't linked to in COF at log-on +- fixed : LLViewerObject::getAttachmentItemID() sometimes returns the NULL UUID for the avatar's own attachments +- fixed : LLAppearanceMgr::updateAppearanceFromCOF() doesn't properly filter items collected from folder links + -> create an outfit with a folder link + "Replace Outfit" == wearables that exist in both COF and the linked folder will end up worn multiple times - changed : deprecated removeItemFromAvatar() in favour of having LLAppearanceMgr::removeItemFromAvatar() handle it directly/correctly -> wearables can't be worn/removed in 2.X without the viewer already having an LLWearable instance for it anyway - changed : enable "Replace Current Outfit" on the base outfit if it's marked dirty diff --git a/indra/newview/llagentwearables.cpp b/indra/newview/llagentwearables.cpp index 6a5a78c082..d370fcbefa 100644 --- a/indra/newview/llagentwearables.cpp +++ b/indra/newview/llagentwearables.cpp @@ -55,7 +55,7 @@ LLAgentWearables gAgentWearables; BOOL LLAgentWearables::mInitialWearablesUpdateReceived = FALSE; -// [SL:KB] - Patch: Appearance-InitialWearablesLoadedCallback | Checked: 2010-08-14 (Catznip-2.5.0a) | Added: Catznip-2.1.1d +// [SL:KB] - Patch: Appearance-InitialWearablesLoadedCallback | Checked: 2010-08-14 (Catznip-2.6.0a) | Added: Catznip-2.1.1d bool LLAgentWearables::mInitialWearablesLoaded = false; // [/SL:KB] @@ -1451,7 +1451,7 @@ void LLAgentWearables::setWearableOutfit(const LLInventoryItem::item_array_t& it // Start rendering & update the server mWearablesLoaded = TRUE; checkWearablesLoaded(); -// [SL:KB] - Patch: Appearance-InitialWearablesLoadedCallback | Checked: 2010-09-22 (Catznip-2.5.0a) | Modified: Catznip-2.2.0a +// [SL:KB] - Patch: Appearance-InitialWearablesLoadedCallback | Checked: 2010-09-22 (Catznip-2.6.0a) | Modified: Catznip-2.2.0a if (!mInitialWearablesLoaded) { mInitialWearablesLoaded = true; @@ -1736,7 +1736,7 @@ void LLAgentWearables::userRemoveAllClothesStep2(BOOL proceed) // Combines userRemoveAllAttachments() and userAttachMultipleAttachments() logic to // get attachments into desired state with minimal number of adds/removes. //void LLAgentWearables::userUpdateAttachments(LLInventoryModel::item_array_t& obj_item_array) -// [SL:KB] - Patch: Appearance-SyncAttach | Checked: 2010-09-22 (Catznip-2.5.0a) | Added: Catznip-2.2.0a +// [SL:KB] - Patch: Appearance-SyncAttach | Checked: 2010-09-22 (Catznip-2.6.0a) | Added: Catznip-2.2.0a void LLAgentWearables::userUpdateAttachments(LLInventoryModel::item_array_t& obj_item_array, bool fAttachOnly) // [/SL:KB] { @@ -1804,7 +1804,7 @@ void LLAgentWearables::userUpdateAttachments(LLInventoryModel::item_array_t& obj // Remove everything in objects_to_remove // userRemoveMultipleAttachments(objects_to_remove); -// [SL:KB] - Patch: Appearance-SyncAttach | Checked: 2010-09-22 (Catznip-2.5.0a) | Added: Catznip-2.2.0a +// [SL:KB] - Patch: Appearance-SyncAttach | Checked: 2010-09-22 (Catznip-2.6.0a) | Added: Catznip-2.2.0a if (!fAttachOnly) { userRemoveMultipleAttachments(objects_to_remove); @@ -2120,7 +2120,7 @@ boost::signals2::connection LLAgentWearables::addLoadedCallback(loaded_callback_ return mLoadedSignal.connect(cb); } -// [SL:KB] - Patch: Appearance-InitialWearablesLoadedCallback | Checked: 2010-08-14 (Catznip-2.5.0a) | Added: Catznip-2.1.1d +// [SL:KB] - Patch: Appearance-InitialWearablesLoadedCallback | Checked: 2010-08-14 (Catznip-2.6.0a) | Added: Catznip-2.1.1d boost::signals2::connection LLAgentWearables::addInitialWearablesLoadedCallback(loaded_callback_t cb) { return mInitialWearablesLoadedSignal.connect(cb); diff --git a/indra/newview/llagentwearables.h b/indra/newview/llagentwearables.h index c3134f5bdb..e96eba24d4 100644 --- a/indra/newview/llagentwearables.h +++ b/indra/newview/llagentwearables.h @@ -76,7 +76,7 @@ public: BOOL isWearableCopyable(LLWearableType::EType type, U32 index /*= 0*/) const; BOOL areWearablesLoaded() const; -// [SL:KB] - Patch: Appearance-InitialWearablesLoadedCallback | Checked: 2010-08-14 (Catznip-2.5.0a) | Added: Catznip-2.1.1d +// [SL:KB] - Patch: Appearance-InitialWearablesLoadedCallback | Checked: 2010-08-14 (Catznip-2.6.0a) | Added: Catznip-2.1.1d bool areInitalWearablesLoaded() const { return mInitialWearablesLoaded; } // [/SL:KB] bool isCOFChangeInProgress() const { return mCOFChangeInProgress; } @@ -219,7 +219,7 @@ public: typedef std::vector llvo_vec_t; // static void userUpdateAttachments(LLInventoryModel::item_array_t& obj_item_array); -// [SL:KB] - Patch: Appearance-SyncAttach | Checked: 2010-09-22 (Catznip-2.5.0a) | Added: Catznip-2.2.0a +// [SL:KB] - Patch: Appearance-SyncAttach | Checked: 2010-09-22 (Catznip-2.6.0a) | Added: Catznip-2.2.0a // Not the best way to go about this but other attempts changed far too much LL code to be a viable solution static void userUpdateAttachments(LLInventoryModel::item_array_t& obj_item_array, bool fAttachOnly = false); // [/SL:KB] @@ -241,7 +241,7 @@ public: typedef boost::function loaded_callback_t; typedef boost::signals2::signal loaded_signal_t; boost::signals2::connection addLoadedCallback(loaded_callback_t cb); -// [SL:KB] - Patch: Appearance-InitialWearablesLoadedCallback | Checked: 2010-08-14 (Catznip-2.5.0a) | Added: Catznip-2.1.1d +// [SL:KB] - Patch: Appearance-InitialWearablesLoadedCallback | Checked: 2010-08-14 (Catznip-2.6.0a) | Added: Catznip-2.1.1d boost::signals2::connection addInitialWearablesLoadedCallback(loaded_callback_t cb); // [/SL:KB] @@ -251,7 +251,7 @@ public: private: loading_started_signal_t mLoadingStartedSignal; // should be called before wearables are changed loaded_signal_t mLoadedSignal; // emitted when all agent wearables get loaded -// [SL:KB] - Patch: Appearance-InitialWearablesLoadedCallback | Checked: 2010-08-14 (Catznip-2.5.0a) | Added: Catznip-2.1.1d +// [SL:KB] - Patch: Appearance-InitialWearablesLoadedCallback | Checked: 2010-08-14 (Catznip-2.6.0a) | Added: Catznip-2.1.1d loaded_signal_t mInitialWearablesLoadedSignal; // emitted once when the initial wearables are loaded // [/SL:KB] @@ -264,7 +264,7 @@ private: wearableentry_map_t mWearableDatas; static BOOL mInitialWearablesUpdateReceived; -// [SL:KB] - Patch: Appearance-InitialWearablesLoadedCallback | Checked: 2010-08-14 (Catznip-2.5.0a) | Added: Catznip-2.2.0a +// [SL:KB] - Patch: Appearance-InitialWearablesLoadedCallback | Checked: 2010-08-14 (Catznip-2.6.0a) | Added: Catznip-2.2.0a static bool mInitialWearablesLoaded; // [/SL:KB] BOOL mWearablesLoaded; diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp index 2c27547b3d..74fd6d4054 100644 --- a/indra/newview/llappearancemgr.cpp +++ b/indra/newview/llappearancemgr.cpp @@ -280,7 +280,7 @@ public: void onWearableAssetFetch(LLWearable *wearable); void onAllComplete(); -// [SL:KB] - Patch: Appearance-COFCorruption | Checked: 2010-04-14 (Catznip-2.5.0a) | Added: Catznip-2.0.0a +// [SL:KB] - Patch: Appearance-COFCorruption | Checked: 2010-04-14 (Catznip-2.6.0a) | Added: Catznip-2.0.0a bool pollStopped(); // [/SL:KB] @@ -362,7 +362,7 @@ void LLWearableHoldingPattern::eraseTypeToRecover(LLWearableType::EType type) mTypesToRecover.erase(type); } -// [SL:KB] - Patch: Appearance-SyncAttach | Checked: 2010-06-19 (Catznip-2.5.0a) | Added: Catznip-2.1.2a +// [SL:KB] - Patch: Appearance-SyncAttach | Checked: 2010-06-19 (Catznip-2.6.0a) | Added: Catznip-2.1.2a // Fix for http://jira.secondlife.com/browse/VWR-18512 /* void LLWearableHoldingPattern::setObjItems(const LLInventoryModel::item_array_t& items) @@ -467,7 +467,7 @@ void LLWearableHoldingPattern::onAllComplete() llinfos << "Updating agent wearables with " << mResolved << " wearable items " << llendl; LLAppearanceMgr::instance().updateAgentWearables(this, false); -// [SL:KB] - Patch: Appearance-SyncAttach | Checked: 2010-03-22 (Catznip-2.5.0a) | Added: Catznip-2.1.2a +// [SL:KB] - Patch: Appearance-SyncAttach | Checked: 2010-03-22 (Catznip-2.6.0a) | Added: Catznip-2.1.2a // Fix for http://jira.secondlife.com/browse/VWR-18512 /* // Update attachments to match those requested. @@ -508,7 +508,7 @@ bool LLWearableHoldingPattern::pollFetchCompletion() { llwarns << "skipping because LLWearableHolding pattern is invalid (superceded by later outfit request)" << llendl; -// [SL:KB] - Patch: Appearance-COFCorruption | Checked: 2010-04-14 (Catznip-2.5.0a) | Added: Catznip-2.0.0a +// [SL:KB] - Patch: Appearance-COFCorruption | Checked: 2010-04-14 (Catznip-2.6.0a) | Added: Catznip-2.0.0a // If we were signalled to stop then we shouldn't do anything else except poll for when it's safe to delete ourselves doOnIdleRepeating(boost::bind(&LLWearableHoldingPattern::pollStopped, this)); return true; @@ -605,7 +605,7 @@ public: { llwarns << "skipping because LLWearableHolding pattern is invalid (superceded by later outfit request)" << llendl; -// [SL:KB] - Patch: Appearance-COFCorruption | Checked: 2010-04-14 (Catznip-2.5.0a) | Added: Catznip-2.0.0a +// [SL:KB] - Patch: Appearance-COFCorruption | Checked: 2010-04-14 (Catznip-2.6.0a) | Added: Catznip-2.0.0a // If we were signalled to stop then we shouldn't do anything else except poll for when it's safe to delete ourselves return; // [/SL:KB] @@ -683,7 +683,7 @@ void LLWearableHoldingPattern::clearCOFLinksForMissingWearables() } } -// [SL:KB] - Patch: Appearance-COFCorruption | Checked: 2010-04-14 (Catznip-2.5.0a) | Added: Catznip-2.0.0a +// [SL:KB] - Patch: Appearance-COFCorruption | Checked: 2010-04-14 (Catznip-2.6.0a) | Added: Catznip-2.0.0a bool LLWearableHoldingPattern::pollStopped() { // We have to keep on polling until we're sure that all callbacks have completed or they'll cause a crash @@ -1340,7 +1340,7 @@ bool LLAppearanceMgr::getCanReplaceCOF(const LLUUID& outfit_cat_id) // Check whether it's the base outfit. // if (outfit_cat_id.isNull() || outfit_cat_id == getBaseOutfitUUID()) -// [SL:KB] - Patch: Appearance-Misc | Checked: 2010-09-21 (Catznip-2.5.0a) | Added: Catznip-2.1.2d +// [SL:KB] - Patch: Appearance-Misc | Checked: 2010-09-21 (Catznip-2.6.0a) | Added: Catznip-2.1.2d if ( (outfit_cat_id.isNull()) || ((outfit_cat_id == getBaseOutfitUUID()) && (!isOutfitDirty())) ) // [/SL:KB] { @@ -1416,7 +1416,7 @@ void LLAppearanceMgr::filterWearableItems( if (size <= 0) continue; // S32 start_index = llmax(0,size-max_per_type); -// [SL:KB] - Patch: Appearance-Misc | Checked: 2010-05-11 (Catznip-2.5.0a) | Added: Catznip-2.0.0h +// [SL:KB] - Patch: Appearance-Misc | Checked: 2010-05-11 (Catznip-2.6.0a) | Added: Catznip-2.0.0h S32 start_index = llmax(0, size - ((LLAssetType::AT_BODYPART == LLWearableType::getAssetType((LLWearableType::EType)i)) ? 1 : max_per_type)); // [/SL:KB[ @@ -1747,7 +1747,7 @@ void LLAppearanceMgr::updateAppearanceFromCOF(bool update_base_outfit_ordering) remove_non_link_items(wear_items); remove_non_link_items(obj_items); remove_non_link_items(gest_items); -// [SL:KB] - Patch: Apperance-Misc | Checked: 2010-11-24 (Catznip-2.5.0a) | Added: Catzip-2.4.0f +// [SL:KB] - Patch: Apperance-Misc | Checked: 2010-11-24 (Catznip-2.6.0a) | Added: Catzip-2.4.0f // Since we're following folder links we might have picked up new duplicates, or exceeded MAX_CLOTHING_PER_TYPE removeDuplicateItems(wear_items); removeDuplicateItems(obj_items); @@ -1758,7 +1758,7 @@ void LLAppearanceMgr::updateAppearanceFromCOF(bool update_base_outfit_ordering) dumpItemArray(wear_items,"asset_dump: wear_item"); dumpItemArray(obj_items,"asset_dump: obj_item"); -// [SL:KB] - Patch: Appearance-SyncAttach | Checked: 2010-09-22 (Catznip-2.5.0a) | Added: Catznip-2.2.0a +// [SL:KB] - Patch: Appearance-SyncAttach | Checked: 2010-09-22 (Catznip-2.6.0a) | Added: Catznip-2.2.0a // Update attachments to match those requested. if (isAgentAvatarValid()) { @@ -2610,9 +2610,9 @@ void LLAppearanceMgr::removeItemFromAvatar(const LLUUID& id_to_remove) // //*TODO move here the exact removing code from LLWearableBridge::removeItemFromAvatar in the future // LLWearableBridge::removeItemFromAvatar(item_to_remove); // } -// [SL:KB] - Patch: Appearance-RemoveWearableFromAvatar | Checked: 2010-08-13 (Catznip-2.5.0a) | Added: Catznip-2.1.1d +// [SL:KB] - Patch: Appearance-RemoveWearableFromAvatar | Checked: 2010-08-13 (Catznip-2.6.0a) | Added: Catznip-2.1.1d { - /*const*/ LLWearable* pWearable = gAgentWearables.getWearableFromItemID(item_to_remove->getLinkedUUID()); + const LLWearable* pWearable = gAgentWearables.getWearableFromItemID(item_to_remove->getLinkedUUID()); if ( (pWearable) && (LLAssetType::AT_BODYPART != pWearable->getAssetType()) ) { U32 idxWearable = gAgentWearables.getWearableIndex(pWearable); @@ -2771,7 +2771,7 @@ void LLAppearanceMgr::setAttachmentInvLinkEnable(bool val) { llinfos << "setAttachmentInvLinkEnable => " << (int) val << llendl; mAttachmentInvLinkEnabled = val; -// [SL:KB] - Patch: Appearance-SyncAttach | Checked: 2010-10-05 (Catznip-2.5.0a) | Added: Catznip-2.2.0a +// [SL:KB] - Patch: Appearance-SyncAttach | Checked: 2010-10-05 (Catznip-2.6.0a) | Added: Catznip-2.2.0a if (mAttachmentInvLinkEnabled) { linkPendingAttachments(); @@ -2799,7 +2799,7 @@ void dumpAttachmentSet(const std::set& atts, const std::string& msg) void LLAppearanceMgr::registerAttachment(const LLUUID& item_id) { gInventory.addChangedMask(LLInventoryObserver::LABEL, item_id); -// [SL:KB] - Patch: Appearance-SyncAttach | Checked: 2010-10-05 (Catznip-2.5.0a) | Added: Catznip-2.2.0a +// [SL:KB] - Patch: Appearance-SyncAttach | Checked: 2010-10-05 (Catznip-2.6.0a) | Added: Catznip-2.2.0a if (isLinkInCOF(item_id)) { return; @@ -2813,7 +2813,7 @@ void LLAppearanceMgr::registerAttachment(const LLUUID& item_id) // it will trigger gAgentWariables.notifyLoadingFinished() // But it is not acceptable solution. See EXT-7777 // LLAppearanceMgr::addCOFItemLink(item_id, false); // Add COF link for item. -// [SL:KB] - Patch: Appearance-SyncAttach | Checked: 2010-10-05 (Catznip-2.5.0a) | Modified: Catznip-2.2.0a +// [SL:KB] - Patch: Appearance-SyncAttach | Checked: 2010-10-05 (Catznip-2.6.0a) | Modified: Catznip-2.2.0a LLPointer cb = new LLRegisterAttachmentCallback(); LLAppearanceMgr::addCOFItemLink(item_id, false, cb); // Add COF link for item. // [/SL:KB] @@ -2827,7 +2827,7 @@ void LLAppearanceMgr::registerAttachment(const LLUUID& item_id) void LLAppearanceMgr::unregisterAttachment(const LLUUID& item_id) { gInventory.addChangedMask(LLInventoryObserver::LABEL, item_id); -// [SL:KB] - Patch: Appearance-SyncAttach | Checked: 2010-10-05 (Catznip-2.5.0a) | Added: Catznip-2.2.0a +// [SL:KB] - Patch: Appearance-SyncAttach | Checked: 2010-10-05 (Catznip-2.6.0a) | Added: Catznip-2.2.0a uuid_vec_t::iterator itPendingAttachLink = std::find(mPendingAttachLinks.begin(), mPendingAttachLinks.end(), item_id); if (itPendingAttachLink != mPendingAttachLinks.end()) { @@ -2845,7 +2845,7 @@ void LLAppearanceMgr::unregisterAttachment(const LLUUID& item_id) } } -// [SL:KB] - Patch: Appearance-SyncAttach | Checked: 2010-09-18 (Catznip-2.5.0a) | Modified: Catznip-2.2.0a +// [SL:KB] - Patch: Appearance-SyncAttach | Checked: 2010-09-18 (Catznip-2.6.0a) | Modified: Catznip-2.2.0a void LLAppearanceMgr::linkPendingAttachments() { LLPointer cb = NULL; diff --git a/indra/newview/llappearancemgr.h b/indra/newview/llappearancemgr.h index 5e06010407..86b4a02098 100644 --- a/indra/newview/llappearancemgr.h +++ b/indra/newview/llappearancemgr.h @@ -217,7 +217,7 @@ private: std::auto_ptr mUnlockOutfitTimer; -// [SL:KB] - Patch: Appearance-SyncAttach | Checked: 2010-09-18 (Catznip-2.5.0a) | Modified: Catznip-2.1.2e +// [SL:KB] - Patch: Appearance-SyncAttach | Checked: 2010-09-18 (Catznip-2.6.0a) | Modified: Catznip-2.1.2e public: void linkPendingAttachments(); void onRegisterAttachmentComplete(const LLUUID& idItem); @@ -251,7 +251,7 @@ private: bool mUpdateBaseOrder; }; -// [SL:KB] - Patch: Appearance-SyncAttach | Checked: 2010-08-31 (Catznip-2.5.0a) | Added: Catznip-2.1.2a +// [SL:KB] - Patch: Appearance-SyncAttach | Checked: 2010-08-31 (Catznip-2.6.0a) | Added: Catznip-2.1.2a class LLRegisterAttachmentCallback : public LLInventoryCallback { public: diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index 3ee1db47ec..8664d2e5e6 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -2473,7 +2473,7 @@ void LLFolderBridge::folderOptionsMenu() // BAP change once we're no longer treating regular categories as ensembles. const bool is_ensemble = (type == LLFolderType::FT_NONE || LLFolderType::lookupIsEnsembleType(type)); -// [SL:KB] - Patch: Appearance-Misc | Checked: 2010-11-24 (Catznip-2.5.0a) | Added: Catznip-2.4.0e +// [SL:KB] - Patch: Appearance-Misc | Checked: 2010-11-24 (Catznip-2.6.0a) | Added: Catznip-2.4.0e const bool is_outfit = (type == LLFolderType::FT_OUTFIT); // [/SL:KB] @@ -2529,7 +2529,7 @@ void LLFolderBridge::folderOptionsMenu() disabled_items.push_back(std::string("Remove From Outfit")); } // if (!LLAppearanceMgr::instance().getCanReplaceCOF(mUUID)) -// [SL:KB] - Patch: Appearance-Misc | Checked: 2010-11-24 (Catznip-2.5.0a) | Added: Catznip-2.4.0e +// [SL:KB] - Patch: Appearance-Misc | Checked: 2010-11-24 (Catznip-2.6.0a) | Added: Catznip-2.4.0e if ( ((is_outfit) && (!LLAppearanceMgr::instance().getCanReplaceCOF(mUUID))) || ((!is_outfit) && (gAgentWearables.isCOFChangeInProgress())) ) // [/SL:KB] @@ -4505,14 +4505,12 @@ void remove_inventory_category_from_avatar_step2( BOOL proceed, LLUUID category_ continue; if (get_is_item_worn(item->getUUID())) { -/* - LLWearableList::instance().getAsset(item->getAssetUUID(), - item->getName(), - item->getType(), - LLWearableBridge::onRemoveFromAvatarArrived, - new OnRemoveStruct(item->getLinkedUUID())); -*/ -// [SL:KB] - Patch: Appearance-RemoveWearableFromAvatar | Checked: 2010-08-13 (Catznip-2.5.0a) | Added: Catznip-2.1.1d +// LLWearableList::instance().getAsset(item->getAssetUUID(), +// item->getName(), +// item->getType(), +// LLWearableBridge::onRemoveFromAvatarArrived, +// new OnRemoveStruct(item->getLinkedUUID())); +// [SL:KB] - Patch: Appearance-RemoveWearableFromAvatar | Checked: 2010-08-13 (Catznip-2.6.0a) | Added: Catznip-2.1.1d LLAppearanceMgr::instance().removeItemFromAvatar(item->getUUID()); // [/SL:KB] } @@ -4753,60 +4751,56 @@ void LLWearableBridge::wearAddOnAvatar() } // static -/* -void LLWearableBridge::onWearOnAvatarArrived( LLWearable* wearable, void* userdata ) -{ - LLUUID* item_id = (LLUUID*) userdata; - if(wearable) - { - LLViewerInventoryItem* item = NULL; - item = (LLViewerInventoryItem*)gInventory.getItem(*item_id); - if(item) - { - if(item->getAssetUUID() == wearable->getAssetID()) - { - gAgentWearables.setWearableItem(item, wearable); - gInventory.notifyObservers(); - //self->getFolderItem()->refreshFromRoot(); - } - else - { - llinfos << "By the time wearable asset arrived, its inv item already pointed to a different asset." << llendl; - } - } - } - delete item_id; -} -*/ +//void LLWearableBridge::onWearOnAvatarArrived( LLWearable* wearable, void* userdata ) +//{ +// LLUUID* item_id = (LLUUID*) userdata; +// if(wearable) +// { +// LLViewerInventoryItem* item = NULL; +// item = (LLViewerInventoryItem*)gInventory.getItem(*item_id); +// if(item) +// { +// if(item->getAssetUUID() == wearable->getAssetID()) +// { +// gAgentWearables.setWearableItem(item, wearable); +// gInventory.notifyObservers(); +// //self->getFolderItem()->refreshFromRoot(); +// } +// else +// { +// llinfos << "By the time wearable asset arrived, its inv item already pointed to a different asset." << llendl; +// } +// } +// } +// delete item_id; +//} // static // BAP remove the "add" code path once everything is fully COF-ified. -/* -void LLWearableBridge::onWearAddOnAvatarArrived( LLWearable* wearable, void* userdata ) -{ - LLUUID* item_id = (LLUUID*) userdata; - if(wearable) - { - LLViewerInventoryItem* item = NULL; - item = (LLViewerInventoryItem*)gInventory.getItem(*item_id); - if(item) - { - if(item->getAssetUUID() == wearable->getAssetID()) - { - bool do_append = true; - gAgentWearables.setWearableItem(item, wearable, do_append); - gInventory.notifyObservers(); - //self->getFolderItem()->refreshFromRoot(); - } - else - { - llinfos << "By the time wearable asset arrived, its inv item already pointed to a different asset." << llendl; - } - } - } - delete item_id; -} -*/ +//void LLWearableBridge::onWearAddOnAvatarArrived( LLWearable* wearable, void* userdata ) +//{ +// LLUUID* item_id = (LLUUID*) userdata; +// if(wearable) +// { +// LLViewerInventoryItem* item = NULL; +// item = (LLViewerInventoryItem*)gInventory.getItem(*item_id); +// if(item) +// { +// if(item->getAssetUUID() == wearable->getAssetID()) +// { +// bool do_append = true; +// gAgentWearables.setWearableItem(item, wearable, do_append); +// gInventory.notifyObservers(); +// //self->getFolderItem()->refreshFromRoot(); +// } +// else +// { +// llinfos << "By the time wearable asset arrived, its inv item already pointed to a different asset." << llendl; +// } +// } +// } +// delete item_id; +//} // static BOOL LLWearableBridge::canEditOnAvatar(void* user_data) @@ -4844,57 +4838,53 @@ BOOL LLWearableBridge::canRemoveFromAvatar(void* user_data) } // static -/* -void LLWearableBridge::onRemoveFromAvatar(void* user_data) -{ - LLWearableBridge* self = (LLWearableBridge*)user_data; - if(!self) return; - if(get_is_item_worn(self->mUUID)) - { - LLViewerInventoryItem* item = self->getItem(); - if (item) - { - LLUUID parent_id = item->getParentUUID(); - LLWearableList::instance().getAsset(item->getAssetUUID(), - item->getName(), - item->getType(), - onRemoveFromAvatarArrived, - new OnRemoveStruct(LLUUID(self->mUUID))); - } - } -} -*/ +//void LLWearableBridge::onRemoveFromAvatar(void* user_data) +//{ +// LLWearableBridge* self = (LLWearableBridge*)user_data; +// if(!self) return; +// if(get_is_item_worn(self->mUUID)) +// { +// LLViewerInventoryItem* item = self->getItem(); +// if (item) +// { +// LLUUID parent_id = item->getParentUUID(); +// LLWearableList::instance().getAsset(item->getAssetUUID(), +// item->getName(), +// item->getType(), +// onRemoveFromAvatarArrived, +// new OnRemoveStruct(LLUUID(self->mUUID))); +// } +// } +//} // static -/* -void LLWearableBridge::onRemoveFromAvatarArrived(LLWearable* wearable, - void* userdata) -{ - OnRemoveStruct *on_remove_struct = (OnRemoveStruct*) userdata; - const LLUUID &item_id = gInventory.getLinkedItemID(on_remove_struct->mUUID); - if(wearable) - { - if( get_is_item_worn( item_id ) ) - { - LLWearableType::EType type = wearable->getType(); - - if( !(type==LLWearableType::WT_SHAPE || type==LLWearableType::WT_SKIN || type==LLWearableType::WT_HAIR || type==LLWearableType::WT_EYES ) ) //&& - //!((!gAgent.isTeen()) && ( type==LLWearableType::WT_UNDERPANTS || type==LLWearableType::WT_UNDERSHIRT )) ) - { - bool do_remove_all = false; - U32 index = gAgentWearables.getWearableIndex(wearable); - gAgentWearables.removeWearable( type, do_remove_all, index ); - } - } - } - - // Find and remove this item from the COF. - LLAppearanceMgr::instance().removeCOFItemLinks(item_id,false); - gInventory.notifyObservers(); - - delete on_remove_struct; -} -*/ +//void LLWearableBridge::onRemoveFromAvatarArrived(LLWearable* wearable, +// void* userdata) +//{ +// OnRemoveStruct *on_remove_struct = (OnRemoveStruct*) userdata; +// const LLUUID &item_id = gInventory.getLinkedItemID(on_remove_struct->mUUID); +// if(wearable) +// { +// if( get_is_item_worn( item_id ) ) +// { +// LLWearableType::EType type = wearable->getType(); +// +// if( !(type==LLWearableType::WT_SHAPE || type==LLWearableType::WT_SKIN || type==LLWearableType::WT_HAIR || type==LLWearableType::WT_EYES ) ) //&& +// //!((!gAgent.isTeen()) && ( type==LLWearableType::WT_UNDERPANTS || type==LLWearableType::WT_UNDERSHIRT )) ) +// { +// bool do_remove_all = false; +// U32 index = gAgentWearables.getWearableIndex(wearable); +// gAgentWearables.removeWearable( type, do_remove_all, index ); +// } +// } +// } +// +// // Find and remove this item from the COF. +// LLAppearanceMgr::instance().removeCOFItemLinks(item_id,false); +// gInventory.notifyObservers(); +// +// delete on_remove_struct; +//} // static void LLWearableBridge::removeAllClothesFromAvatar() @@ -4906,7 +4896,7 @@ void LLWearableBridge::removeAllClothesFromAvatar() continue; // for (S32 index = gAgentWearables.getWearableCount(itype)-1; index >= 0 ; --index) -// [SL:KB] - Patch: Appearance-Misc | Checked: 2010-09-04 (Catznip-2.5.0a) | Added: Catznip-2.1.2a +// [SL:KB] - Patch: Appearance-Misc | Checked: 2010-09-04 (Catznip-2.6.0a) | Added: Catznip-2.1.2a for (S32 index = gAgentWearables.getWearableCount((LLWearableType::EType)itype)-1; index >= 0 ; --index) // [/SL:KB] { @@ -4934,14 +4924,12 @@ void LLWearableBridge::removeItemFromAvatar(LLViewerInventoryItem *item) { if (item) { -/* - LLWearableList::instance().getAsset(item->getAssetUUID(), - item->getName(), - item->getType(), - LLWearableBridge::onRemoveFromAvatarArrived, - new OnRemoveStruct(item->getUUID())); -*/ -// [SL:KB] - Patch: Appearance-RemoveWearableFromAvatar | Checked: 2010-08-13 (Catznip-2.5.0a) | Added: Catznip-2.1.1d +// LLWearableList::instance().getAsset(item->getAssetUUID(), +// item->getName(), +// item->getType(), +// LLWearableBridge::onRemoveFromAvatarArrived, +// new OnRemoveStruct(item->getUUID())); +// [SL:KB] - Patch: Appearance-RemoveWearableFromAvatar | Checked: 2010-08-13 (Catznip-2.6.0a) | Added: Catznip-2.1.1d LLAppearanceMgr::instance().removeItemFromAvatar(item->getUUID()); // [/SL:KB] } diff --git a/indra/newview/lltooldraganddrop.cpp b/indra/newview/lltooldraganddrop.cpp index 23b59839be..a8101a4dcf 100644 --- a/indra/newview/lltooldraganddrop.cpp +++ b/indra/newview/lltooldraganddrop.cpp @@ -1623,7 +1623,7 @@ EAcceptance LLToolDragAndDrop::dad3dRezAttachmentFromInv( if (mSource == SOURCE_LIBRARY) { // LLPointer cb = new RezAttachmentCallback(0); -// [SL:KB] - Patch: Appearance-Misc | Checked: 2010-09-28 (Catznip-2.5.0a) | Added: Catznip-2.2.0a +// [SL:KB] - Patch: Appearance-Misc | Checked: 2010-09-28 (Catznip-2.6.0a) | Added: Catznip-2.2.0a // Make this behave consistent with dad3dWearItem LLPointer cb = new RezAttachmentCallback(0, !(mask & MASK_CONTROL)); // [/SL:KB] @@ -1638,7 +1638,7 @@ EAcceptance LLToolDragAndDrop::dad3dRezAttachmentFromInv( else { // rez_attachment(item, 0); -// [SL:KB] - Patch: Appearance-Misc | Checked: 2010-09-28 (Catznip-2.5.0a) | Added: Catznip-2.2.0a +// [SL:KB] - Patch: Appearance-Misc | Checked: 2010-09-28 (Catznip-2.6.0a) | Added: Catznip-2.2.0a // Make this behave consistent with dad3dWearItem rez_attachment(item, 0, !(mask & MASK_CONTROL)); // [/SL:KB] diff --git a/indra/newview/llviewerinventory.cpp b/indra/newview/llviewerinventory.cpp index 7e7c3e9088..988cbe388f 100644 --- a/indra/newview/llviewerinventory.cpp +++ b/indra/newview/llviewerinventory.cpp @@ -948,7 +948,7 @@ void ModifiedCOFCallback::fire(const LLUUID& inv_item) } //RezAttachmentCallback::RezAttachmentCallback(LLViewerJointAttachment *attachmentp) -// [SL:KB] - Patch: Appearance-Misc | Checked: 2010-09-28 (Catznip-2.5.0a) | Added: Catznip-2.2.0a +// [SL:KB] - Patch: Appearance-Misc | Checked: 2010-09-28 (Catznip-2.6.0a) | Added: Catznip-2.2.0a RezAttachmentCallback::RezAttachmentCallback(LLViewerJointAttachment *attachmentp, bool replace) : mAttach(attachmentp), mReplace(replace) // [/SL:KB] @@ -968,7 +968,7 @@ void RezAttachmentCallback::fire(const LLUUID& inv_item) if (item) { // rez_attachment(item, mAttach); -// [SL:KB] - Patch: Appearance-Misc | Checked: 2010-09-28 (Catznip-2.5.0a) | Added: Catznip-2.2.0a +// [SL:KB] - Patch: Appearance-Misc | Checked: 2010-09-28 (Catznip-2.6.0a) | Added: Catznip-2.2.0a rez_attachment(item, mAttach, mReplace); // [/SL:KB] } diff --git a/indra/newview/llviewerinventory.h b/indra/newview/llviewerinventory.h index 24f1935e60..071cdb557c 100644 --- a/indra/newview/llviewerinventory.h +++ b/indra/newview/llviewerinventory.h @@ -264,7 +264,7 @@ class RezAttachmentCallback : public LLInventoryCallback { public: // RezAttachmentCallback(LLViewerJointAttachment *attachmentp); -// [SL:KB] - Patch: Appearance-Misc | Checked: 2010-09-28 (Catznip-2.5.0a) | Added: Catznip-2.2.0a +// [SL:KB] - Patch: Appearance-Misc | Checked: 2010-09-28 (Catznip-2.6.0a) | Added: Catznip-2.2.0a RezAttachmentCallback(LLViewerJointAttachment *attachmentp, bool replace = false); // [/SL:KB] void fire(const LLUUID& inv_item); @@ -274,7 +274,7 @@ protected: private: LLViewerJointAttachment* mAttach; -// [SL:KB] - Patch: Appearance-Misc | Checked: 2010-09-28 (Catznip-2.5.0a) | Added: Catznip-2.2.0a +// [SL:KB] - Patch: Appearance-Misc | Checked: 2010-09-28 (Catznip-2.6.0a) | Added: Catznip-2.2.0a bool mReplace; // [/SL:KB] }; diff --git a/indra/newview/llviewerjointattachment.cpp b/indra/newview/llviewerjointattachment.cpp index f0fcb7eeae..852a525caf 100644 --- a/indra/newview/llviewerjointattachment.cpp +++ b/indra/newview/llviewerjointattachment.cpp @@ -169,7 +169,7 @@ BOOL LLViewerJointAttachment::addObject(LLViewerObject* object) // re-connect object to the joint correctly } -// [SL:KB] - Patch: Appearance-Misc | Checked: Catznip-2.4.0h (2011-01-13) | Added: Catznip-2.4.0h +// [SL:KB] - Patch: Appearance-Misc | Checked: Catznip-2.6.0a (2011-01-13) | Added: Catznip-2.4.0h // LLViewerJointAttachment::removeObject() sets the object's item to the NULL UUID so we need to extract it *after* the block above object->extractAttachmentItemID(); // [/SL:KB] diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index b35c50b575..ce086d546a 100644 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -5666,7 +5666,7 @@ LLViewerJointAttachment* LLVOAvatar::getTargetAttachmentPoint(LLViewerObject* vi { llwarns << "Object attachment point invalid: " << attachmentID << llendl; // attachment = get_if_there(mAttachmentPoints, 1, (LLViewerJointAttachment*)NULL); // Arbitrary using 1 (chest) -// [SL:KB] - Patch: Appearance-LegacyMultiAttachment | Checked: 2010-08-28 (Catznip-2.5.0a) | Added: Catznip-2.1.2a +// [SL:KB] - Patch: Appearance-LegacyMultiAttachment | Checked: 2010-08-28 (Catznip-2.6.0a) | Added: Catznip-2.1.2a S32 idxAttachPt = 1; if ( (!isSelf()) && (gSavedSettings.getBOOL("LegacyMultiAttachmentSupport")) && (attachmentID > 38) && (attachmentID <= 68) ) idxAttachPt = attachmentID - 38; @@ -6128,7 +6128,7 @@ BOOL LLVOAvatar::isFullyLoaded() const // return TRUE; // else // return mFullyLoaded; -// [SL:KB] - Patch: Appearance-SyncAttach | Checked: 2010-09-22 (Catznip-2.5.0a) | Added: Catznip-2.2.0a +// [SL:KB] - Patch: Appearance-SyncAttach | Checked: 2010-09-22 (Catznip-2.6.0a) | Added: Catznip-2.2.0a // Changes to LLAppearanceMgr::updateAppearanceFromCOF() expect this function to actually return mFullyLoaded for gAgentAvatarp if ( (!isSelf()) && (gSavedSettings.getBOOL("RenderUnloadedAvatar")) ) return TRUE; diff --git a/indra/newview/llwearablelist.cpp b/indra/newview/llwearablelist.cpp index 0f655969fc..b2c7687f33 100644 --- a/indra/newview/llwearablelist.cpp +++ b/indra/newview/llwearablelist.cpp @@ -96,7 +96,7 @@ void LLWearableList::processGetAssetReply( const char* filename, const LLAssetID BOOL isNewWearable = FALSE; LLWearableArrivedData* data = (LLWearableArrivedData*) userdata; // LLWearable* wearable = NULL; // NULL indicates failure -// [SL:KB] - Patch: Appearance-Misc | Checked: 2010-08-13 (Catznip-2.5.0a) | Added: Catznip-2.1.1d +// [SL:KB] - Patch: Appearance-Misc | Checked: 2010-08-13 (Catznip-2.6.0a) | Added: Catznip-2.1.1d LLWearable* wearable = get_if_there(LLWearableList::instance().mList, uuid, (LLWearable*)NULL); if (wearable) { From fc0f77502a497a57d38350189b525eadf5d32c3b Mon Sep 17 00:00:00 2001 From: Kitty Barnett Date: Sat, 6 Aug 2011 15:16:26 +0200 Subject: [PATCH 25/39] update patch dependencies --HG-- branch : Appearance-Misc --- .hgpatchinfo/Appearance-Misc.dep | 1 - 1 file changed, 1 deletion(-) diff --git a/.hgpatchinfo/Appearance-Misc.dep b/.hgpatchinfo/Appearance-Misc.dep index 9c6dad306c..e69de29bb2 100644 --- a/.hgpatchinfo/Appearance-Misc.dep +++ b/.hgpatchinfo/Appearance-Misc.dep @@ -1 +0,0 @@ -7765c3aa3a23513f1e43d63ce4131e37c7d8ddfb \ No newline at end of file From 47d791e7884a418a36d70fa45f34ac7ce46687b2 Mon Sep 17 00:00:00 2001 From: Kitty Barnett Date: Fri, 14 Oct 2011 15:10:30 +0200 Subject: [PATCH 26/39] - internal : reviewed for SL-3.0 --HG-- branch : Appearance-Misc --- indra/newview/llagentwearables.cpp | 10 ++-- indra/newview/llagentwearables.h | 10 ++-- indra/newview/llappearancemgr.cpp | 62 ++++++++++------------- indra/newview/llappearancemgr.h | 7 +-- indra/newview/llinventorybridge.cpp | 24 ++++----- indra/newview/lltooldraganddrop.cpp | 4 +- indra/newview/llviewerinventory.cpp | 4 +- indra/newview/llviewerinventory.h | 4 +- indra/newview/llviewerjointattachment.cpp | 2 +- indra/newview/llvoavatar.cpp | 4 +- indra/newview/llwearablelist.cpp | 2 +- 11 files changed, 61 insertions(+), 72 deletions(-) diff --git a/indra/newview/llagentwearables.cpp b/indra/newview/llagentwearables.cpp index e558bb9bce..74dade3ba6 100644 --- a/indra/newview/llagentwearables.cpp +++ b/indra/newview/llagentwearables.cpp @@ -55,7 +55,7 @@ LLAgentWearables gAgentWearables; BOOL LLAgentWearables::mInitialWearablesUpdateReceived = FALSE; -// [SL:KB] - Patch: Appearance-InitialWearablesLoadedCallback | Checked: 2010-08-14 (Catznip-2.6.0a) | Added: Catznip-2.1.1d +// [SL:KB] - Patch: Appearance-InitialWearablesLoadedCallback | Checked: 2010-08-14 (Catznip-3.0.0a) | Added: Catznip-2.1.1d bool LLAgentWearables::mInitialWearablesLoaded = false; // [/SL:KB] @@ -1451,7 +1451,7 @@ void LLAgentWearables::setWearableOutfit(const LLInventoryItem::item_array_t& it // Start rendering & update the server mWearablesLoaded = TRUE; checkWearablesLoaded(); -// [SL:KB] - Patch: Appearance-InitialWearablesLoadedCallback | Checked: 2010-09-22 (Catznip-2.6.0a) | Modified: Catznip-2.2.0a +// [SL:KB] - Patch: Appearance-InitialWearablesLoadedCallback | Checked: 2010-09-22 (Catznip-3.0.0a) | Modified: Catznip-2.2.0a if (!mInitialWearablesLoaded) { mInitialWearablesLoaded = true; @@ -1705,7 +1705,7 @@ void LLAgentWearables::userRemoveWearablesOfType(const LLWearableType::EType &ty // Combines userRemoveAllAttachments() and userAttachMultipleAttachments() logic to // get attachments into desired state with minimal number of adds/removes. //void LLAgentWearables::userUpdateAttachments(LLInventoryModel::item_array_t& obj_item_array) -// [SL:KB] - Patch: Appearance-SyncAttach | Checked: 2010-09-22 (Catznip-2.6.0a) | Added: Catznip-2.2.0a +// [SL:KB] - Patch: Appearance-SyncAttach | Checked: 2010-09-22 (Catznip-3.0.0a) | Added: Catznip-2.2.0a void LLAgentWearables::userUpdateAttachments(LLInventoryModel::item_array_t& obj_item_array, bool fAttachOnly) // [/SL:KB] { @@ -1773,7 +1773,7 @@ void LLAgentWearables::userUpdateAttachments(LLInventoryModel::item_array_t& obj // Remove everything in objects_to_remove // userRemoveMultipleAttachments(objects_to_remove); -// [SL:KB] - Patch: Appearance-SyncAttach | Checked: 2010-09-22 (Catznip-2.6.0a) | Added: Catznip-2.2.0a +// [SL:KB] - Patch: Appearance-SyncAttach | Checked: 2010-09-22 (Catznip-3.0.0a) | Added: Catznip-2.2.0a if (!fAttachOnly) { userRemoveMultipleAttachments(objects_to_remove); @@ -2089,7 +2089,7 @@ boost::signals2::connection LLAgentWearables::addLoadedCallback(loaded_callback_ return mLoadedSignal.connect(cb); } -// [SL:KB] - Patch: Appearance-InitialWearablesLoadedCallback | Checked: 2010-08-14 (Catznip-2.6.0a) | Added: Catznip-2.1.1d +// [SL:KB] - Patch: Appearance-InitialWearablesLoadedCallback | Checked: 2010-08-14 (Catznip-3.0.0a) | Added: Catznip-2.1.1d boost::signals2::connection LLAgentWearables::addInitialWearablesLoadedCallback(loaded_callback_t cb) { return mInitialWearablesLoadedSignal.connect(cb); diff --git a/indra/newview/llagentwearables.h b/indra/newview/llagentwearables.h index dca0bbdf64..9e9b6eabbe 100644 --- a/indra/newview/llagentwearables.h +++ b/indra/newview/llagentwearables.h @@ -76,7 +76,7 @@ public: BOOL isWearableCopyable(LLWearableType::EType type, U32 index /*= 0*/) const; BOOL areWearablesLoaded() const; -// [SL:KB] - Patch: Appearance-InitialWearablesLoadedCallback | Checked: 2010-08-14 (Catznip-2.6.0a) | Added: Catznip-2.1.1d +// [SL:KB] - Patch: Appearance-InitialWearablesLoadedCallback | Checked: 2010-08-14 (Catznip-3.0.0a) | Added: Catznip-2.1.1d bool areInitalWearablesLoaded() const { return mInitialWearablesLoaded; } // [/SL:KB] bool isCOFChangeInProgress() const { return mCOFChangeInProgress; } @@ -217,7 +217,7 @@ public: typedef std::vector llvo_vec_t; // static void userUpdateAttachments(LLInventoryModel::item_array_t& obj_item_array); -// [SL:KB] - Patch: Appearance-SyncAttach | Checked: 2010-09-22 (Catznip-2.6.0a) | Added: Catznip-2.2.0a +// [SL:KB] - Patch: Appearance-SyncAttach | Checked: 2010-09-22 (Catznip-3.0.0a) | Added: Catznip-2.2.0a // Not the best way to go about this but other attempts changed far too much LL code to be a viable solution static void userUpdateAttachments(LLInventoryModel::item_array_t& obj_item_array, bool fAttachOnly = false); // [/SL:KB] @@ -239,7 +239,7 @@ public: typedef boost::function loaded_callback_t; typedef boost::signals2::signal loaded_signal_t; boost::signals2::connection addLoadedCallback(loaded_callback_t cb); -// [SL:KB] - Patch: Appearance-InitialWearablesLoadedCallback | Checked: 2010-08-14 (Catznip-2.6.0a) | Added: Catznip-2.1.1d +// [SL:KB] - Patch: Appearance-InitialWearablesLoadedCallback | Checked: 2010-08-14 (Catznip-3.0.0a) | Added: Catznip-2.1.1d boost::signals2::connection addInitialWearablesLoadedCallback(loaded_callback_t cb); // [/SL:KB] @@ -249,7 +249,7 @@ public: private: loading_started_signal_t mLoadingStartedSignal; // should be called before wearables are changed loaded_signal_t mLoadedSignal; // emitted when all agent wearables get loaded -// [SL:KB] - Patch: Appearance-InitialWearablesLoadedCallback | Checked: 2010-08-14 (Catznip-2.6.0a) | Added: Catznip-2.1.1d +// [SL:KB] - Patch: Appearance-InitialWearablesLoadedCallback | Checked: 2010-08-14 (Catznip-3.0.0a) | Added: Catznip-2.1.1d loaded_signal_t mInitialWearablesLoadedSignal; // emitted once when the initial wearables are loaded // [/SL:KB] @@ -262,7 +262,7 @@ private: wearableentry_map_t mWearableDatas; static BOOL mInitialWearablesUpdateReceived; -// [SL:KB] - Patch: Appearance-InitialWearablesLoadedCallback | Checked: 2010-08-14 (Catznip-2.6.0a) | Added: Catznip-2.2.0a +// [SL:KB] - Patch: Appearance-InitialWearablesLoadedCallback | Checked: 2010-08-14 (Catznip-3.0.0a) | Added: Catznip-2.2.0a static bool mInitialWearablesLoaded; // [/SL:KB] BOOL mWearablesLoaded; diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp index c77394a3bb..6d61991af7 100644 --- a/indra/newview/llappearancemgr.cpp +++ b/indra/newview/llappearancemgr.cpp @@ -286,7 +286,7 @@ public: void onWearableAssetFetch(LLWearable *wearable); void onAllComplete(); -// [SL:KB] - Patch: Appearance-COFCorruption | Checked: 2010-04-14 (Catznip-2.6.0a) | Added: Catznip-2.0.0a +// [SL:KB] - Patch: Appearance-COFCorruption | Checked: 2010-04-14 (Catznip-3.0.0a) | Added: Catznip-2.0.0a bool pollStopped(); // [/SL:KB] @@ -368,15 +368,11 @@ void LLWearableHoldingPattern::eraseTypeToRecover(LLWearableType::EType type) mTypesToRecover.erase(type); } -// [SL:KB] - Patch: Appearance-SyncAttach | Checked: 2010-06-19 (Catznip-2.6.0a) | Added: Catznip-2.1.2a -// Fix for http://jira.secondlife.com/browse/VWR-18512 -/* -void LLWearableHoldingPattern::setObjItems(const LLInventoryModel::item_array_t& items) -{ - mObjItems = items; -} -*/ -// [/SL:KB] +// [SL:KB] - Patch: Appearance-SyncAttach | Checked: 2010-06-19 (Catznip-3.0.0a) | Added: Catznip-2.1.2a +//void LLWearableHoldingPattern::setObjItems(const LLInventoryModel::item_array_t& items) +//{ +// mObjItems = items; +//} void LLWearableHoldingPattern::setGestItems(const LLInventoryModel::item_array_t& items) { @@ -473,17 +469,13 @@ void LLWearableHoldingPattern::onAllComplete() llinfos << "Updating agent wearables with " << mResolved << " wearable items " << llendl; LLAppearanceMgr::instance().updateAgentWearables(this, false); -// [SL:KB] - Patch: Appearance-SyncAttach | Checked: 2010-03-22 (Catznip-2.6.0a) | Added: Catznip-2.1.2a - // Fix for http://jira.secondlife.com/browse/VWR-18512 -/* - // Update attachments to match those requested. - if (isAgentAvatarValid()) - { - llinfos << "Updating " << mObjItems.count() << " attachments" << llendl; - LLAgentWearables::userUpdateAttachments(mObjItems); - } -*/ -// [/SL:KB] +// [SL:KB] - Patch: Appearance-SyncAttach | Checked: 2010-03-22 (Catznip-3.0.0a) | Added: Catznip-2.1.2a +// // Update attachments to match those requested. +// if (isAgentAvatarValid()) +// { +// llinfos << "Updating " << mObjItems.count() << " attachments" << llendl; +// LLAgentWearables::userUpdateAttachments(mObjItems); +// } if (isFetchCompleted() && isMissingCompleted()) { @@ -514,7 +506,7 @@ bool LLWearableHoldingPattern::pollFetchCompletion() { llwarns << "skipping because LLWearableHolding pattern is invalid (superceded by later outfit request)" << llendl; -// [SL:KB] - Patch: Appearance-COFCorruption | Checked: 2010-04-14 (Catznip-2.6.0a) | Added: Catznip-2.0.0a +// [SL:KB] - Patch: Appearance-COFCorruption | Checked: 2010-04-14 (Catznip-3.0.0a) | Added: Catznip-2.0.0a // If we were signalled to stop then we shouldn't do anything else except poll for when it's safe to delete ourselves doOnIdleRepeating(boost::bind(&LLWearableHoldingPattern::pollStopped, this)); return true; @@ -611,7 +603,7 @@ public: { llwarns << "skipping because LLWearableHolding pattern is invalid (superceded by later outfit request)" << llendl; -// [SL:KB] - Patch: Appearance-COFCorruption | Checked: 2010-04-14 (Catznip-2.6.0a) | Added: Catznip-2.0.0a +// [SL:KB] - Patch: Appearance-COFCorruption | Checked: 2010-04-14 (Catznip-3.0.0a) | Added: Catznip-2.0.0a // If we were signalled to stop then we shouldn't do anything else except poll for when it's safe to delete ourselves return; // [/SL:KB] @@ -689,7 +681,7 @@ void LLWearableHoldingPattern::clearCOFLinksForMissingWearables() } } -// [SL:KB] - Patch: Appearance-COFCorruption | Checked: 2010-04-14 (Catznip-2.6.0a) | Added: Catznip-2.0.0a +// [SL:KB] - Patch: Appearance-COFCorruption | Checked: 2010-04-14 (Catznip-3.0.0a) | Added: Catznip-2.0.0a bool LLWearableHoldingPattern::pollStopped() { // We have to keep on polling until we're sure that all callbacks have completed or they'll cause a crash @@ -708,7 +700,7 @@ bool LLWearableHoldingPattern::pollMissingWearables() { llwarns << "skipping because LLWearableHolding pattern is invalid (superceded by later outfit request)" << llendl; -// [SL:KB] - Patch: Appearance-COFCorruption | Checked: 2010-04-14 (Catznip-2.5.0a) | Added: Catznip-2.0.0a +// [SL:KB] - Patch: Appearance-COFCorruption | Checked: 2010-04-14 (Catznip-3.0.0a) | Added: Catznip-2.0.0a // If we were signalled to stop then we shouldn't do anything else except poll for when it's safe to delete ourselves doOnIdleRepeating(boost::bind(&LLWearableHoldingPattern::pollStopped, this)); return true; @@ -1346,7 +1338,7 @@ bool LLAppearanceMgr::getCanReplaceCOF(const LLUUID& outfit_cat_id) // Check whether it's the base outfit. // if (outfit_cat_id.isNull() || outfit_cat_id == getBaseOutfitUUID()) -// [SL:KB] - Patch: Appearance-Misc | Checked: 2010-09-21 (Catznip-2.6.0a) | Added: Catznip-2.1.2d +// [SL:KB] - Patch: Appearance-Misc | Checked: 2010-09-21 (Catznip-3.0.0a) | Added: Catznip-2.1.2d if ( (outfit_cat_id.isNull()) || ((outfit_cat_id == getBaseOutfitUUID()) && (!isOutfitDirty())) ) // [/SL:KB] { @@ -1422,7 +1414,7 @@ void LLAppearanceMgr::filterWearableItems( if (size <= 0) continue; // S32 start_index = llmax(0,size-max_per_type); -// [SL:KB] - Patch: Appearance-Misc | Checked: 2010-05-11 (Catznip-2.6.0a) | Added: Catznip-2.0.0h +// [SL:KB] - Patch: Appearance-Misc | Checked: 2010-05-11 (Catznip-3.0.0a) | Added: Catznip-2.0.0h S32 start_index = llmax(0, size - ((LLAssetType::AT_BODYPART == LLWearableType::getAssetType((LLWearableType::EType)i)) ? 1 : max_per_type)); // [/SL:KB[ @@ -1753,7 +1745,7 @@ void LLAppearanceMgr::updateAppearanceFromCOF(bool update_base_outfit_ordering) remove_non_link_items(wear_items); remove_non_link_items(obj_items); remove_non_link_items(gest_items); -// [SL:KB] - Patch: Apperance-Misc | Checked: 2010-11-24 (Catznip-2.6.0a) | Added: Catzip-2.4.0f +// [SL:KB] - Patch: Apperance-Misc | Checked: 2010-11-24 (Catznip-3.0.0a) | Added: Catzip-2.4.0f // Since we're following folder links we might have picked up new duplicates, or exceeded MAX_CLOTHING_PER_TYPE removeDuplicateItems(wear_items); removeDuplicateItems(obj_items); @@ -1764,7 +1756,7 @@ void LLAppearanceMgr::updateAppearanceFromCOF(bool update_base_outfit_ordering) dumpItemArray(wear_items,"asset_dump: wear_item"); dumpItemArray(obj_items,"asset_dump: obj_item"); -// [SL:KB] - Patch: Appearance-SyncAttach | Checked: 2010-09-22 (Catznip-2.6.0a) | Added: Catznip-2.2.0a +// [SL:KB] - Patch: Appearance-SyncAttach | Checked: 2010-09-22 (Catznip-3.0.0a) | Added: Catznip-2.2.0a // Update attachments to match those requested. if (isAgentAvatarValid()) { @@ -2616,7 +2608,7 @@ void LLAppearanceMgr::removeItemFromAvatar(const LLUUID& id_to_remove) // //*TODO move here the exact removing code from LLWearableBridge::removeItemFromAvatar in the future // LLWearableBridge::removeItemFromAvatar(item_to_remove); // } -// [SL:KB] - Patch: Appearance-RemoveWearableFromAvatar | Checked: 2010-08-13 (Catznip-2.6.0a) | Added: Catznip-2.1.1d +// [SL:KB] - Patch: Appearance-RemoveWearableFromAvatar | Checked: 2010-08-13 (Catznip-3.0.0a) | Added: Catznip-2.1.1d { const LLWearable* pWearable = gAgentWearables.getWearableFromItemID(item_to_remove->getLinkedUUID()); if ( (pWearable) && (LLAssetType::AT_BODYPART != pWearable->getAssetType()) ) @@ -2777,7 +2769,7 @@ void LLAppearanceMgr::setAttachmentInvLinkEnable(bool val) { llinfos << "setAttachmentInvLinkEnable => " << (int) val << llendl; mAttachmentInvLinkEnabled = val; -// [SL:KB] - Patch: Appearance-SyncAttach | Checked: 2010-10-05 (Catznip-2.6.0a) | Added: Catznip-2.2.0a +// [SL:KB] - Patch: Appearance-SyncAttach | Checked: 2010-10-05 (Catznip-3.0.0a) | Added: Catznip-2.2.0a if (mAttachmentInvLinkEnabled) { linkPendingAttachments(); @@ -2805,7 +2797,7 @@ void dumpAttachmentSet(const std::set& atts, const std::string& msg) void LLAppearanceMgr::registerAttachment(const LLUUID& item_id) { gInventory.addChangedMask(LLInventoryObserver::LABEL, item_id); -// [SL:KB] - Patch: Appearance-SyncAttach | Checked: 2010-10-05 (Catznip-2.6.0a) | Added: Catznip-2.2.0a +// [SL:KB] - Patch: Appearance-SyncAttach | Checked: 2010-10-05 (Catznip-3.0.0a) | Added: Catznip-2.2.0a if (isLinkInCOF(item_id)) { return; @@ -2819,7 +2811,7 @@ void LLAppearanceMgr::registerAttachment(const LLUUID& item_id) // it will trigger gAgentWariables.notifyLoadingFinished() // But it is not acceptable solution. See EXT-7777 // LLAppearanceMgr::addCOFItemLink(item_id, false); // Add COF link for item. -// [SL:KB] - Patch: Appearance-SyncAttach | Checked: 2010-10-05 (Catznip-2.6.0a) | Modified: Catznip-2.2.0a +// [SL:KB] - Patch: Appearance-SyncAttach | Checked: 2010-10-05 (Catznip-3.0.0a) | Modified: Catznip-2.2.0a LLPointer cb = new LLRegisterAttachmentCallback(); LLAppearanceMgr::addCOFItemLink(item_id, false, cb); // Add COF link for item. // [/SL:KB] @@ -2833,7 +2825,7 @@ void LLAppearanceMgr::registerAttachment(const LLUUID& item_id) void LLAppearanceMgr::unregisterAttachment(const LLUUID& item_id) { gInventory.addChangedMask(LLInventoryObserver::LABEL, item_id); -// [SL:KB] - Patch: Appearance-SyncAttach | Checked: 2010-10-05 (Catznip-2.6.0a) | Added: Catznip-2.2.0a +// [SL:KB] - Patch: Appearance-SyncAttach | Checked: 2010-10-05 (Catznip-3.0.0a) | Added: Catznip-2.2.0a uuid_vec_t::iterator itPendingAttachLink = std::find(mPendingAttachLinks.begin(), mPendingAttachLinks.end(), item_id); if (itPendingAttachLink != mPendingAttachLinks.end()) { @@ -2851,7 +2843,7 @@ void LLAppearanceMgr::unregisterAttachment(const LLUUID& item_id) } } -// [SL:KB] - Patch: Appearance-SyncAttach | Checked: 2010-09-18 (Catznip-2.6.0a) | Modified: Catznip-2.2.0a +// [SL:KB] - Patch: Appearance-SyncAttach | Checked: 2010-09-18 (Catznip-3.0.0a) | Modified: Catznip-2.2.0a void LLAppearanceMgr::linkPendingAttachments() { LLPointer cb = NULL; diff --git a/indra/newview/llappearancemgr.h b/indra/newview/llappearancemgr.h index 2df2d7c07b..c239d8e15c 100644 --- a/indra/newview/llappearancemgr.h +++ b/indra/newview/llappearancemgr.h @@ -217,7 +217,7 @@ private: std::auto_ptr mUnlockOutfitTimer; -// [SL:KB] - Patch: Appearance-SyncAttach | Checked: 2010-09-18 (Catznip-2.6.0a) | Modified: Catznip-2.1.2e +// [SL:KB] - Patch: Appearance-SyncAttach | Checked: 2010-09-18 (Catznip-3.0.0a) | Modified: Catznip-2.1.2e public: void linkPendingAttachments(); void onRegisterAttachmentComplete(const LLUUID& idItem); @@ -251,13 +251,10 @@ private: bool mUpdateBaseOrder; }; -// [SL:KB] - Patch: Appearance-SyncAttach | Checked: 2010-08-31 (Catznip-2.6.0a) | Added: Catznip-2.1.2a +// [SL:KB] - Patch: Appearance-SyncAttach | Checked: 2010-08-31 (Catznip-3.0.0a) | Added: Catznip-2.1.2a class LLRegisterAttachmentCallback : public LLInventoryCallback { public: - LLRegisterAttachmentCallback() {} - /*virtual*/ ~LLRegisterAttachmentCallback() {} - /*virtual*/ void fire(const LLUUID& idItem) { LLAppearanceMgr::instance().onRegisterAttachmentComplete(idItem); diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index 67f6d88bc1..a62069274c 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -2499,7 +2499,7 @@ void LLFolderBridge::folderOptionsMenu() // BAP change once we're no longer treating regular categories as ensembles. const bool is_ensemble = (type == LLFolderType::FT_NONE || LLFolderType::lookupIsEnsembleType(type)); -// [SL:KB] - Patch: Appearance-Misc | Checked: 2010-11-24 (Catznip-2.6.0a) | Added: Catznip-2.4.0e +// [SL:KB] - Patch: Appearance-Misc | Checked: 2010-11-24 (Catznip-3.0.0a) | Added: Catznip-2.4.0e const bool is_outfit = (type == LLFolderType::FT_OUTFIT); // [/SL:KB] @@ -2561,7 +2561,7 @@ void LLFolderBridge::folderOptionsMenu() mDisabledItems.push_back(std::string("Remove From Outfit")); } // if (!LLAppearanceMgr::instance().getCanReplaceCOF(mUUID)) -// [SL:KB] - Patch: Appearance-Misc | Checked: 2010-11-24 (Catznip-2.6.0a) | Added: Catznip-2.4.0e +// [SL:KB] - Patch: Appearance-Misc | Checked: 2010-11-24 (Catznip-3.0.0a) | Added: Catznip-2.4.0e if ( ((is_outfit) && (!LLAppearanceMgr::instance().getCanReplaceCOF(mUUID))) || ((!is_outfit) && (gAgentWearables.isCOFChangeInProgress())) ) // [/SL:KB] @@ -4491,14 +4491,14 @@ void remove_inventory_category_from_avatar( LLInventoryCategory* category ) remove_inventory_category_from_avatar_step2(TRUE, category->getUUID() ); } -struct OnRemoveStruct -{ - LLUUID mUUID; - OnRemoveStruct(const LLUUID& uuid): - mUUID(uuid) - { - } -}; +//struct OnRemoveStruct +//{ +// LLUUID mUUID; +// OnRemoveStruct(const LLUUID& uuid): +// mUUID(uuid) +// { +// } +//}; void remove_inventory_category_from_avatar_step2( BOOL proceed, LLUUID category_id) { @@ -4556,7 +4556,7 @@ void remove_inventory_category_from_avatar_step2( BOOL proceed, LLUUID category_ // item->getType(), // LLWearableBridge::onRemoveFromAvatarArrived, // new OnRemoveStruct(item->getLinkedUUID())); -// [SL:KB] - Patch: Appearance-RemoveWearableFromAvatar | Checked: 2010-08-13 (Catznip-2.6.0a) | Added: Catznip-2.1.1d +// [SL:KB] - Patch: Appearance-RemoveWearableFromAvatar | Checked: 2010-08-13 (Catznip-3.0.0a) | Added: Catznip-2.1.1d LLAppearanceMgr::instance().removeItemFromAvatar(item->getUUID()); // [/SL:KB] } @@ -4963,7 +4963,7 @@ void LLWearableBridge::removeItemFromAvatar(LLViewerInventoryItem *item) // item->getType(), // LLWearableBridge::onRemoveFromAvatarArrived, // new OnRemoveStruct(item->getUUID())); -// [SL:KB] - Patch: Appearance-RemoveWearableFromAvatar | Checked: 2010-08-13 (Catznip-2.6.0a) | Added: Catznip-2.1.1d +// [SL:KB] - Patch: Appearance-RemoveWearableFromAvatar | Checked: 2010-08-13 (Catznip-3.0.0a) | Added: Catznip-2.1.1d LLAppearanceMgr::instance().removeItemFromAvatar(item->getUUID()); // [/SL:KB] } diff --git a/indra/newview/lltooldraganddrop.cpp b/indra/newview/lltooldraganddrop.cpp index 06a81f6f94..fe71ef371c 100644 --- a/indra/newview/lltooldraganddrop.cpp +++ b/indra/newview/lltooldraganddrop.cpp @@ -1657,7 +1657,7 @@ EAcceptance LLToolDragAndDrop::dad3dRezAttachmentFromInv( if(mSource == SOURCE_LIBRARY) { // LLPointer cb = new RezAttachmentCallback(0); -// [SL:KB] - Patch: Appearance-Misc | Checked: 2010-09-28 (Catznip-2.6.0a) | Added: Catznip-2.2.0a +// [SL:KB] - Patch: Appearance-DnDWear | Checked: 2010-09-28 (Catznip-3.0.0a) | Added: Catznip-2.2.0a // Make this behave consistent with dad3dWearItem LLPointer cb = new RezAttachmentCallback(0, !(mask & MASK_CONTROL)); // [/SL:KB] @@ -1672,7 +1672,7 @@ EAcceptance LLToolDragAndDrop::dad3dRezAttachmentFromInv( else { // rez_attachment(item, 0); -// [SL:KB] - Patch: Appearance-Misc | Checked: 2010-09-28 (Catznip-2.6.0a) | Added: Catznip-2.2.0a +// [SL:KB] - Patch: Appearance-DnDWear | Checked: 2010-09-28 (Catznip-3.0.0a) | Added: Catznip-2.2.0a // Make this behave consistent with dad3dWearItem rez_attachment(item, 0, !(mask & MASK_CONTROL)); // [/SL:KB] diff --git a/indra/newview/llviewerinventory.cpp b/indra/newview/llviewerinventory.cpp index 2a1ae1a269..ba7419d2a1 100644 --- a/indra/newview/llviewerinventory.cpp +++ b/indra/newview/llviewerinventory.cpp @@ -985,7 +985,7 @@ void ModifiedCOFCallback::fire(const LLUUID& inv_item) } //RezAttachmentCallback::RezAttachmentCallback(LLViewerJointAttachment *attachmentp) -// [SL:KB] - Patch: Appearance-Misc | Checked: 2010-09-28 (Catznip-2.6.0a) | Added: Catznip-2.2.0a +// [SL:KB] - Patch: Appearance-DnDWear | Checked: 2010-09-28 (Catznip-3.0.0a) | Added: Catznip-2.2.0a RezAttachmentCallback::RezAttachmentCallback(LLViewerJointAttachment *attachmentp, bool replace) : mAttach(attachmentp), mReplace(replace) // [/SL:KB] @@ -1005,7 +1005,7 @@ void RezAttachmentCallback::fire(const LLUUID& inv_item) if (item) { // rez_attachment(item, mAttach); -// [SL:KB] - Patch: Appearance-Misc | Checked: 2010-09-28 (Catznip-2.6.0a) | Added: Catznip-2.2.0a +// [SL:KB] - Patch: Appearance-DnDWear | Checked: 2010-09-28 (Catznip-3.0.0a) | Added: Catznip-2.2.0a rez_attachment(item, mAttach, mReplace); // [/SL:KB] } diff --git a/indra/newview/llviewerinventory.h b/indra/newview/llviewerinventory.h index 071cdb557c..45faca8d93 100644 --- a/indra/newview/llviewerinventory.h +++ b/indra/newview/llviewerinventory.h @@ -264,7 +264,7 @@ class RezAttachmentCallback : public LLInventoryCallback { public: // RezAttachmentCallback(LLViewerJointAttachment *attachmentp); -// [SL:KB] - Patch: Appearance-Misc | Checked: 2010-09-28 (Catznip-2.6.0a) | Added: Catznip-2.2.0a +// [SL:KB] - Patch: Appearance-DnDWear | Checked: 2010-09-28 (Catznip-3.0.0a) | Added: Catznip-2.2.0a RezAttachmentCallback(LLViewerJointAttachment *attachmentp, bool replace = false); // [/SL:KB] void fire(const LLUUID& inv_item); @@ -274,7 +274,7 @@ protected: private: LLViewerJointAttachment* mAttach; -// [SL:KB] - Patch: Appearance-Misc | Checked: 2010-09-28 (Catznip-2.6.0a) | Added: Catznip-2.2.0a +// [SL:KB] - Patch: Appearance-DnDWear | Checked: 2010-09-28 (Catznip-3.0.0a) | Added: Catznip-2.2.0a bool mReplace; // [/SL:KB] }; diff --git a/indra/newview/llviewerjointattachment.cpp b/indra/newview/llviewerjointattachment.cpp index 852a525caf..3004c717ef 100644 --- a/indra/newview/llviewerjointattachment.cpp +++ b/indra/newview/llviewerjointattachment.cpp @@ -169,7 +169,7 @@ BOOL LLViewerJointAttachment::addObject(LLViewerObject* object) // re-connect object to the joint correctly } -// [SL:KB] - Patch: Appearance-Misc | Checked: Catznip-2.6.0a (2011-01-13) | Added: Catznip-2.4.0h +// [SL:KB] - Patch: Appearance-Misc | Checked: Catznip-3.0.0a (2011-01-13) | Added: Catznip-2.4.0h // LLViewerJointAttachment::removeObject() sets the object's item to the NULL UUID so we need to extract it *after* the block above object->extractAttachmentItemID(); // [/SL:KB] diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index 4b4043d153..ba8a5224e5 100644 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -5962,7 +5962,7 @@ LLViewerJointAttachment* LLVOAvatar::getTargetAttachmentPoint(LLViewerObject* vi { llwarns << "Object attachment point invalid: " << attachmentID << llendl; // attachment = get_if_there(mAttachmentPoints, 1, (LLViewerJointAttachment*)NULL); // Arbitrary using 1 (chest) -// [SL:KB] - Patch: Appearance-LegacyMultiAttachment | Checked: 2010-08-28 (Catznip-2.6.0a) | Added: Catznip-2.1.2a +// [SL:KB] - Patch: Appearance-LegacyMultiAttachment | Checked: 2010-08-28 (Catznip-3.0.0a) | Added: Catznip-2.1.2a S32 idxAttachPt = 1; if ( (!isSelf()) && (gSavedSettings.getBOOL("LegacyMultiAttachmentSupport")) && (attachmentID > 38) && (attachmentID <= 68) ) idxAttachPt = attachmentID - 38; @@ -6487,7 +6487,7 @@ BOOL LLVOAvatar::isFullyLoaded() const // return TRUE; // else // return mFullyLoaded; -// [SL:KB] - Patch: Appearance-SyncAttach | Checked: 2010-09-22 (Catznip-2.6.0a) | Added: Catznip-2.2.0a +// [SL:KB] - Patch: Appearance-SyncAttach | Checked: 2010-09-22 (Catznip-3.0.0a) | Added: Catznip-2.2.0a // Changes to LLAppearanceMgr::updateAppearanceFromCOF() expect this function to actually return mFullyLoaded for gAgentAvatarp if ( (!isSelf()) && (gSavedSettings.getBOOL("RenderUnloadedAvatar")) ) return TRUE; diff --git a/indra/newview/llwearablelist.cpp b/indra/newview/llwearablelist.cpp index b2c7687f33..450e91fc16 100644 --- a/indra/newview/llwearablelist.cpp +++ b/indra/newview/llwearablelist.cpp @@ -96,7 +96,7 @@ void LLWearableList::processGetAssetReply( const char* filename, const LLAssetID BOOL isNewWearable = FALSE; LLWearableArrivedData* data = (LLWearableArrivedData*) userdata; // LLWearable* wearable = NULL; // NULL indicates failure -// [SL:KB] - Patch: Appearance-Misc | Checked: 2010-08-13 (Catznip-2.6.0a) | Added: Catznip-2.1.1d +// [SL:KB] - Patch: Appearance-Misc | Checked: 2010-08-13 (Catznip-3.0.0a) | Added: Catznip-2.1.1d LLWearable* wearable = get_if_there(LLWearableList::instance().mList, uuid, (LLWearable*)NULL); if (wearable) { From 41e4904261bd553e213be93b0dc9dbc6073d9111 Mon Sep 17 00:00:00 2001 From: Kitty Barnett Date: Mon, 14 Nov 2011 22:51:08 +0100 Subject: [PATCH 27/39] - changed : removed "legacy multi-attachment" support -> the new "neck" and "avatar center" attachment points use values from that old range --HG-- branch : Appearance-Misc --- indra/newview/app_settings/settings.xml | 11 ----------- indra/newview/llvoavatar.cpp | 8 +------- 2 files changed, 1 insertion(+), 18 deletions(-) diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 0849abe06e..9c055bdc5a 100755 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -4744,17 +4744,6 @@ Value 0 - LegacyMultiAttachmentSupport - - Comment - Converts legacy "secondary attachment points" to multi-attachments for other avatars - Persist - 1 - Type - Boolean - Value - 0 - LimitDragDistance Comment diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index bf8eb72970..1a2757521f 100644 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -5964,13 +5964,7 @@ LLViewerJointAttachment* LLVOAvatar::getTargetAttachmentPoint(LLViewerObject* vi if (!attachment) { llwarns << "Object attachment point invalid: " << attachmentID << llendl; -// attachment = get_if_there(mAttachmentPoints, 1, (LLViewerJointAttachment*)NULL); // Arbitrary using 1 (chest) -// [SL:KB] - Patch: Appearance-LegacyMultiAttachment | Checked: 2010-08-28 (Catznip-3.0.0a) | Added: Catznip-2.1.2a - S32 idxAttachPt = 1; - if ( (!isSelf()) && (gSavedSettings.getBOOL("LegacyMultiAttachmentSupport")) && (attachmentID > 38) && (attachmentID <= 68) ) - idxAttachPt = attachmentID - 38; - attachment = get_if_there(mAttachmentPoints, idxAttachPt, (LLViewerJointAttachment*)NULL); -// [/SL:KB] + attachment = get_if_there(mAttachmentPoints, 1, (LLViewerJointAttachment*)NULL); // Arbitrary using 1 (chest) } return attachment; From 73bec9d768e00f5d7d45c74b599201f016b7f785 Mon Sep 17 00:00:00 2001 From: Kitty Barnett Date: Sun, 29 May 2011 22:45:02 +0200 Subject: [PATCH 28/39] - fixed : "Add" shouldn't be enabled for WT_PHYSICS --HG-- branch : Appearance-Misc --- indra/newview/llwearabletype.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/indra/newview/llwearabletype.cpp b/indra/newview/llwearabletype.cpp index c090ab5c3d..8e0a869cca 100644 --- a/indra/newview/llwearabletype.cpp +++ b/indra/newview/llwearabletype.cpp @@ -80,7 +80,10 @@ LLWearableDictionary::LLWearableDictionary() addEntry(LLWearableType::WT_ALPHA, new WearableEntry("alpha", "New Alpha", LLAssetType::AT_CLOTHING, LLInventoryIcon::ICONNAME_CLOTHING_ALPHA, FALSE, TRUE)); addEntry(LLWearableType::WT_TATTOO, new WearableEntry("tattoo", "New Tattoo", LLAssetType::AT_CLOTHING, LLInventoryIcon::ICONNAME_CLOTHING_TATTOO, FALSE, TRUE)); - addEntry(LLWearableType::WT_PHYSICS, new WearableEntry("physics", "New Physics", LLAssetType::AT_CLOTHING, LLInventoryIcon::ICONNAME_CLOTHING_PHYSICS, TRUE, TRUE)); +// addEntry(LLWearableType::WT_PHYSICS, new WearableEntry("physics", "New Physics", LLAssetType::AT_CLOTHING, LLInventoryIcon::ICONNAME_CLOTHING_PHYSICS, TRUE, TRUE)); +// [SL:KB] - Patch: Appearance-Misc | Checked: 2011-05-29 (Catznip-3.2.0a) | Added: Catznip-2.6.0a + addEntry(LLWearableType::WT_PHYSICS, new WearableEntry("physics", "New Physics", LLAssetType::AT_CLOTHING, LLInventoryIcon::ICONNAME_CLOTHING_PHYSICS, TRUE, FALSE)); +// [/SL:KB] addEntry(LLWearableType::WT_INVALID, new WearableEntry("invalid", "Invalid Wearable", LLAssetType::AT_NONE, LLInventoryIcon::ICONNAME_NONE, FALSE, FALSE)); addEntry(LLWearableType::WT_NONE, new WearableEntry("none", "Invalid Wearable", LLAssetType::AT_NONE, LLInventoryIcon::ICONNAME_NONE, FALSE, FALSE)); From bdd663cebb87e046f4489ad14f4907514b6abe60 Mon Sep 17 00:00:00 2001 From: Kitty Barnett Date: Mon, 4 Feb 2013 20:09:37 +0100 Subject: [PATCH 29/39] - internal : reviewed Appearance-Misc patchset for viewer-sunshine --HG-- branch : Appearance-Misc --- .hgpatchinfo/Appearance-Misc.desc | 6 --- indra/llappearance/llwearabletype.cpp | 2 +- indra/newview/llagentwearables.cpp | 14 +++---- indra/newview/llagentwearables.h | 12 +++--- indra/newview/llappearancemgr.cpp | 47 +++++++++++++---------- indra/newview/llappearancemgr.h | 4 +- indra/newview/llinventorybridge.cpp | 10 +++-- indra/newview/lltooldraganddrop.cpp | 6 +-- indra/newview/llviewerattachmenu.cpp | 5 ++- indra/newview/llviewerinventory.cpp | 6 --- indra/newview/llviewerinventory.h | 1 - indra/newview/llviewerjointattachment.cpp | 2 +- indra/newview/llvoavatar.cpp | 2 +- indra/newview/llwearablelist.cpp | 10 ++++- 14 files changed, 67 insertions(+), 60 deletions(-) diff --git a/.hgpatchinfo/Appearance-Misc.desc b/.hgpatchinfo/Appearance-Misc.desc index 3ef1fb03d7..dbc5fa8cae 100644 --- a/.hgpatchinfo/Appearance-Misc.desc +++ b/.hgpatchinfo/Appearance-Misc.desc @@ -5,7 +5,6 @@ - fixed : attachments sometimes detach only to instantly get reattached after logon - fixed : Add to/Replace Outfit removes newly worn attachments on completion -> fix for http://jira.secondlife.com/browse/VWR-18512 -- fixed : LLWearableBridge::removeAllClothesFromAvatar() doesn't remove all clothing from the avatar - fixed : attachments that attach and then instantly detach don't have their COF link removed - fixed : multiple LLWearableHoldingPattern instances lead to "COF corruption" - fixed : get_is_item_worn() shouldn't make the assumption that items in COFs are always worn @@ -16,12 +15,7 @@ - fixed : LLViewerObject::getAttachmentItemID() sometimes returns the NULL UUID for the avatar's own attachments - fixed : LLAppearanceMgr::updateAppearanceFromCOF() doesn't properly filter items collected from folder links -> create an outfit with a folder link + "Replace Outfit" == wearables that exist in both COF and the linked folder will end up worn multiple times -- changed : deprecated removeItemFromAvatar() in favour of having LLAppearanceMgr::removeItemFromAvatar() handle it directly/correctly - -> wearables can't be worn/removed in 2.X without the viewer already having an LLWearable instance for it anyway - changed : enable "Replace Current Outfit" on the base outfit if it's marked dirty - changed : "RenderUnloadedAvatar" no longer affects the user's own avatar -> side-effect of the fix above due to the change to LLVOAvatar::isFullyLoaded() - added : InitialWearablesLoadedSignal signal which is emitted *once* when the initial wearables are loaded -- added : LegacyMultiAttachmentSupport debug setting to route "secondary attachment points" to the primary attachment point - -> maps secondary attachment point range [39,68] onto [1,30] - -> only dislays "secondary attachment points" correctly for *other* avatars (by design) diff --git a/indra/llappearance/llwearabletype.cpp b/indra/llappearance/llwearabletype.cpp index 29a19256b9..65afb0adde 100644 --- a/indra/llappearance/llwearabletype.cpp +++ b/indra/llappearance/llwearabletype.cpp @@ -93,7 +93,7 @@ LLWearableDictionary::LLWearableDictionary() addEntry(LLWearableType::WT_TATTOO, new WearableEntry("tattoo", "New Tattoo", LLAssetType::AT_CLOTHING, LLInventoryType::ICONNAME_CLOTHING_TATTOO, FALSE, TRUE)); // addEntry(LLWearableType::WT_PHYSICS, new WearableEntry("physics", "New Physics", LLAssetType::AT_CLOTHING, LLInventoryType::ICONNAME_CLOTHING_PHYSICS, TRUE, TRUE)); -// [SL:KB] - Patch: Appearance-Misc | Checked: 2011-05-29 (Catznip-3.2.0a) | Added: Catznip-2.6.0a +// [SL:KB] - Patch: Appearance-Misc | Checked: 2011-05-29 (Catznip-2.6) addEntry(LLWearableType::WT_PHYSICS, new WearableEntry("physics", "New Physics", LLAssetType::AT_CLOTHING, LLInventoryType::ICONNAME_CLOTHING_PHYSICS, TRUE, FALSE)); // [/SL:KB] diff --git a/indra/newview/llagentwearables.cpp b/indra/newview/llagentwearables.cpp index 99ea3582c7..ebc1fbf627 100755 --- a/indra/newview/llagentwearables.cpp +++ b/indra/newview/llagentwearables.cpp @@ -55,7 +55,7 @@ LLAgentWearables gAgentWearables; BOOL LLAgentWearables::mInitialWearablesUpdateReceived = FALSE; -// [SL:KB] - Patch: Appearance-InitialWearablesLoadedCallback | Checked: 2010-08-14 (Catznip-3.0.0a) | Added: Catznip-2.1.1d +// [SL:KB] - Patch: Appearance-InitialWearablesLoadedCallback | Checked: 2010-08-14 (Catznip-2.1) bool LLAgentWearables::mInitialWearablesLoaded = false; // [/SL:KB] @@ -1305,7 +1305,7 @@ void LLAgentWearables::setWearableOutfit(const LLInventoryItem::item_array_t& it // Start rendering & update the server mWearablesLoaded = TRUE; checkWearablesLoaded(); -// [SL:KB] - Patch: Appearance-InitialWearablesLoadedCallback | Checked: 2010-09-22 (Catznip-3.0.0a) | Modified: Catznip-2.2.0a +// [SL:KB] - Patch: Appearance-InitialWearablesLoadedCallback | Checked: 2010-09-22 (Catznip-2.2) if (!mInitialWearablesLoaded) { mInitialWearablesLoaded = true; @@ -1534,8 +1534,8 @@ void LLAgentWearables::userRemoveWearablesOfType(const LLWearableType::EType &ty // Combines userRemoveMulipleAttachments() and userAttachMultipleAttachments() logic to // get attachments into desired state with minimal number of adds/removes. //void LLAgentWearables::userUpdateAttachments(LLInventoryModel::item_array_t& obj_item_array) -// [SL:KB] - Patch: Appearance-SyncAttach | Checked: 2010-09-22 (Catznip-3.0.0a) | Added: Catznip-2.2.0a -void LLAgentWearables::userUpdateAttachments(LLInventoryModel::item_array_t& obj_item_array, bool fAttachOnly) +// [SL:KB] - Patch: Appearance-SyncAttach | Checked: 2010-09-22 (Catznip-2.2) +void LLAgentWearables::userUpdateAttachments(LLInventoryModel::item_array_t& obj_item_array, bool attach_only) // [/SL:KB] { // Possible cases: @@ -1602,8 +1602,8 @@ void LLAgentWearables::userUpdateAttachments(LLInventoryModel::item_array_t& obj // Remove everything in objects_to_remove // userRemoveMultipleAttachments(objects_to_remove); -// [SL:KB] - Patch: Appearance-SyncAttach | Checked: 2010-09-22 (Catznip-3.0.0a) | Added: Catznip-2.2.0a - if (!fAttachOnly) +// [SL:KB] - Patch: Appearance-SyncAttach | Checked: 2010-09-22 (Catznip-2.2) + if (!attach_only) { userRemoveMultipleAttachments(objects_to_remove); } @@ -1909,7 +1909,7 @@ bool LLAgentWearables::changeInProgress() const return mCOFChangeInProgress; } -// [SL:KB] - Patch: Appearance-InitialWearablesLoadedCallback | Checked: 2010-08-14 (Catznip-3.0.0a) | Added: Catznip-2.1.1d +// [SL:KB] - Patch: Appearance-InitialWearablesLoadedCallback | Checked: 2010-08-14 (Catznip-2.1) boost::signals2::connection LLAgentWearables::addInitialWearablesLoadedCallback(loaded_callback_t cb) { return mInitialWearablesLoadedSignal.connect(cb); diff --git a/indra/newview/llagentwearables.h b/indra/newview/llagentwearables.h index f6198aff5c..d883065739 100755 --- a/indra/newview/llagentwearables.h +++ b/indra/newview/llagentwearables.h @@ -76,7 +76,7 @@ public: BOOL isWearableCopyable(LLWearableType::EType type, U32 index /*= 0*/) const; BOOL areWearablesLoaded() const; -// [SL:KB] - Patch: Appearance-InitialWearablesLoadedCallback | Checked: 2010-08-14 (Catznip-3.0.0a) | Added: Catznip-2.1.1d +// [SL:KB] - Patch: Appearance-InitialWearablesLoadedCallback | Checked: 2010-08-14 (Catznip-2.1) bool areInitalWearablesLoaded() const { return mInitialWearablesLoaded; } // [/SL:KB] bool isCOFChangeInProgress() const { return mCOFChangeInProgress; } @@ -202,9 +202,9 @@ public: typedef std::vector llvo_vec_t; // static void userUpdateAttachments(LLInventoryModel::item_array_t& obj_item_array); -// [SL:KB] - Patch: Appearance-SyncAttach | Checked: 2010-09-22 (Catznip-3.0.0a) | Added: Catznip-2.2.0a +// [SL:KB] - Patch: Appearance-SyncAttach | Checked: 2010-09-22 (Catznip-2.2) // Not the best way to go about this but other attempts changed far too much LL code to be a viable solution - static void userUpdateAttachments(LLInventoryModel::item_array_t& obj_item_array, bool fAttachOnly = false); + static void userUpdateAttachments(LLInventoryModel::item_array_t& obj_item_array, bool attach_only = false); // [/SL:KB] static void userRemoveMultipleAttachments(llvo_vec_t& llvo_array); static void userAttachMultipleAttachments(LLInventoryModel::item_array_t& obj_item_array); @@ -223,7 +223,7 @@ public: typedef boost::function loaded_callback_t; typedef boost::signals2::signal loaded_signal_t; boost::signals2::connection addLoadedCallback(loaded_callback_t cb); -// [SL:KB] - Patch: Appearance-InitialWearablesLoadedCallback | Checked: 2010-08-14 (Catznip-3.0.0a) | Added: Catznip-2.1.1d +// [SL:KB] - Patch: Appearance-InitialWearablesLoadedCallback | Checked: 2010-08-14 (Catznip-2.1) boost::signals2::connection addInitialWearablesLoadedCallback(loaded_callback_t cb); // [/SL:KB] @@ -234,7 +234,7 @@ public: private: loading_started_signal_t mLoadingStartedSignal; // should be called before wearables are changed loaded_signal_t mLoadedSignal; // emitted when all agent wearables get loaded -// [SL:KB] - Patch: Appearance-InitialWearablesLoadedCallback | Checked: 2010-08-14 (Catznip-3.0.0a) | Added: Catznip-2.1.1d +// [SL:KB] - Patch: Appearance-InitialWearablesLoadedCallback | Checked: 2010-08-14 (Catznip-2.1) loaded_signal_t mInitialWearablesLoadedSignal; // emitted once when the initial wearables are loaded // [/SL:KB] @@ -243,7 +243,7 @@ private: //-------------------------------------------------------------------- private: static BOOL mInitialWearablesUpdateReceived; -// [SL:KB] - Patch: Appearance-InitialWearablesLoadedCallback | Checked: 2010-08-14 (Catznip-3.0.0a) | Added: Catznip-2.2.0a +// [SL:KB] - Patch: Appearance-InitialWearablesLoadedCallback | Checked: 2010-08-14 (Catznip-2.2) static bool mInitialWearablesLoaded; // [/SL:KB] BOOL mWearablesLoaded; diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp index a176ae5e0b..3ffd5bb7bf 100755 --- a/indra/newview/llappearancemgr.cpp +++ b/indra/newview/llappearancemgr.cpp @@ -560,7 +560,7 @@ public: void onWearableAssetFetch(LLViewerWearable *wearable); void onAllComplete(); -// [SL:KB] - Patch: Appearance-COFCorruption | Checked: 2010-04-14 (Catznip-3.0.0a) | Added: Catznip-2.0.0a +// [SL:KB] - Patch: Appearance-COFCorruption | Checked: 2010-04-14 (Catznip-2.0) bool pollStopped(); // [/SL:KB] @@ -647,7 +647,7 @@ void LLWearableHoldingPattern::eraseTypeToRecover(LLWearableType::EType type) mTypesToRecover.erase(type); } -// [SL:KB] - Patch: Appearance-SyncAttach | Checked: 2010-06-19 (Catznip-3.0.0a) | Added: Catznip-2.1.2a +// [SL:KB] - Patch: Appearance-SyncAttach | Checked: 2010-06-19 (Catznip-2.1) //void LLWearableHoldingPattern::setObjItems(const LLInventoryModel::item_array_t& items) //{ // mObjItems = items; @@ -757,7 +757,7 @@ void LLWearableHoldingPattern::onAllComplete() LL_INFOS("Avatar") << self_av_string() << "Updating agent wearables with " << mResolved << " wearable items " << LL_ENDL; LLAppearanceMgr::instance().updateAgentWearables(this, false); -// [SL:KB] - Patch: Appearance-SyncAttach | Checked: 2010-03-22 (Catznip-3.0.0a) | Added: Catznip-2.1.2a +// [SL:KB] - Patch: Appearance-SyncAttach | Checked: 2010-03-22 (Catznip-2.1) // // Update attachments to match those requested. // if (isAgentAvatarValid()) // { @@ -799,7 +799,7 @@ bool LLWearableHoldingPattern::pollFetchCompletion() // runway skip here? llwarns << self_av_string() << "skipping because LLWearableHolding pattern is invalid (superceded by later outfit request)" << llendl; -// [SL:KB] - Patch: Appearance-COFCorruption | Checked: 2010-04-14 (Catznip-3.0.0a) | Added: Catznip-2.0.0a +// [SL:KB] - Patch: Appearance-COFCorruption | Checked: 2010-04-14 (Catznip-2.0) // If we were signalled to stop then we shouldn't do anything else except poll for when it's safe to delete ourselves doOnIdleRepeating(boost::bind(&LLWearableHoldingPattern::pollStopped, this)); return true; @@ -875,9 +875,9 @@ void recovered_item_cb(const LLUUID& item_id, LLWearableType::EType type, LLView // runway skip here? llwarns << self_av_string() << "skipping because LLWearableHolding pattern is invalid (superceded by later outfit request)" << llendl; -// [SL:KB] - Patch: Appearance-COFCorruption | Checked: 2010-04-14 (Catznip-3.0.0a) | Added: Catznip-2.0.0a - // If we were signalled to stop then we shouldn't do anything else except poll for when it's safe to delete ourselves - return; +// [SL:KB] - Patch: Appearance-COFCorruption | Checked: 2010-04-14 (Catznip-2.0) + // If we were signalled to stop then we shouldn't do anything else except poll for when it's safe to delete ourselves + return; // [/SL:KB] } @@ -949,7 +949,7 @@ void LLWearableHoldingPattern::clearCOFLinksForMissingWearables() } } -// [SL:KB] - Patch: Appearance-COFCorruption | Checked: 2010-04-14 (Catznip-3.0.0a) | Added: Catznip-2.0.0a +// [SL:KB] - Patch: Appearance-COFCorruption | Checked: 2010-04-14 (Catznip-2.0) bool LLWearableHoldingPattern::pollStopped() { // We have to keep on polling until we're sure that all callbacks have completed or they'll cause a crash @@ -969,7 +969,7 @@ bool LLWearableHoldingPattern::pollMissingWearables() // runway skip here? llwarns << self_av_string() << "skipping because LLWearableHolding pattern is invalid (superceded by later outfit request)" << llendl; -// [SL:KB] - Patch: Appearance-COFCorruption | Checked: 2010-04-14 (Catznip-3.0.0a) | Added: Catznip-2.0.0a +// [SL:KB] - Patch: Appearance-COFCorruption | Checked: 2010-04-14 (Catznip-2.0) // If we were signalled to stop then we shouldn't do anything else except poll for when it's safe to delete ourselves doOnIdleRepeating(boost::bind(&LLWearableHoldingPattern::pollStopped, this)); return true; @@ -1635,7 +1635,7 @@ bool LLAppearanceMgr::getCanReplaceCOF(const LLUUID& outfit_cat_id) // Check whether it's the base outfit. // if (outfit_cat_id.isNull() || outfit_cat_id == getBaseOutfitUUID()) -// [SL:KB] - Patch: Appearance-Misc | Checked: 2010-09-21 (Catznip-3.0.0a) | Added: Catznip-2.1.2d +// [SL:KB] - Patch: Appearance-Misc | Checked: 2010-09-21 (Catznip-2.1) if ( (outfit_cat_id.isNull()) || ((outfit_cat_id == getBaseOutfitUUID()) && (!isOutfitDirty())) ) // [/SL:KB] { @@ -1711,9 +1711,8 @@ void LLAppearanceMgr::filterWearableItems( if (size <= 0) continue; // S32 start_index = llmax(0,size-max_per_type); -// [SL:KB] - Patch: Appearance-Misc | Checked: 2010-05-11 (Catznip-3.0.0a) | Added: Catznip-2.0.0h - S32 start_index = - llmax(0, size - ((LLAssetType::AT_BODYPART == LLWearableType::getAssetType((LLWearableType::EType)i)) ? 1 : max_per_type)); +// [SL:KB] - Patch: Appearance-Misc | Checked: 2010-05-11 (Catznip-2.0) + S32 start_index = llmax(0, size - ((LLAssetType::AT_BODYPART == LLWearableType::getAssetType((LLWearableType::EType)i)) ? 1 : max_per_type)); // [/SL:KB[ for (S32 j = start_index; j " << (int) val << llendl; mAttachmentInvLinkEnabled = val; -// [SL:KB] - Patch: Appearance-SyncAttach | Checked: 2010-10-05 (Catznip-3.0.0a) | Added: Catznip-2.2.0a +// [SL:KB] - Patch: Appearance-SyncAttach | Checked: 2010-10-05 (Catznip-2.2) if (mAttachmentInvLinkEnabled) { linkPendingAttachments(); @@ -3358,7 +3359,7 @@ void dumpAttachmentSet(const std::set& atts, const std::string& msg) void LLAppearanceMgr::registerAttachment(const LLUUID& item_id) { gInventory.addChangedMask(LLInventoryObserver::LABEL, item_id); -// [SL:KB] - Patch: Appearance-SyncAttach | Checked: 2010-10-05 (Catznip-3.0.0a) | Added: Catznip-2.2.0a +// [SL:KB] - Patch: Appearance-SyncAttach | Checked: 2010-10-05 (Catznip-2.2) if (isLinkInCOF(item_id)) { return; @@ -3372,7 +3373,7 @@ void LLAppearanceMgr::registerAttachment(const LLUUID& item_id) // it will trigger gAgentWariables.notifyLoadingFinished() // But it is not acceptable solution. See EXT-7777 // LLAppearanceMgr::addCOFItemLink(item_id, false); // Add COF link for item. -// [SL:KB] - Patch: Appearance-SyncAttach | Checked: 2010-10-05 (Catznip-3.0.0a) | Modified: Catznip-2.2.0a +// [SL:KB] - Patch: Appearance-SyncAttach | Checked: 2010-10-05 (Catznip-2.2) LLPointer cb = new LLRegisterAttachmentCallback(); LLAppearanceMgr::addCOFItemLink(item_id, false, cb); // Add COF link for item. // [/SL:KB] @@ -3386,7 +3387,7 @@ void LLAppearanceMgr::registerAttachment(const LLUUID& item_id) void LLAppearanceMgr::unregisterAttachment(const LLUUID& item_id) { gInventory.addChangedMask(LLInventoryObserver::LABEL, item_id); -// [SL:KB] - Patch: Appearance-SyncAttach | Checked: 2010-10-05 (Catznip-3.0.0a) | Added: Catznip-2.2.0a +// [SL:KB] - Patch: Appearance-SyncAttach | Checked: 2010-10-05 (Catznip-2.2) uuid_vec_t::iterator itPendingAttachLink = std::find(mPendingAttachLinks.begin(), mPendingAttachLinks.end(), item_id); if (itPendingAttachLink != mPendingAttachLinks.end()) { @@ -3404,7 +3405,7 @@ void LLAppearanceMgr::unregisterAttachment(const LLUUID& item_id) } } -// [SL:KB] - Patch: Appearance-SyncAttach | Checked: 2010-09-18 (Catznip-3.0.0a) | Modified: Catznip-2.2.0a +// [SL:KB] - Patch: Appearance-SyncAttach | Checked: 2010-09-18 (Catznip-2.2) void LLAppearanceMgr::linkPendingAttachments() { LLPointer cb = NULL; @@ -3415,7 +3416,9 @@ void LLAppearanceMgr::linkPendingAttachments() if ( (gAgentAvatarp->isWearingAttachment(idAttachItem)) && (!isLinkInCOF(idAttachItem)) ) { if (!cb) + { cb = new LLRegisterAttachmentCallback(); + } LLAppearanceMgr::addCOFItemLink(idAttachItem, false, cb); } } @@ -3428,11 +3431,15 @@ void LLAppearanceMgr::onRegisterAttachmentComplete(const LLUUID& idItem) // Remove the attachment from the pending list uuid_vec_t::iterator itPendingAttachLink = std::find(mPendingAttachLinks.begin(), mPendingAttachLinks.end(), idItemBase); if (itPendingAttachLink != mPendingAttachLinks.end()) + { mPendingAttachLinks.erase(itPendingAttachLink); + } // It may have been detached already in which case we should remove the COF link if ( (isAgentAvatarValid()) && (!gAgentAvatarp->isWearingAttachment(idItemBase)) ) + { removeCOFItemLinks(idItemBase); + } } // [/SL:KB] diff --git a/indra/newview/llappearancemgr.h b/indra/newview/llappearancemgr.h index c93733bd69..e223563916 100755 --- a/indra/newview/llappearancemgr.h +++ b/indra/newview/llappearancemgr.h @@ -224,7 +224,7 @@ private: std::auto_ptr mUnlockOutfitTimer; -// [SL:KB] - Patch: Appearance-SyncAttach | Checked: 2010-09-18 (Catznip-3.0.0a) | Modified: Catznip-2.1.2e +// [SL:KB] - Patch: Appearance-SyncAttach | Checked: 2010-09-18 (Catznip-2.1) public: void linkPendingAttachments(); void onRegisterAttachmentComplete(const LLUUID& idItem); @@ -258,7 +258,7 @@ private: bool mUpdateBaseOrder; }; -// [SL:KB] - Patch: Appearance-SyncAttach | Checked: 2010-08-31 (Catznip-3.0.0a) | Added: Catznip-2.1.2a +// [SL:KB] - Patch: Appearance-SyncAttach | Checked: 2010-08-31 (Catznip-2.1) class LLRegisterAttachmentCallback : public LLInventoryCallback { public: diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index 431f657af1..0804bfbcdb 100755 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -3348,7 +3348,7 @@ void LLFolderBridge::buildContextMenuFolderOptions(U32 flags) // BAP change once we're no longer treating regular categories as ensembles. const bool is_ensemble = (type == LLFolderType::FT_NONE || LLFolderType::lookupIsEnsembleType(type)); -// [SL:KB] - Patch: Appearance-Misc | Checked: 2010-11-24 (Catznip-3.0.0a) | Added: Catznip-2.4.0e +// [SL:KB] - Patch: Appearance-Misc | Checked: 2010-11-24 (Catznip-2.4) const bool is_outfit = (type == LLFolderType::FT_OUTFIT); // [/SL:KB] @@ -3410,7 +3410,7 @@ void LLFolderBridge::buildContextMenuFolderOptions(U32 flags) mDisabledItems.push_back(std::string("Remove From Outfit")); } // if (!LLAppearanceMgr::instance().getCanReplaceCOF(mUUID)) -// [SL:KB] - Patch: Appearance-Misc | Checked: 2010-11-24 (Catznip-3.0.0a) | Added: Catznip-2.4.0e +// [SL:KB] - Patch: Appearance-Misc | Checked: 2010-11-24 (Catznip-2.4) if ( ((is_outfit) && (!LLAppearanceMgr::instance().getCanReplaceCOF(mUUID))) || ((!is_outfit) && (gAgentWearables.isCOFChangeInProgress())) ) // [/SL:KB] @@ -5098,7 +5098,11 @@ void LLObjectBridge::performAction(LLInventoryModel* model, std::string action) else if(item && item->isFinished()) { // must be in library. copy it to our inventory and put it on. - LLPointer cb = new LLBoostFuncInventoryCallback(boost::bind(rez_attachment_cb, _1, (LLViewerJointAttachment*)0)); +// LLPointer cb = new LLBoostFuncInventoryCallback(boost::bind(rez_attachment_cb, _1, (LLViewerJointAttachment*)0)); +// [SL:KB] - Patch: Appearance-DnDWear | Checked: 2013-02-04 (Catznip-3.4) + // "Wear" from inventory replaces, so library items should too + LLPointer cb = new LLBoostFuncInventoryCallback(boost::bind(rez_attachment_cb, _1, (LLViewerJointAttachment*)0, true)); +// [/SL;KB] copy_inventory_item( gAgent.getID(), item->getPermissions().getOwner(), diff --git a/indra/newview/lltooldraganddrop.cpp b/indra/newview/lltooldraganddrop.cpp index 862d7d9ef5..1877460fbc 100644 --- a/indra/newview/lltooldraganddrop.cpp +++ b/indra/newview/lltooldraganddrop.cpp @@ -1710,9 +1710,9 @@ EAcceptance LLToolDragAndDrop::dad3dRezAttachmentFromInv( if(mSource == SOURCE_LIBRARY) { // LLPointer cb = new LLBoostFuncInventoryCallback(boost::bind(rez_attachment_cb, _1, (LLViewerJointAttachment*)0)); -// [SL:KB] - Patch: Appearance-DnDWear | Checked: 2010-09-28 (Catznip-3.0.0a) | Added: Catznip-2.2.0a +// [SL:KB] - Patch: Appearance-DnDWear | Checked: 2010-09-28 (Catznip-2.2) // Make this behave consistent with dad3dWearItem - LLPointer cb = new LLBoostFuncInventoryCallback(boost::bind(rez_attachment_cb, _1, (LLViewerJointAttachment*)0)); + LLPointer cb = new LLBoostFuncInventoryCallback(boost::bind(rez_attachment_cb, _1, (LLViewerJointAttachment*)0, !(mask & MASK_CONTROL))); // [/SL:KB] copy_inventory_item( gAgent.getID(), @@ -1725,7 +1725,7 @@ EAcceptance LLToolDragAndDrop::dad3dRezAttachmentFromInv( else { // rez_attachment(item, 0); -// [SL:KB] - Patch: Appearance-DnDWear | Checked: 2010-09-28 (Catznip-3.0.0a) | Added: Catznip-2.2.0a +// [SL:KB] - Patch: Appearance-DnDWear | Checked: 2010-09-28 (Catznip-2.2) // Make this behave consistent with dad3dWearItem rez_attachment(item, 0, !(mask & MASK_CONTROL)); // [/SL:KB] diff --git a/indra/newview/llviewerattachmenu.cpp b/indra/newview/llviewerattachmenu.cpp index 3975292ed3..2d015fc8c1 100644 --- a/indra/newview/llviewerattachmenu.cpp +++ b/indra/newview/llviewerattachmenu.cpp @@ -121,7 +121,10 @@ void LLViewerAttachMenu::attachObjects(const uuid_vec_t& items, const std::strin else if(item && item->isFinished()) { // must be in library. copy it to our inventory and put it on. - LLPointer cb = new LLBoostFuncInventoryCallback(boost::bind(rez_attachment_cb, _1, attachmentp)); +// LLPointer cb = new LLBoostFuncInventoryCallback(boost::bind(rez_attachment_cb, _1, attachmentp)); +// [SL:KB] - Patch: Appearance-DnDWear | Checked: 2013-02-04 (Catznip-3.4) + LLPointer cb = new LLBoostFuncInventoryCallback(boost::bind(rez_attachment_cb, _1, attachmentp, false)); +// [/SL;KB] copy_inventory_item(gAgent.getID(), item->getPermissions().getOwner(), item->getUUID(), diff --git a/indra/newview/llviewerinventory.cpp b/indra/newview/llviewerinventory.cpp index 5fff05fcc3..2891613d91 100755 --- a/indra/newview/llviewerinventory.cpp +++ b/indra/newview/llviewerinventory.cpp @@ -955,12 +955,6 @@ void LLInventoryCallbackManager::fire(U32 callback_id, const LLUUID& item_id) //void rez_attachment_cb(const LLUUID& inv_item, LLViewerJointAttachment *attachmentp) // [SL:KB] - Patch: Appearance-DnDWear | Checked: 2010-09-28 (Catznip-3.4) -void rez_attachment_cb(const LLUUID& inv_item, LLViewerJointAttachment *attachmentp) -{ - // Can't use default params for boost callbacks - rez_attachment_cb(inv_item, attachmentp, false); -} - void rez_attachment_cb(const LLUUID& inv_item, LLViewerJointAttachment *attachmentp, bool replace) // [/SL:KB] { diff --git a/indra/newview/llviewerinventory.h b/indra/newview/llviewerinventory.h index 22bf4a2902..f095d1d3ca 100755 --- a/indra/newview/llviewerinventory.h +++ b/indra/newview/llviewerinventory.h @@ -245,7 +245,6 @@ public: class LLViewerJointAttachment; // [SL:KB] - Patch: Appearance-DnDWear | Checked: 2010-09-28 (Catznip-3.4) -void rez_attachment_cb(const LLUUID& inv_item, LLViewerJointAttachment *attachmentp); void rez_attachment_cb(const LLUUID& inv_item, LLViewerJointAttachment *attachmentp, bool replace); // [/SL:KB] //void rez_attachment_cb(const LLUUID& inv_item, LLViewerJointAttachment *attachmentp); diff --git a/indra/newview/llviewerjointattachment.cpp b/indra/newview/llviewerjointattachment.cpp index 46ce4572a6..66a6912721 100644 --- a/indra/newview/llviewerjointattachment.cpp +++ b/indra/newview/llviewerjointattachment.cpp @@ -177,7 +177,7 @@ BOOL LLViewerJointAttachment::addObject(LLViewerObject* object) // re-connect object to the joint correctly } -// [SL:KB] - Patch: Appearance-Misc | Checked: Catznip-3.0.0a (2011-01-13) | Added: Catznip-2.4.0h +// [SL:KB] - Patch: Appearance-Misc | Checked: 2011-01-13 (Catznip-2.4) // LLViewerJointAttachment::removeObject() sets the object's item to the NULL UUID so we need to extract it *after* the block above object->extractAttachmentItemID(); // [/SL:KB] diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index 8367531c47..7461a71a7d 100755 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -5764,7 +5764,7 @@ BOOL LLVOAvatar::processFullyLoadedChange(bool loading) BOOL LLVOAvatar::isFullyLoaded() const { // return (mRenderUnloadedAvatar || mFullyLoaded); -// [SL:KB] - Patch: Appearance-SyncAttach | Checked: 2010-09-22 (Catznip-3.0.0a) | Added: Catznip-2.2.0a +// [SL:KB] - Patch: Appearance-SyncAttach | Checked: 2010-09-22 (Catznip-2.2) // Changes to LLAppearanceMgr::updateAppearanceFromCOF() expect this function to actually return mFullyLoaded for gAgentAvatarp return (mRenderUnloadedAvatar && !isSelf()) ||(mFullyLoaded); // [/SL:KB] diff --git a/indra/newview/llwearablelist.cpp b/indra/newview/llwearablelist.cpp index 06804a9536..4b77385f99 100755 --- a/indra/newview/llwearablelist.cpp +++ b/indra/newview/llwearablelist.cpp @@ -99,18 +99,24 @@ void LLWearableList::processGetAssetReply( const char* filename, const LLAssetID BOOL isNewWearable = FALSE; LLWearableArrivedData* data = (LLWearableArrivedData*) userdata; // LLViewerWearable* wearable = NULL; // NULL indicates failure -// [SL:KB] - Patch: Appearance-Misc | Checked: 2010-08-13 (Catznip-3.0.0a) | Added: Catznip-2.1.1d +// [SL:KB] - Patch: Appearance-Misc | Checked: 2010-08-13 (Catznip-2.1) LLViewerWearable* wearable = get_if_there(LLWearableList::instance().mList, uuid, (LLViewerWearable*)NULL); if (wearable) { + LL_DEBUGS("Wearable") << "processGetAssetReply()" << LL_ENDL; + LL_DEBUGS("Wearable") << wearable << LL_ENDL; + if(data->mCallback) + { data->mCallback(wearable, data->mUserdata); + } delete data; + return; } // [/SL:KB] LLAvatarAppearance *avatarp = data->mAvatarp; - + if( !filename ) { LL_WARNS("Wearable") << "Bad Wearable Asset: missing file." << LL_ENDL; From 0584b3689a3084453a4960a011fcb8c4be33b84b Mon Sep 17 00:00:00 2001 From: Kitty Barnett Date: Sun, 1 Mar 2015 15:36:33 +0100 Subject: [PATCH 30/39] - fixed : attaching an attachment that instantly detaches leaves a COF item behind -> someone thought it would be a good idea for AISCommand::getResponseUUID() to return false so we no longer have access to the newly created item UUID -> as a result LLRegisterAttachmentCallback::fire() is passed a NULL UUID which messes everything up -> see "[Appearance/Misc] - Attach/Detach" scripted test for repro --HG-- branch : Appearance-Misc --- indra/newview/llappearancemgr.cpp | 16 ++++++---------- indra/newview/llappearancemgr.h | 10 +++++++--- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp index ee8ee65846..1bad2a2dc1 100755 --- a/indra/newview/llappearancemgr.cpp +++ b/indra/newview/llappearancemgr.cpp @@ -3932,7 +3932,7 @@ void LLAppearanceMgr::registerAttachment(const LLUUID& item_id) if (!isLinkedInCOF(item_id)) { // [SL:KB] - Patch: Appearance-SyncAttach | Checked: 2010-10-05 (Catznip-2.2) - LLPointer cb = new LLRegisterAttachmentCallback(); + LLPointer cb = new LLRegisterAttachmentCallback(item_id); LLAppearanceMgr::addCOFItemLink(item_id, cb); // Add COF link for item. // [/SL:KB] // LLPointer cb = new LLUpdateAppearanceOnDestroy(); @@ -3976,29 +3976,25 @@ void LLAppearanceMgr::linkPendingAttachments() if ( (gAgentAvatarp->isWearingAttachment(idAttachItem)) && (!isLinkInCOF(idAttachItem)) ) { if (!cb) - { - cb = new LLRegisterAttachmentCallback(); - } + cb = new LLRegisterAttachmentCallback(idAttachItem); LLAppearanceMgr::addCOFItemLink(idAttachItem, cb); } } } -void LLAppearanceMgr::onRegisterAttachmentComplete(const LLUUID& idItem) +void LLAppearanceMgr::onRegisterAttachmentComplete(const LLUUID& idAttachItem) { - const LLUUID& idItemBase = gInventory.getLinkedItemID(idItem); - // Remove the attachment from the pending list - uuid_vec_t::iterator itPendingAttachLink = std::find(mPendingAttachLinks.begin(), mPendingAttachLinks.end(), idItemBase); + uuid_vec_t::iterator itPendingAttachLink = std::find(mPendingAttachLinks.begin(), mPendingAttachLinks.end(), idAttachItem); if (itPendingAttachLink != mPendingAttachLinks.end()) { mPendingAttachLinks.erase(itPendingAttachLink); } // It may have been detached already in which case we should remove the COF link - if ( (isAgentAvatarValid()) && (!gAgentAvatarp->isWearingAttachment(idItemBase)) ) + if ( (isAgentAvatarValid()) && (!gAgentAvatarp->isWearingAttachment(idAttachItem)) ) { - removeCOFItemLinks(idItemBase); + removeCOFItemLinks(idAttachItem); } } // [/SL:KB] diff --git a/indra/newview/llappearancemgr.h b/indra/newview/llappearancemgr.h index 5b47d12d17..313ecdfbf7 100755 --- a/indra/newview/llappearancemgr.h +++ b/indra/newview/llappearancemgr.h @@ -271,7 +271,7 @@ private: // [SL:KB] - Patch: Appearance-SyncAttach | Checked: 2010-09-18 (Catznip-2.1) public: void linkPendingAttachments(); - void onRegisterAttachmentComplete(const LLUUID& idItem); + void onRegisterAttachmentComplete(const LLUUID& idAttachItem); private: uuid_vec_t mPendingAttachLinks; // [/SL:KB] @@ -310,10 +310,14 @@ private: class LLRegisterAttachmentCallback : public LLInventoryCallback { public: - /*virtual*/ void fire(const LLUUID& idItem) + LLRegisterAttachmentCallback(const LLUUID& idAttachItem) : m_idAttachItem(idAttachItem) {} + /*virtual*/ void fire(const LLUUID&) { - LLAppearanceMgr::instance().onRegisterAttachmentComplete(idItem); + // NOTE: AISCommand::getResponseUUID() currently returns false so the passed UUID is NULL and hence useless + LLAppearanceMgr::instance().onRegisterAttachmentComplete(m_idAttachItem); } +protected: + LLUUID m_idAttachItem; }; // [/SL:KB] From 970009a7775a2a61c8025cd2cb3687e4ba2c0488 Mon Sep 17 00:00:00 2001 From: Kitty Barnett Date: Tue, 12 Feb 2013 19:01:58 +0100 Subject: [PATCH 31/39] - fixed : LLAppearanceMgr::removeCOFItemLinks() is called for every worn attachment during log-off --HG-- branch : Appearance-Misc --- indra/newview/llappviewer.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 6dfb23fb3a..e8b6692472 100755 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -94,6 +94,9 @@ #include "llprogressview.h" #include "llvocache.h" #include "llvopartgroup.h" +// [SL:KB] - Patch: Appearance-Misc | Checked: 2013-02-12 (Catznip-3.4) +#include "llappearancemgr.h" +// [/SL:KB] #include "llweb.h" #include "llupdaterservice.h" #include "llfloatertexturefetchdebugger.h" @@ -5472,6 +5475,11 @@ void LLAppViewer::disconnectViewer() // close inventory interface, close all windows LLFloaterInventory::cleanup(); +// [SL:KB] - Patch: Appearance-Misc | Checked: 2013-02-12 (Catznip-3.4) + // Destroying all objects below will trigger attachment detaching code and attempt to remove the COF links for them + LLAppearanceMgr::instance().setAttachmentInvLinkEnable(false); +// [/SL:KB] + gAgentWearables.cleanup(); gAgentCamera.cleanup(); // Also writes cached agent settings to gSavedSettings From fe8236f6151ae530a63d39a24b705c3a8968dcea Mon Sep 17 00:00:00 2001 From: Kitty Barnett Date: Tue, 5 Aug 2014 20:12:54 +0200 Subject: [PATCH 32/39] - internal : reviewed Appearance-Misc for SSA v2/AIS --HG-- branch : Appearance-Misc --- .hgpatchinfo/Appearance-Misc.desc | 2 ++ indra/llappearance/llwearabletype.cpp | 2 +- indra/newview/llagentwearables.cpp | 4 ++-- indra/newview/llagentwearables.h | 2 +- indra/newview/llappearancemgr.cpp | 7 +++---- indra/newview/llappearancemgr.h | 1 + indra/newview/lltooldraganddrop.cpp | 2 +- indra/newview/llvoavatar.cpp | 2 +- 8 files changed, 12 insertions(+), 10 deletions(-) diff --git a/.hgpatchinfo/Appearance-Misc.desc b/.hgpatchinfo/Appearance-Misc.desc index dbc5fa8cae..551bffc46c 100644 --- a/.hgpatchinfo/Appearance-Misc.desc +++ b/.hgpatchinfo/Appearance-Misc.desc @@ -5,6 +5,8 @@ - fixed : attachments sometimes detach only to instantly get reattached after logon - fixed : Add to/Replace Outfit removes newly worn attachments on completion -> fix for http://jira.secondlife.com/browse/VWR-18512 +- fixed : "Replace Outfit" isn't available for non-outfit folders that don't contain a full set of body parts (eyes, hair base, skin and shape) + -> fix for http://jira.secondlife.com/browse/VWR-23972 - fixed : attachments that attach and then instantly detach don't have their COF link removed - fixed : multiple LLWearableHoldingPattern instances lead to "COF corruption" - fixed : get_is_item_worn() shouldn't make the assumption that items in COFs are always worn diff --git a/indra/llappearance/llwearabletype.cpp b/indra/llappearance/llwearabletype.cpp index 65afb0adde..d0023f59a7 100644 --- a/indra/llappearance/llwearabletype.cpp +++ b/indra/llappearance/llwearabletype.cpp @@ -92,10 +92,10 @@ LLWearableDictionary::LLWearableDictionary() addEntry(LLWearableType::WT_ALPHA, new WearableEntry("alpha", "New Alpha", LLAssetType::AT_CLOTHING, LLInventoryType::ICONNAME_CLOTHING_ALPHA, FALSE, TRUE)); addEntry(LLWearableType::WT_TATTOO, new WearableEntry("tattoo", "New Tattoo", LLAssetType::AT_CLOTHING, LLInventoryType::ICONNAME_CLOTHING_TATTOO, FALSE, TRUE)); -// addEntry(LLWearableType::WT_PHYSICS, new WearableEntry("physics", "New Physics", LLAssetType::AT_CLOTHING, LLInventoryType::ICONNAME_CLOTHING_PHYSICS, TRUE, TRUE)); // [SL:KB] - Patch: Appearance-Misc | Checked: 2011-05-29 (Catznip-2.6) addEntry(LLWearableType::WT_PHYSICS, new WearableEntry("physics", "New Physics", LLAssetType::AT_CLOTHING, LLInventoryType::ICONNAME_CLOTHING_PHYSICS, TRUE, FALSE)); // [/SL:KB] +// addEntry(LLWearableType::WT_PHYSICS, new WearableEntry("physics", "New Physics", LLAssetType::AT_CLOTHING, LLInventoryType::ICONNAME_CLOTHING_PHYSICS, TRUE, TRUE)); addEntry(LLWearableType::WT_INVALID, new WearableEntry("invalid", "Invalid Wearable", LLAssetType::AT_NONE, LLInventoryType::ICONNAME_NONE, FALSE, FALSE)); addEntry(LLWearableType::WT_NONE, new WearableEntry("none", "Invalid Wearable", LLAssetType::AT_NONE, LLInventoryType::ICONNAME_NONE, FALSE, FALSE)); diff --git a/indra/newview/llagentwearables.cpp b/indra/newview/llagentwearables.cpp index 407df35463..acb61eb482 100755 --- a/indra/newview/llagentwearables.cpp +++ b/indra/newview/llagentwearables.cpp @@ -1302,13 +1302,13 @@ void LLAgentWearables::userUpdateAttachments(LLInventoryModel::item_array_t& obj // LL_INFOS() << "remove " << remove_count << " add " << add_count << LL_ENDL; // Remove everything in objects_to_remove -// userRemoveMultipleAttachments(objects_to_remove); // [SL:KB] - Patch: Appearance-SyncAttach | Checked: 2010-09-22 (Catznip-2.2) if (!attach_only) { userRemoveMultipleAttachments(objects_to_remove); } // [/SL:KB] +// userRemoveMultipleAttachments(objects_to_remove); // Add everything in items_to_add userAttachMultipleAttachments(items_to_add); @@ -1565,7 +1565,7 @@ bool LLAgentWearables::changeInProgress() const } // [SL:KB] - Patch: Appearance-InitialWearablesLoadedCallback | Checked: 2010-08-14 (Catznip-2.1) -boost::signals2::connection LLAgentWearables::addInitialWearablesLoadedCallback(loaded_callback_t cb) +boost::signals2::connection LLAgentWearables::addInitialWearablesLoadedCallback(const loaded_callback_t& cb) { return mInitialWearablesLoadedSignal.connect(cb); } diff --git a/indra/newview/llagentwearables.h b/indra/newview/llagentwearables.h index ab1a490ed9..a574a5c309 100755 --- a/indra/newview/llagentwearables.h +++ b/indra/newview/llagentwearables.h @@ -201,7 +201,7 @@ public: typedef boost::signals2::signal loaded_signal_t; boost::signals2::connection addLoadedCallback(loaded_callback_t cb); // [SL:KB] - Patch: Appearance-InitialWearablesLoadedCallback | Checked: 2010-08-14 (Catznip-2.1) - boost::signals2::connection addInitialWearablesLoadedCallback(loaded_callback_t cb); + boost::signals2::connection addInitialWearablesLoadedCallback(const loaded_callback_t& cb); // [/SL:KB] bool changeInProgress() const; diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp index 9fae620b16..ee8ee65846 100755 --- a/indra/newview/llappearancemgr.cpp +++ b/indra/newview/llappearancemgr.cpp @@ -1794,7 +1794,7 @@ void LLAppearanceMgr::filterWearableItems( continue; // S32 start_index = llmax(0,size-max_per_type); // [SL:KB] - Patch: Appearance-Misc | Checked: 2010-05-11 (Catznip-2.0) - S32 start_index = llmax(0, size - ((LLAssetType::AT_BODYPART == LLWearableType::getAssetType((LLWearableType::EType)i)) ? 1 : max_per_type)); + S32 start_index = llmax(0, size - ((LLWearableType::getAllowMultiwear((LLWearableType::EType)i)) ? max_per_type : 1)); // [/SL:KB[ for (S32 j = start_index; j cb = NULL; - for (uuid_vec_t::const_iterator itPendingAttachLink = mPendingAttachLinks.begin(); - itPendingAttachLink != mPendingAttachLinks.end(); ++itPendingAttachLink) + LLPointer cb = NULL; + for (uuid_vec_t::const_iterator itPendingAttachLink = mPendingAttachLinks.begin(); itPendingAttachLink != mPendingAttachLinks.end(); ++itPendingAttachLink) { const LLUUID& idAttachItem = *itPendingAttachLink; if ( (gAgentAvatarp->isWearingAttachment(idAttachItem)) && (!isLinkInCOF(idAttachItem)) ) diff --git a/indra/newview/llappearancemgr.h b/indra/newview/llappearancemgr.h index 7168f8706b..5b47d12d17 100755 --- a/indra/newview/llappearancemgr.h +++ b/indra/newview/llappearancemgr.h @@ -321,6 +321,7 @@ class LLUpdateAppearanceAndEditWearableOnDestroy: public LLInventoryCallback { public: LLUpdateAppearanceAndEditWearableOnDestroy(const LLUUID& item_id); + /* virtual */ void fire(const LLUUID& item_id) {} ~LLUpdateAppearanceAndEditWearableOnDestroy(); diff --git a/indra/newview/lltooldraganddrop.cpp b/indra/newview/lltooldraganddrop.cpp index ba242a4460..3344167d70 100755 --- a/indra/newview/lltooldraganddrop.cpp +++ b/indra/newview/lltooldraganddrop.cpp @@ -1804,11 +1804,11 @@ EAcceptance LLToolDragAndDrop::dad3dRezAttachmentFromInv( } else { -// rez_attachment(item, 0); // [SL:KB] - Patch: Appearance-DnDWear | Checked: 2010-09-28 (Catznip-2.2) // Make this behave consistent with dad3dWearItem rez_attachment(item, 0, !(mask & MASK_CONTROL)); // [/SL:KB] +// rez_attachment(item, 0); } } return ACCEPT_YES_SINGLE; diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index 447249f185..f57c5a71f4 100755 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -6333,11 +6333,11 @@ BOOL LLVOAvatar::processFullyLoadedChange(bool loading) BOOL LLVOAvatar::isFullyLoaded() const { -// return (mRenderUnloadedAvatar || mFullyLoaded); // [SL:KB] - Patch: Appearance-SyncAttach | Checked: 2010-09-22 (Catznip-2.2) // Changes to LLAppearanceMgr::updateAppearanceFromCOF() expect this function to actually return mFullyLoaded for gAgentAvatarp return (mRenderUnloadedAvatar && !isSelf()) ||(mFullyLoaded); // [/SL:KB] +// return (mRenderUnloadedAvatar || mFullyLoaded); } bool LLVOAvatar::isTooComplex() const From dd5206e78762a238434b56199db648393e7d9b4e Mon Sep 17 00:00:00 2001 From: Kitty Barnett Date: Sun, 1 Mar 2015 17:12:04 +0100 Subject: [PATCH 33/39] - fixed : unlinked attachments that are linked to at log-in are undetachable -> LLRegisterAttachmentCallback::fire() no longer has the indiviual link's UUID so gets called with the same UUID for each created link --HG-- branch : Appearance-Misc --- indra/newview/llappearancemgr.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp index 1bad2a2dc1..363acf0374 100755 --- a/indra/newview/llappearancemgr.cpp +++ b/indra/newview/llappearancemgr.cpp @@ -3975,8 +3975,11 @@ void LLAppearanceMgr::linkPendingAttachments() const LLUUID& idAttachItem = *itPendingAttachLink; if ( (gAgentAvatarp->isWearingAttachment(idAttachItem)) && (!isLinkInCOF(idAttachItem)) ) { - if (!cb) - cb = new LLRegisterAttachmentCallback(idAttachItem); +// if (!cb) +// cb = new LLRegisterAttachmentCallback(idAttachItem); + // One LLInventoryCallback instance should handle multiple items but thanks to AIS we don't currently have access to the UUIDs of the new links + // so we need one instance per needed link - yay for progress + cb = new LLRegisterAttachmentCallback(idAttachItem); LLAppearanceMgr::addCOFItemLink(idAttachItem, cb); } } From ed95300241c8ea7573651aae64943734062ba7b5 Mon Sep 17 00:00:00 2001 From: Kitty Barnett Date: Sun, 1 Mar 2015 17:12:04 +0100 Subject: [PATCH 34/39] - internal : preventively remove attachments from the pending list to keep them from turning 'sticky' --HG-- branch : Appearance-Misc --- indra/newview/llappearancemgr.cpp | 23 +++++++++++++++-------- indra/newview/llappearancemgr.h | 1 + 2 files changed, 16 insertions(+), 8 deletions(-) diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp index 363acf0374..4dcecbc52d 100755 --- a/indra/newview/llappearancemgr.cpp +++ b/indra/newview/llappearancemgr.cpp @@ -3715,6 +3715,9 @@ void LLAppearanceMgr::removeItemsFromAvatar(const uuid_vec_t& ids_to_remove) const LLUUID& id_to_remove = *it; const LLUUID& linked_item_id = gInventory.getLinkedItemID(id_to_remove); removeCOFItemLinks(linked_item_id, cb); +// [SL:KB] - Patch: Appearance-SyncAttach | Checked: 2015-03-01 (Catznip-3.7) + clearPendingAttachment(linked_item_id); +// [/SL:KB] addDoomedTempAttachment(linked_item_id); } } @@ -3724,6 +3727,9 @@ void LLAppearanceMgr::removeItemFromAvatar(const LLUUID& id_to_remove) LLUUID linked_item_id = gInventory.getLinkedItemID(id_to_remove); LLPointer cb = new LLUpdateAppearanceOnDestroy; removeCOFItemLinks(linked_item_id, cb); +// [SL:KB] - Patch: Appearance-SyncAttach | Checked: 2015-03-01 (Catznip-3.7) + clearPendingAttachment(linked_item_id); +// [/SL:KB] addDoomedTempAttachment(linked_item_id); } @@ -3949,11 +3955,7 @@ void LLAppearanceMgr::unregisterAttachment(const LLUUID& item_id) { gInventory.addChangedMask(LLInventoryObserver::LABEL, item_id); // [SL:KB] - Patch: Appearance-SyncAttach | Checked: 2010-10-05 (Catznip-2.2) - uuid_vec_t::iterator itPendingAttachLink = std::find(mPendingAttachLinks.begin(), mPendingAttachLinks.end(), item_id); - if (itPendingAttachLink != mPendingAttachLinks.end()) - { - mPendingAttachLinks.erase(itPendingAttachLink); - } + clearPendingAttachment(item_id); // [/SL:KB] if (mAttachmentInvLinkEnabled) @@ -3985,14 +3987,19 @@ void LLAppearanceMgr::linkPendingAttachments() } } -void LLAppearanceMgr::onRegisterAttachmentComplete(const LLUUID& idAttachItem) +void LLAppearanceMgr::clearPendingAttachment(const LLUUID& idItem) { - // Remove the attachment from the pending list - uuid_vec_t::iterator itPendingAttachLink = std::find(mPendingAttachLinks.begin(), mPendingAttachLinks.end(), idAttachItem); + uuid_vec_t::iterator itPendingAttachLink = std::find(mPendingAttachLinks.begin(), mPendingAttachLinks.end(), idItem); if (itPendingAttachLink != mPendingAttachLinks.end()) { mPendingAttachLinks.erase(itPendingAttachLink); } +} + +void LLAppearanceMgr::onRegisterAttachmentComplete(const LLUUID& idAttachItem) +{ + // Remove the attachment from the pending list + clearPendingAttachment(idAttachItem); // It may have been detached already in which case we should remove the COF link if ( (isAgentAvatarValid()) && (!gAgentAvatarp->isWearingAttachment(idAttachItem)) ) diff --git a/indra/newview/llappearancemgr.h b/indra/newview/llappearancemgr.h index 313ecdfbf7..ef4afa8dd1 100755 --- a/indra/newview/llappearancemgr.h +++ b/indra/newview/llappearancemgr.h @@ -271,6 +271,7 @@ private: // [SL:KB] - Patch: Appearance-SyncAttach | Checked: 2010-09-18 (Catznip-2.1) public: void linkPendingAttachments(); + void clearPendingAttachment(const LLUUID& idItem); void onRegisterAttachmentComplete(const LLUUID& idAttachItem); private: uuid_vec_t mPendingAttachLinks; From 305ff4eb4aa9a6188bde6656d7b4bca24ba3e7b6 Mon Sep 17 00:00:00 2001 From: Kitty Barnett Date: Sun, 1 Mar 2015 23:07:52 +0200 Subject: [PATCH 35/39] - changed : LLAppearanceMgr::updateClothingOrderingInfo() doesn't require a round-trip to the inventory back-end -> apply the update locally in anticipation so we don't have to wait on a callback -> fixes renames on inventory items not updating until the callback occurs --HG-- branch : Appearance-Misc --- indra/newview/llappearancemgr.cpp | 18 ++++++++----- indra/newview/llviewerinventory.cpp | 40 +++++++++++++++++++++-------- 2 files changed, 41 insertions(+), 17 deletions(-) diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp index 4dcecbc52d..aef5c111ad 100755 --- a/indra/newview/llappearancemgr.cpp +++ b/indra/newview/llappearancemgr.cpp @@ -2118,14 +2118,18 @@ void LLAppearanceMgr::updateAppearanceFromCOF(bool enforce_item_restrictions, { //checking integrity of the COF in terms of ordering of wearables, //checking and updating links' descriptions of wearables in the COF (before analyzed for "dirty" state) +// [SL:KB] - Patch: Appearance-AISFilter | Checked: 2015-03-01 (Catznip-3.7) + // Ordering information is pre-applied locally so no reason to reason to wait on the inventory backend + updateClothingOrderingInfo(LLUUID::null); +// [/SL:KB] - // As with enforce_item_restrictions handling above, we want - // to wait for the update callbacks, then (finally!) call - // updateAppearanceFromCOF() with no additional COF munging needed. - LLPointer cb( - new LLUpdateAppearanceOnDestroy(false, false, post_update_func)); - updateClothingOrderingInfo(LLUUID::null, cb); - return; +// // As with enforce_item_restrictions handling above, we want +// // to wait for the update callbacks, then (finally!) call +// // updateAppearanceFromCOF() with no additional COF munging needed. +// LLPointer cb( +// new LLUpdateAppearanceOnDestroy(false, false, post_update_func)); +// updateClothingOrderingInfo(LLUUID::null, cb); +// return; } if (!validateClothingOrderingInfo()) diff --git a/indra/newview/llviewerinventory.cpp b/indra/newview/llviewerinventory.cpp index bfc28eec77..588fc4c3f9 100755 --- a/indra/newview/llviewerinventory.cpp +++ b/indra/newview/llviewerinventory.cpp @@ -1320,6 +1320,22 @@ void update_inventory_item( const LLSD& updates, LLPointer cb) { +// [SL:KB] - Patch: Appearance-AISFilter | Checked: 2015-03-01 (Catznip-3.7) + LLPointer obj = gInventory.getItem(item_id); + LL_DEBUGS("Inventory") << "item_id: [" << item_id << "] name " << (obj ? obj->getName() : "(NOT FOUND)") << LL_ENDL; + LLPointer new_item = NULL; + + if (obj) + { + new_item = new LLViewerInventoryItem(obj); + new_item->fromLLSD(updates,false); + + LLInventoryModel::LLCategoryUpdate up(new_item->getParentUUID(), 0); + gInventory.accountForUpdate(up); + gInventory.updateItem(new_item); + } +// [/SL:KB] + bool ais_ran = false; if (AISCommand::isAPIAvailable()) { @@ -1328,14 +1344,18 @@ void update_inventory_item( } if (!ais_ran) { - LLPointer obj = gInventory.getItem(item_id); - LL_DEBUGS("Inventory") << "item_id: [" << item_id << "] name " << (obj ? obj->getName() : "(NOT FOUND)") << LL_ENDL; - if(obj) - { - LLPointer new_item(new LLViewerInventoryItem); - new_item->copyViewerItem(obj); - new_item->fromLLSD(updates,false); +// LLPointer obj = gInventory.getItem(item_id); +// LL_DEBUGS("Inventory") << "item_id: [" << item_id << "] name " << (obj ? obj->getName() : "(NOT FOUND)") << LL_ENDL; +// if(obj) +// { +// LLPointer new_item(new LLViewerInventoryItem); +// new_item->copyViewerItem(obj); +// new_item->fromLLSD(updates,false); +// [SL:KB] - Patch: Appearance-AISFilter | Checked: 2015-03-01 (Catznip-3.7) + if (new_item) + { +// [/SL:KB] LLMessageSystem* msg = gMessageSystem; msg->newMessageFast(_PREHASH_UpdateInventoryItem); msg->nextBlockFast(_PREHASH_AgentData); @@ -1347,9 +1367,9 @@ void update_inventory_item( new_item->packMessage(msg); gAgent.sendReliableMessage(); - LLInventoryModel::LLCategoryUpdate up(new_item->getParentUUID(), 0); - gInventory.accountForUpdate(up); - gInventory.updateItem(new_item); +// LLInventoryModel::LLCategoryUpdate up(new_item->getParentUUID(), 0); +// gInventory.accountForUpdate(up); +// gInventory.updateItem(new_item); if (cb) { cb->fire(item_id); From 803d21dc44c905ddb50ffa31845871b8d1b6b4f7 Mon Sep 17 00:00:00 2001 From: Kitty Barnett Date: Sun, 1 Mar 2015 23:07:52 +0200 Subject: [PATCH 36/39] - fixed : AIS link creation and removal are much slower than legacy messages -> selectively fall back to legacy messages until the problem is fixed on the back-end -> use AIS for everything except CMD_ITEM_REMOVE and CMD_OBJ_LINK (singular) -> 0xFFFF & ~(CMD_ITEM_REMOVE | CMD_OBJ_LINK) = 0xFEEF (65263) --HG-- branch : Appearance-Misc --- indra/newview/app_settings/settings.xml | 11 +++++++ indra/newview/llaisapi.cpp | 18 +++++++++-- indra/newview/llaisapi.h | 19 +++++++++++- indra/newview/llviewerinventory.cpp | 40 ++++++++++++++++++++----- 4 files changed, 77 insertions(+), 11 deletions(-) diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 8d3a7327b9..80aea6c266 100755 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -93,6 +93,17 @@ Value 0 + AISCommandFilterMask + + Comment + AIS command filter (death by Kitty if you change this) + Persist + 1 + Type + U32 + Value + 65263 + AlertedUnsupportedHardware Comment diff --git a/indra/newview/llaisapi.cpp b/indra/newview/llaisapi.cpp index da66ea357a..a13300c1f4 100755 --- a/indra/newview/llaisapi.cpp +++ b/indra/newview/llaisapi.cpp @@ -32,6 +32,9 @@ #include "llcallbacklist.h" #include "llinventorymodel.h" #include "llsdutil.h" +// [SL:KB] - Patch: Appearance-AISFilter | Checked: 2015-03-01 (Catznip-3.7) +#include "llviewercontrol.h" +// [/SL:KB] #include "llviewerregion.h" #include "llinventoryobserver.h" @@ -120,11 +123,22 @@ void AISCommand::httpFailure() } //static -bool AISCommand::isAPIAvailable() +//bool AISCommand::isAPIAvailable() +// [SL:KB] - Patch: Appearance-AISFilter | Checked: 2015-03-01 (Catznip-3.7) +bool AISCommand::isAPIAvailable(EAISCommand cmd) +// [/SL:KB] { if (gAgent.getRegion()) { - return gAgent.getRegion()->isCapabilityAvailable("InventoryAPIv3"); +// [SL:KB] - Patch: Appearance-AISFilter | Checked: 2015-03-01 (Catznip-3.7) + static LLCachedControl COMMAND_FILTER_MASK(gSavedSettings, "AISCommandFilterMask", U32_MAX); + + bool aisAvailable = gAgent.getRegion()->isCapabilityAvailable("InventoryAPIv3"); + return + (aisAvailable) && + ( (CMD_UNKNOWN == cmd) || ((U32)cmd & COMMAND_FILTER_MASK) ); +// [/SL:KB] +// return gAgent.getRegion()->isCapabilityAvailable("InventoryAPIv3"); } return false; } diff --git a/indra/newview/llaisapi.h b/indra/newview/llaisapi.h index 5a2ec94af9..f1363f1b9e 100755 --- a/indra/newview/llaisapi.h +++ b/indra/newview/llaisapi.h @@ -57,7 +57,24 @@ public: /* virtual */ void httpSuccess(); /* virtual */ void httpFailure(); - static bool isAPIAvailable(); +// [SL:KB] - Patch: Appearance-AISFilter | Checked: 2015-03-01 (Catznip-3.7) + // The debug setting is an OR of these values + enum EAISCommand + { + CMD_UNKNOWN = 0x0000, // New or command we're not filtering for + CMD_CAT_UPDATE = 0x0001, // update_inventory_category + CMD_CAT_REMOVE = 0x0002, // remove_inventory_category + CMD_CAT_SLAM = 0x0004, // slam_inventory_folder + CMD_CAT_PURGE = 0x0008, // purge_descendents_of + CMD_ITEM_REMOVE = 0x0010, // remove_inventory_item + CMD_ITEM_UPDATE = 0x0020, // update_inventory_item + CMD_OBJ_LINK = 0x0100, // link_inventory_array + CMD_OBJ_LINKBATCH = 0x0200, // link_inventory_array + }; + static bool isAPIAvailable(EAISCommand cmd = CMD_UNKNOWN); +// [/SL:KB] + +// static bool isAPIAvailable(); static bool getInvCap(std::string& cap); static bool getLibCap(std::string& cap); static void getCapabilityNames(LLSD& capabilityNames); diff --git a/indra/newview/llviewerinventory.cpp b/indra/newview/llviewerinventory.cpp index 588fc4c3f9..5816ccaca6 100755 --- a/indra/newview/llviewerinventory.cpp +++ b/indra/newview/llviewerinventory.cpp @@ -1201,7 +1201,10 @@ void link_inventory_array(const LLUUID& category, } bool ais_ran = false; - if (AISCommand::isAPIAvailable()) +// if (AISCommand::isAPIAvailable()) +// [SL:KB] - Patch: Appearance-AISFilter | Checked: 2015-03-01 (Catznip-3.7) + if (AISCommand::isAPIAvailable( (baseobj_array.size() > 1) ? AISCommand::CMD_OBJ_LINKBATCH : AISCommand::CMD_OBJ_LINK )) +// [/SL:KB] { LLSD new_inventory = LLSD::emptyMap(); new_inventory["links"] = links; @@ -1267,7 +1270,10 @@ void update_inventory_item( { const LLUUID& item_id = update_item->getUUID(); bool ais_ran = false; - if (AISCommand::isAPIAvailable()) +// if (AISCommand::isAPIAvailable()) +// [SL:KB] - Patch: Appearance-AISFilter | Checked: 2015-03-01 (Catznip-3.7) + if (AISCommand::isAPIAvailable(AISCommand::CMD_ITEM_UPDATE)) +// [/SL:KB] { LLSD updates = update_item->asLLSD(); // Replace asset_id and/or shadow_id with transaction_id (hash_id) @@ -1337,7 +1343,10 @@ void update_inventory_item( // [/SL:KB] bool ais_ran = false; - if (AISCommand::isAPIAvailable()) +// if (AISCommand::isAPIAvailable()) +// [SL:KB] - Patch: Appearance-AISFilter | Checked: 2015-03-01 (Catznip-3.7) + if (AISCommand::isAPIAvailable(AISCommand::CMD_ITEM_UPDATE)) +// [/SL:KB] { LLPointer cmd_ptr = new UpdateItemCommand(item_id, updates, cb); ais_ran = cmd_ptr->run_command(); @@ -1396,7 +1405,10 @@ void update_inventory_category( LLPointer new_cat = new LLViewerInventoryCategory(obj); new_cat->fromLLSD(updates); // FIXME - restore this once the back-end work has been done. - if (AISCommand::isAPIAvailable()) +// if (AISCommand::isAPIAvailable()) +// [SL:KB] - Patch: Appearance-AISFilter | Checked: 2015-03-01 (Catznip-3.7) + if (AISCommand::isAPIAvailable(AISCommand::CMD_CAT_UPDATE)) +// [/SL:KB] { LLSD new_llsd = new_cat->asLLSD(); LLPointer cmd_ptr = new UpdateCategoryCommand(cat_id, new_llsd, cb); @@ -1459,7 +1471,10 @@ void remove_inventory_item( { const LLUUID item_id(obj->getUUID()); LL_DEBUGS("Inventory") << "item_id: [" << item_id << "] name " << obj->getName() << LL_ENDL; - if (AISCommand::isAPIAvailable()) +// if (AISCommand::isAPIAvailable()) +// [SL:KB] - Patch: Appearance-AISFilter | Checked: 2015-03-01 (Catznip-3.7) + if (AISCommand::isAPIAvailable(AISCommand::CMD_ITEM_REMOVE)) +// [/SL:KB] { LLPointer cmd_ptr = new RemoveItemCommand(item_id, cb); cmd_ptr->run_command(); @@ -1530,7 +1545,10 @@ void remove_inventory_category( LLNotificationsUtil::add("CannotRemoveProtectedCategories"); return; } - if (AISCommand::isAPIAvailable()) +// if (AISCommand::isAPIAvailable()) +// [SL:KB] - Patch: Appearance-AISFilter | Checked: 2015-03-01 (Catznip-3.7) + if (AISCommand::isAPIAvailable(AISCommand::CMD_CAT_REMOVE)) +// [/SL:KB] { LLPointer cmd_ptr = new RemoveCategoryCommand(cat_id, cb); cmd_ptr->run_command(); @@ -1633,7 +1651,10 @@ void purge_descendents_of(const LLUUID& id, LLPointer cb) } else { - if (AISCommand::isAPIAvailable()) +// if (AISCommand::isAPIAvailable()) +// [SL:KB] - Patch: Appearance-AISFilter | Checked: 2015-03-01 (Catznip-3.7) + if (AISCommand::isAPIAvailable(AISCommand::CMD_CAT_PURGE)) +// [/SL:KB] { LLPointer cmd_ptr = new PurgeDescendentsCommand(id, cb); cmd_ptr->run_command(); @@ -1767,7 +1788,10 @@ void slam_inventory_folder(const LLUUID& folder_id, const LLSD& contents, LLPointer cb) { - if (AISCommand::isAPIAvailable()) +// if (AISCommand::isAPIAvailable()) +// [SL:KB] - Patch: Appearance-AISFilter | Checked: 2015-03-01 (Catznip-3.7) + if (AISCommand::isAPIAvailable(AISCommand::CMD_CAT_SLAM)) +// [/SL:KB] { LL_DEBUGS("Avatar") << "using AISv3 to slam folder, id " << folder_id << " new contents: " << ll_pretty_print_sd(contents) << LL_ENDL; From 37f716723c772b0f5ff8349d2fa186753544e6ec Mon Sep 17 00:00:00 2001 From: Kitty Barnett Date: Sat, 2 May 2015 22:53:27 +0200 Subject: [PATCH 37/39] - changed : process COF item removals through AIS -> by pre-empting the delete locally we don't need to actually pass the LLUpdateAppearanceAndEditWearableOnDestroy callback to removeCOFItemLinks -> don't use AIS for item updates (it seems to recreate the item if it's been deleted in the meanwhile) -> 0xFFFF & ~(CMD_ITEM_UPDATE | CMD_OBJ_LINK) = 0xFEDF (65247) --HG-- branch : Appearance-Misc --- indra/newview/app_settings/settings.xml | 2 +- indra/newview/llappearancemgr.cpp | 20 +++++++++++++------- indra/newview/llappearancemgr.h | 5 ++++- 3 files changed, 18 insertions(+), 9 deletions(-) diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 1e1adb4402..d3b3162513 100755 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -102,7 +102,7 @@ Type U32 Value - 65263 + 65247 AlertedUnsupportedHardware diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp index 22d8cd15c7..c67b44a85c 100755 --- a/indra/newview/llappearancemgr.cpp +++ b/indra/newview/llappearancemgr.cpp @@ -1429,7 +1429,10 @@ bool LLAppearanceMgr::wearItemOnAvatar(const LLUUID& item_id_to_wear, { LLUUID item_id = gAgentWearables.getWearableItemID(item_to_wear->getWearableType(), wearable_count-1); - removeCOFItemLinks(item_id, cb); +// [SL:KB] - Patch: Appearance-AISFilter | Checked: 2015-05-02 (Catznip-3.7) + removeCOFItemLinks(item_id, NULL, true); +// [/SL:KB] +// removeCOFItemLinks(item_id, cb); } addCOFItemLink(item_to_wear, cb); @@ -2829,7 +2832,10 @@ void LLAppearanceMgr::removeAllAttachmentsFromAvatar() removeItemsFromAvatar(ids_to_remove); } -void LLAppearanceMgr::removeCOFItemLinks(const LLUUID& item_id, LLPointer cb) +//void LLAppearanceMgr::removeCOFItemLinks(const LLUUID& item_id, LLPointer cb) +// [SL:KB] - Patch: Appearance-AISFilter | Checked: 2015-05-02 (Catznip-3.7) +void LLAppearanceMgr::removeCOFItemLinks(const LLUUID& item_id, LLPointer cb, bool immediate_delete) +// [/SL:KB] { gInventory.addChangedMask(LLInventoryObserver::LABEL, item_id); @@ -2844,11 +2850,11 @@ void LLAppearanceMgr::removeCOFItemLinks(const LLUUID& item_id, LLPointergetIsLinkType() && item->getLinkedUUID() == item_id) { - bool immediate_delete = false; - if (item->getType() == LLAssetType::AT_OBJECT) - { - immediate_delete = true; - } +// bool immediate_delete = false; +// if (item->getType() == LLAssetType::AT_OBJECT) +// { +// immediate_delete = true; +// } remove_inventory_item(item->getUUID(), cb, immediate_delete); } } diff --git a/indra/newview/llappearancemgr.h b/indra/newview/llappearancemgr.h index ef4afa8dd1..7f96721062 100755 --- a/indra/newview/llappearancemgr.h +++ b/indra/newview/llappearancemgr.h @@ -149,7 +149,10 @@ public: bool isLinkedInCOF(const LLUUID& item_id); // Remove COF entries - void removeCOFItemLinks(const LLUUID& item_id, LLPointer cb = NULL); +// void removeCOFItemLinks(const LLUUID& item_id, LLPointer cb = NULL); +// [SL:KB] - Patch: Appearance-AISFilter | Checked: 2015-05-02 (Catznip-3.7) + void removeCOFItemLinks(const LLUUID& item_id, LLPointer cb = NULL, bool immediate_delete = false); +// [/SL:KB] void removeCOFLinksOfType(LLWearableType::EType type, LLPointer cb = NULL); void removeAllClothesFromAvatar(); void removeAllAttachmentsFromAvatar(); From d078024f4b9e4a6e66effb66aad7dd23be5d567e Mon Sep 17 00:00:00 2001 From: Kitty Barnett Date: Tue, 5 May 2015 23:36:39 +0200 Subject: [PATCH 38/39] - internal : added "callback" and "immediate_delete" parameters to LLAppearanceMgr::removeItemFromAvatar and LLAppearanceMgr::removeItemsFromAvatar -> used by RLVa --HG-- branch : Appearance-Misc --- indra/newview/llappearancemgr.cpp | 34 +++++++++++++++++++++++++------ indra/newview/llappearancemgr.h | 11 ++++++++-- 2 files changed, 37 insertions(+), 8 deletions(-) diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp index 22d8cd15c7..37a593a912 100755 --- a/indra/newview/llappearancemgr.cpp +++ b/indra/newview/llappearancemgr.cpp @@ -3803,19 +3803,31 @@ void LLAppearanceMgr::wearBaseOutfit() updateCOF(base_outfit_id); } -void LLAppearanceMgr::removeItemsFromAvatar(const uuid_vec_t& ids_to_remove) +//void LLAppearanceMgr::removeItemsFromAvatar(const uuid_vec_t& ids_to_remove) +// [SL:KB] - Patch: Appearance-Misc | Checked: 2015-05-05 (Catznip-3.7) +void LLAppearanceMgr::removeItemsFromAvatar(const uuid_vec_t& ids_to_remove, LLPointer cb /*= NULL*/, bool immediate_delete /*= false*/) +// [/SL:KB] { if (ids_to_remove.empty()) { LL_WARNS() << "called with empty list, nothing to do" << LL_ENDL; return; } - LLPointer cb = new LLUpdateAppearanceOnDestroy; +// LLPointer cb = new LLUpdateAppearanceOnDestroy; +// [SL:KB] - Patch: Appearance-Misc | Checked: 2015-05-05 (Catznip-3.7) + if (!cb) + { + cb = new LLUpdateAppearanceOnDestroy; + } +// [/SL:KB] for (uuid_vec_t::const_iterator it = ids_to_remove.begin(); it != ids_to_remove.end(); ++it) { const LLUUID& id_to_remove = *it; const LLUUID& linked_item_id = gInventory.getLinkedItemID(id_to_remove); - removeCOFItemLinks(linked_item_id, cb); +// [SL:KB] - Patch: Appearance-Misc | Checked: 2015-05-05 (Catznip-3.7) + removeCOFItemLinks(linked_item_id, cb, immediate_delete); +// [/SL:KB] +// removeCOFItemLinks(linked_item_id, cb); // [SL:KB] - Patch: Appearance-SyncAttach | Checked: 2015-03-01 (Catznip-3.7) clearPendingAttachment(linked_item_id); // [/SL:KB] @@ -3823,11 +3835,21 @@ void LLAppearanceMgr::removeItemsFromAvatar(const uuid_vec_t& ids_to_remove) } } -void LLAppearanceMgr::removeItemFromAvatar(const LLUUID& id_to_remove) +//void LLAppearanceMgr::removeItemFromAvatar(const LLUUID& id_to_remove) +// [SL:KB] - Patch: Appearance-Misc | Checked: 2015-05-05 (Catznip-3.7) +void LLAppearanceMgr::removeItemFromAvatar(const LLUUID& id_to_remove, LLPointer cb /*= NULL*/, bool immediate_delete /*= false*/) +// [/SL:KB] { LLUUID linked_item_id = gInventory.getLinkedItemID(id_to_remove); - LLPointer cb = new LLUpdateAppearanceOnDestroy; - removeCOFItemLinks(linked_item_id, cb); +// [SL:KB] - Patch: Appearance-Misc | Checked: 2015-05-05 (Catznip-3.7) + if (!cb) + { + cb = new LLUpdateAppearanceOnDestroy; + } + removeCOFItemLinks(linked_item_id, cb, immediate_delete); +// [/SL:KB] +// LLPointer cb = new LLUpdateAppearanceOnDestroy; +// removeCOFItemLinks(linked_item_id, cb); // [SL:KB] - Patch: Appearance-SyncAttach | Checked: 2015-03-01 (Catznip-3.7) clearPendingAttachment(linked_item_id); // [/SL:KB] diff --git a/indra/newview/llappearancemgr.h b/indra/newview/llappearancemgr.h index ef4afa8dd1..5e89abd1a3 100755 --- a/indra/newview/llappearancemgr.h +++ b/indra/newview/llappearancemgr.h @@ -182,8 +182,15 @@ public: bool updateBaseOutfit(); //Remove clothing or detach an object from the agent (a bodypart cannot be removed) - void removeItemsFromAvatar(const uuid_vec_t& item_ids); - void removeItemFromAvatar(const LLUUID& item_id); +// [SL:KB] - Patch: Appearance-Misc | Checked: 2015-05-05 (Catznip-3.7) + void removeItemFromAvatar(const LLUUID& id_to_remove) { removeItemFromAvatar(id_to_remove, NULL, false); } + void removeItemFromAvatar(const LLUUID& id_to_remove, LLPointer cb /*= NULL*/, bool immediate_delete /*= false*/); + + void removeItemsFromAvatar(const uuid_vec_t& ids_to_remove) { removeItemsFromAvatar(ids_to_remove, NULL, false); } + void removeItemsFromAvatar(const uuid_vec_t& ids_to_remove, LLPointer cb /*= NULL*/, bool immediate_delete /*= false*/); +// [/SL:KB] +// void removeItemsFromAvatar(const uuid_vec_t& item_ids); +// void removeItemFromAvatar(const LLUUID& item_id); void onOutfitFolderCreated(const LLUUID& folder_id, bool show_panel); From e2b6c9b5d2e8413ec531bc443c431c70ab726157 Mon Sep 17 00:00:00 2001 From: Kitty Barnett Date: Thu, 25 Jun 2015 01:03:20 +0200 Subject: [PATCH 39/39] - internal : partial backout of Appearance-SyncAttach to ease the big bird merge madness --HG-- branch : Appearance-Misc --- indra/newview/llappearancemgr.cpp | 91 +------------------------------ indra/newview/llappearancemgr.h | 24 -------- 2 files changed, 2 insertions(+), 113 deletions(-) diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp index 35c7ca99f1..458729f986 100755 --- a/indra/newview/llappearancemgr.cpp +++ b/indra/newview/llappearancemgr.cpp @@ -2332,26 +2332,6 @@ void LLAppearanceMgr::updateAppearanceFromCOF(bool enforce_item_restrictions, // Update attachments to match those requested. if (isAgentAvatarValid()) { - // Include attachments which should be in COF but don't have their link created yet - uuid_vec_t::iterator itPendingAttachLink = mPendingAttachLinks.begin(); - while (itPendingAttachLink != mPendingAttachLinks.end()) - { - const LLUUID& idItem = *itPendingAttachLink; - if ( (!gAgentAvatarp->isWearingAttachment(idItem)) || (isLinkInCOF(idItem)) ) - { - itPendingAttachLink = mPendingAttachLinks.erase(itPendingAttachLink); - continue; - } - - LLViewerInventoryItem* pItem = gInventory.getItem(idItem); - if (pItem) - { - obj_items.push_back(pItem); - } - - ++itPendingAttachLink; - } - LL_DEBUGS("Avatar") << self_av_string() << "Updating " << obj_items.size() << " attachments" << LL_ENDL; LLAgentWearables::llvo_vec_t objects_to_remove; @@ -3913,9 +3893,6 @@ void LLAppearanceMgr::removeItemsFromAvatar(const uuid_vec_t& ids_to_remove, LLP removeCOFItemLinks(linked_item_id, cb, immediate_delete); // [/SL:KB] // removeCOFItemLinks(linked_item_id, cb); -// [SL:KB] - Patch: Appearance-SyncAttach | Checked: 2015-03-01 (Catznip-3.7) - clearPendingAttachment(linked_item_id); -// [/SL:KB] addDoomedTempAttachment(linked_item_id); } } @@ -3935,9 +3912,6 @@ void LLAppearanceMgr::removeItemFromAvatar(const LLUUID& id_to_remove, LLPointer // [/SL:KB] // LLPointer cb = new LLUpdateAppearanceOnDestroy; // removeCOFItemLinks(linked_item_id, cb); -// [SL:KB] - Patch: Appearance-SyncAttach | Checked: 2015-03-01 (Catznip-3.7) - clearPendingAttachment(linked_item_id); -// [/SL:KB] addDoomedTempAttachment(linked_item_id); } @@ -4102,12 +4076,6 @@ void LLAppearanceMgr::setAttachmentInvLinkEnable(bool val) { LL_DEBUGS("Avatar") << "setAttachmentInvLinkEnable => " << (int) val << LL_ENDL; mAttachmentInvLinkEnabled = val; -// [SL:KB] - Patch: Appearance-SyncAttach | Checked: 2010-10-05 (Catznip-2.2) - if (mAttachmentInvLinkEnabled) - { - linkPendingAttachments(); - } -// [/SL:KB] } void dumpAttachmentSet(const std::set& atts, const std::string& msg) @@ -4130,13 +4098,6 @@ void dumpAttachmentSet(const std::set& atts, const std::string& msg) void LLAppearanceMgr::registerAttachment(const LLUUID& item_id) { gInventory.addChangedMask(LLInventoryObserver::LABEL, item_id); -// [SL:KB] - Patch: Appearance-SyncAttach | Checked: 2010-10-05 (Catznip-2.2) - if (isLinkInCOF(item_id)) - { - return; - } - mPendingAttachLinks.push_back(item_id); -// [/SL:KB] if (mAttachmentInvLinkEnabled) { @@ -4145,12 +4106,8 @@ void LLAppearanceMgr::registerAttachment(const LLUUID& item_id) // But it is not acceptable solution. See EXT-7777 if (!isLinkedInCOF(item_id)) { -// [SL:KB] - Patch: Appearance-SyncAttach | Checked: 2010-10-05 (Catznip-2.2) - LLPointer cb = new LLRegisterAttachmentCallback(item_id); - LLAppearanceMgr::addCOFItemLink(item_id, cb); // Add COF link for item. -// [/SL:KB] -// LLPointer cb = new LLUpdateAppearanceOnDestroy(); -// LLAppearanceMgr::addCOFItemLink(item_id, cb); // Add COF link for item. + LLPointer cb = new LLUpdateAppearanceOnDestroy(); + LLAppearanceMgr::addCOFItemLink(item_id, cb); // Add COF link for item. } } else @@ -4162,9 +4119,6 @@ void LLAppearanceMgr::registerAttachment(const LLUUID& item_id) void LLAppearanceMgr::unregisterAttachment(const LLUUID& item_id) { gInventory.addChangedMask(LLInventoryObserver::LABEL, item_id); -// [SL:KB] - Patch: Appearance-SyncAttach | Checked: 2010-10-05 (Catznip-2.2) - clearPendingAttachment(item_id); -// [/SL:KB] if (mAttachmentInvLinkEnabled) { @@ -4176,47 +4130,6 @@ void LLAppearanceMgr::unregisterAttachment(const LLUUID& item_id) } } -// [SL:KB] - Patch: Appearance-SyncAttach | Checked: 2010-09-18 (Catznip-2.2) -void LLAppearanceMgr::linkPendingAttachments() -{ - LLPointer cb = NULL; - for (uuid_vec_t::const_iterator itPendingAttachLink = mPendingAttachLinks.begin(); itPendingAttachLink != mPendingAttachLinks.end(); ++itPendingAttachLink) - { - const LLUUID& idAttachItem = *itPendingAttachLink; - if ( (gAgentAvatarp->isWearingAttachment(idAttachItem)) && (!isLinkInCOF(idAttachItem)) ) - { -// if (!cb) -// cb = new LLRegisterAttachmentCallback(idAttachItem); - // One LLInventoryCallback instance should handle multiple items but thanks to AIS we don't currently have access to the UUIDs of the new links - // so we need one instance per needed link - yay for progress - cb = new LLRegisterAttachmentCallback(idAttachItem); - LLAppearanceMgr::addCOFItemLink(idAttachItem, cb); - } - } -} - -void LLAppearanceMgr::clearPendingAttachment(const LLUUID& idItem) -{ - uuid_vec_t::iterator itPendingAttachLink = std::find(mPendingAttachLinks.begin(), mPendingAttachLinks.end(), idItem); - if (itPendingAttachLink != mPendingAttachLinks.end()) - { - mPendingAttachLinks.erase(itPendingAttachLink); - } -} - -void LLAppearanceMgr::onRegisterAttachmentComplete(const LLUUID& idAttachItem) -{ - // Remove the attachment from the pending list - clearPendingAttachment(idAttachItem); - - // It may have been detached already in which case we should remove the COF link - if ( (isAgentAvatarValid()) && (!gAgentAvatarp->isWearingAttachment(idAttachItem)) ) - { - removeCOFItemLinks(idAttachItem); - } -} -// [/SL:KB] - BOOL LLAppearanceMgr::getIsInCOF(const LLUUID& obj_id) const { const LLUUID& cof = getCOF(); diff --git a/indra/newview/llappearancemgr.h b/indra/newview/llappearancemgr.h index ba3dfd6286..de8c5ac224 100755 --- a/indra/newview/llappearancemgr.h +++ b/indra/newview/llappearancemgr.h @@ -287,15 +287,6 @@ private: void addDoomedTempAttachment(const LLUUID& id_to_remove); -// [SL:KB] - Patch: Appearance-SyncAttach | Checked: 2010-09-18 (Catznip-2.1) -public: - void linkPendingAttachments(); - void clearPendingAttachment(const LLUUID& idItem); - void onRegisterAttachmentComplete(const LLUUID& idAttachItem); -private: - uuid_vec_t mPendingAttachLinks; -// [/SL:KB] - ////////////////////////////////////////////////////////////////////////////////// // Item-specific convenience functions public: @@ -326,21 +317,6 @@ private: nullary_func_t mPostUpdateFunc; }; -// [SL:KB] - Patch: Appearance-SyncAttach | Checked: 2010-08-31 (Catznip-2.1) -class LLRegisterAttachmentCallback : public LLInventoryCallback -{ -public: - LLRegisterAttachmentCallback(const LLUUID& idAttachItem) : m_idAttachItem(idAttachItem) {} - /*virtual*/ void fire(const LLUUID&) - { - // NOTE: AISCommand::getResponseUUID() currently returns false so the passed UUID is NULL and hence useless - LLAppearanceMgr::instance().onRegisterAttachmentComplete(m_idAttachItem); - } -protected: - LLUUID m_idAttachItem; -}; -// [/SL:KB] - class LLUpdateAppearanceAndEditWearableOnDestroy: public LLInventoryCallback { public: