From 894f649da792173ad456b3591dc8afe7a269cc78 Mon Sep 17 00:00:00 2001 From: Kitty Barnett Date: Sat, 28 Aug 2010 17:43:04 +0200 Subject: [PATCH 01/25] [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/25] [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/25] [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/25] [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/25] [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/25] [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/25] [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/25] [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/25] [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/25] [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/25] [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/25] [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/25] [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/25] [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/25] [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/25] - 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/25] - 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/25] - 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/25] 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/25] - 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/25] - 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/25] - 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/25] - 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/25] - 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/25] 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