diff --git a/.hgpatchinfo/Appearance-MixedViewers.dep b/.hgpatchinfo/Appearance-MixedViewers.dep index 880131d517c49ea0118d36fd10df8d6ea182955a..5cc1a8bd0f62d96a18e0424fb3dac1cba5fc1b07 100644 --- a/.hgpatchinfo/Appearance-MixedViewers.dep +++ b/.hgpatchinfo/Appearance-MixedViewers.dep @@ -1 +1 @@ -5697118601ade0f70f851639661ba637174b3024 \ No newline at end of file +c10aca90c7b1c46355536437d84a4b06abf79c5d \ No newline at end of file diff --git a/.hgpatchinfo/Appearance-MixedViewers.desc b/.hgpatchinfo/Appearance-MixedViewers.desc index be6e017a7dbff0af6c85c6bb1399b240968e09f3..622d025f3469a2f0df8326622c51acd3fc8a5e23 100644 --- a/.hgpatchinfo/Appearance-MixedViewers.desc +++ b/.hgpatchinfo/Appearance-MixedViewers.desc @@ -1,4 +1,5 @@ [Appearance/MixedViewers] -- fixed : "Worn items in Viewer 2 and Viewer 1.x aren't synchronized" (http://jira.secondlife.com/browse/VWR-17594) +- fixed : "Worn items in Viewer 2 and Viewer 1.x aren't synchronized" [see http://jira.secondlife.com/browse/VWR-17594] -> current fix compares *only* the wearables in COF with the wearables specified by AgentWearablesUpdate + -> controlled by "VerifyInitialWearables" (defaults to FALSE with SL-3.0) - fixed : minor memory leak in LLInitialWearablesFetch::processWearablesMessage() diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 3d561e2172199890397775ca7198c6e439fde122..53a87bc502e1568c16400759b1724a86ef3c75df 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -12488,6 +12488,17 @@ <key>Value</key> <integer>0</integer> </map> + <key>VerifyInitialWearables</key> + <map> + <key>Comment</key> + <string>Compares the initial wearables to the COF contents to determine which one to use for the intial outfit</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>Boolean</string> + <key>Value</key> + <integer>0</integer> + </map> <key>VertexShaderEnable</key> <map> <key>Comment</key> diff --git a/indra/newview/llagentwearablesfetch.cpp b/indra/newview/llagentwearablesfetch.cpp index d9d1704c7dbfaa674c74f87a588b141164c0a0db..917f6b390866ff6cd428c6b4ea4105602ba69905 100644 --- a/indra/newview/llagentwearablesfetch.cpp +++ b/indra/newview/llagentwearablesfetch.cpp @@ -33,7 +33,9 @@ #include "llinventoryfunctions.h" #include "llstartup.h" #include "llvoavatarself.h" - +// [SL:KB] - Patch: Appearance-MixedViewers | Checked: 2011-09-10 (Catznip-3.0.0a) +#include "llviewercontrol.h" +// [/SL:KB] class LLOrderMyOutfitsOnDestroy: public LLInventoryCallback { @@ -119,10 +121,10 @@ void LLInitialWearablesFetch::processContents() gInventory.collectDescendentsIf(mComplete.front(), cat_array, wearable_array, LLInventoryModel::EXCLUDE_TRASH, is_wearable); -// [SL:KB] - Patch: Appearance-MixedViewers | Checked: 2010-05-18 (Catznip-2.6.0a) | Modified: Catznip-2.0.0h +// [SL:KB] - Patch: Appearance-MixedViewers | Checked: 2010-05-18 (Catznip-3.0.0a) | Modified: Catznip-2.0.0h // NOTE: don't use the current COF contents if 'wearable_array' is empty (ie first logon with 2.0 or some other problem) bool fUpdateFromCOF = !wearable_array.empty(); - if (fUpdateFromCOF) + if ( (fUpdateFromCOF) && (gSavedSettings.getBOOL("VerifyInitialWearables")) ) { LLAppearanceMgr::wearables_by_type_t items_by_type(LLWearableType::WT_COUNT); LLAppearanceMgr::sortItemsByActualDescription(wearable_array); @@ -150,7 +152,7 @@ void LLInitialWearablesFetch::processContents() LLAppearanceMgr::instance().setAttachmentInvLinkEnable(true); // if (wearable_array.count() > 0) -// [SL:KB] - Patch: Appearance-MixedViewers | Checked: 2010-04-28 (Catznip-2.6.0a) | Modified: Catznip-2.0.0e +// [SL:KB] - Patch: Appearance-MixedViewers | Checked: 2010-04-28 (Catznip-3.0.0a) | Modified: Catznip-2.0.0e if (fUpdateFromCOF) // [/SL:KB] { @@ -180,35 +182,34 @@ class LLFetchAndLinkObserver: public LLInventoryFetchItemsObserver { gInventory.removeObserver(this); /* - // Link to all fetched items in COF. - LLPointer<LLInventoryCallback> link_waiter = new LLUpdateAppearanceOnDestroy; - for (uuid_vec_t::iterator it = mIDs.begin(); - it != mIDs.end(); - ++it) - { - LLUUID id = *it; - LLViewerInventoryItem *item = gInventory.getItem(*it); - if (!item) - { - llwarns << "fetch failed!" << llendl; - continue; - } - - link_inventory_item(gAgent.getID(), - item->getLinkedUUID(), - LLAppearanceMgr::instance().getCOF(), - item->getName(), - item->getDescription(), - LLAssetType::AT_LINK, - link_waiter); - } -*/ -// [SL:KB] - Patch: Appearance-MixedViewers | Checked: 2010-08-14 (Catznip-2.6.0a) | Added: Catznip-2.1.1d +// // Link to all fetched items in COF. +// LLPointer<LLInventoryCallback> link_waiter = new LLUpdateAppearanceOnDestroy; +// for (uuid_vec_t::iterator it = mIDs.begin(); +// it != mIDs.end(); +// ++it) +// { +// LLUUID id = *it; +// LLViewerInventoryItem *item = gInventory.getItem(*it); +// if (!item) +// { +// llwarns << "fetch failed!" << llendl; +// continue; +// } +// +// link_inventory_item(gAgent.getID(), +// item->getLinkedUUID(), +// LLAppearanceMgr::instance().getCOF(), +// item->getName(), +// item->getDescription(), +// LLAssetType::AT_LINK, +// link_waiter); +// } +// [SL:KB] - Patch: Appearance-MixedViewers | Checked: 2010-08-14 (Catznip-3.0.0a) | Added: Catznip-2.1.1d doOnIdleOneTime(boost::bind(&LLFetchAndLinkObserver::doneIdle, this)); // [/SL:KB] } -// [SL:KB] - Patch: Appearance-MixedViewers | Checked: 2010-04-02 (Catznip-2.6.0a) | Added: Catznip-2.0.0a +// [SL:KB] - Patch: Appearance-MixedViewers | Checked: 2010-04-02 (Catznip-3.0.0a) | Added: Catznip-2.0.0a void doneIdle() { // NOTE: the code above makes the assumption that COF is empty which won't be the case the way it's used now @@ -241,7 +242,7 @@ void LLInitialWearablesFetch::processWearablesMessage() { // Populate the current outfit folder with links to the wearables passed in the message // InitialWearableData *wearable_data = new InitialWearableData(mAgentInitialWearables[i]); // This will be deleted in the callback. -// [SL:KB] - Patch: Appearance-MixedViewers | Checked: 2010-05-02 (Catznip-2.6.0a) | Added: Catznip-2.0.0f +// [SL:KB] - Patch: Appearance-MixedViewers | Checked: 2010-05-02 (Catznip-3.0.0a) | Added: Catznip-2.0.0f // Fixes minor leak: since COF is used onInitialWearableAssetArrived() will never get called and "wearable_data" leaks InitialWearableData* wearable_data = &mAgentInitialWearables[i]; // [/SL:KB] diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp index e629ec267b8049b7880c807415f8e1f68c35a862..a99d8ef2b30e1ca09d8d8f4375959cf3745c2f1e 100644 --- a/indra/newview/llappearancemgr.cpp +++ b/indra/newview/llappearancemgr.cpp @@ -1866,7 +1866,7 @@ void LLAppearanceMgr::updateAppearanceFromCOF(bool update_base_outfit_ordering) } } -// [SL:KB] - Patch: Appearance-MixedViewers | Checked: 2010-04-02 (Catznip-2.6.0a) | Added: Catznip-2.0.0a +// [SL:KB] - Patch: Appearance-MixedViewers | Checked: 2010-04-02 (Catznip-3.0.0a) | Added: Catznip-2.0.0a void LLAppearanceMgr::updateAppearanceFromInitialWearables(LLInventoryModel::item_array_t& initial_items) { const LLUUID& idCOF = getCOF(); diff --git a/indra/newview/llappearancemgr.h b/indra/newview/llappearancemgr.h index 213a3aaad066eaebfe42cf4fe13f35b333353fa6..8cb1ebca19a580e137f4e1864a3ac6bacef4c847 100644 --- a/indra/newview/llappearancemgr.h +++ b/indra/newview/llappearancemgr.h @@ -51,7 +51,7 @@ class LLAppearanceMgr: public LLSingleton<LLAppearanceMgr> typedef std::vector<LLInventoryModel::item_array_t> wearables_by_type_t; void updateAppearanceFromCOF(bool update_base_outfit_ordering = false); -// [SL:KB] - Patch: Appearance-MixedViewers | Checked: 2010-04-02 (Catznip-2.6.0a) | Added: Catznip-2.0.0a +// [SL:KB] - Patch: Appearance-MixedViewers | Checked: 2010-04-02 (Catznip-3.0.0a) | Added: Catznip-2.0.0a void updateAppearanceFromInitialWearables(LLInventoryModel::item_array_t& initial_items); // [/SL:KB] bool needToSaveCOF();