- internal : removed Appearance-MixedViewers patch branch

--HG--
branch : .RLVa
Kitty Barnett 2013-07-21 18:56:35 +02:00
parent ce16d47e9d
commit 0ea462a7cb
7 changed files with 19 additions and 153 deletions

View File

@ -1,2 +0,0 @@
a52aa93d9772c677a4594b22411e99d3ca7cb7c3
c0b22ce8586c399ea4201ef08036782e06a78d13

View File

@ -1 +0,0 @@
23a6fee23f1d6a2432201906d41e80f3471e8700

View File

@ -1,5 +0,0 @@
[Appearance/MixedViewers]
- 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()

View File

@ -12889,50 +12889,6 @@
<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>
<boolean>0</boolean>
</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>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>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>

View File

@ -33,9 +33,6 @@
#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]
void order_my_outfits_cb()
{
@ -128,40 +125,8 @@ 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-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) && (gSavedSettings.getBOOL("VerifyInitialWearables")) )
{
LLAppearanceMgr::wearables_by_type_t items_by_type(LLWearableType::WT_COUNT);
LLAppearanceMgr::sortItemsByActualDescription(wearable_array);
LLAppearanceMgr::divvyWearablesByType(wearable_array, items_by_type);
// Compare the COF wearables against the initial wearables
for (initial_wearable_data_vec_t::const_iterator itWearableData = mAgentInitialWearables.begin();
(itWearableData != mAgentInitialWearables.end()) && (fUpdateFromCOF); ++itWearableData)
{
const LLUUID& idItem = itWearableData->mItemID; bool fFound = false;
for (S32 idxItem = 0, cntItem = items_by_type[itWearableData->mType].size(); idxItem < cntItem; idxItem++)
{
const LLViewerInventoryItem* pCOFItem = items_by_type[itWearableData->mType].get(idxItem);
if (idItem == pCOFItem->getLinkedUUID())
{
fFound = true;
break;
}
}
if (!fFound)
fUpdateFromCOF = false;
}
}
// [/SL:KB]
LLAppearanceMgr::instance().setAttachmentInvLinkEnable(true);
// if (wearable_array.count() > 0)
// [SL:KB] - Patch: Appearance-MixedViewers | Checked: 2010-04-28 (Catznip-3.0.0a) | Modified: Catznip-2.0.0e
if (fUpdateFromCOF)
// [/SL:KB]
if (wearable_array.count() > 0)
{
gAgentWearables.notifyLoadingStarted();
LLAppearanceMgr::instance().updateAppearanceFromCOF();
@ -189,54 +154,29 @@ public:
{
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-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-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
LLInventoryModel::item_array_t initial_items;
for (uuid_vec_t::iterator itItem = mIDs.begin(); itItem != mIDs.end(); ++itItem)
// 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)
{
LLViewerInventoryItem* pItem = gInventory.getItem(*itItem);
if (!pItem)
LLUUID id = *it;
LLViewerInventoryItem *item = gInventory.getItem(*it);
if (!item)
{
llwarns << "fetch failed!" << llendl;
continue;
}
initial_items.push_back(pItem);
link_inventory_item(gAgent.getID(),
item->getLinkedUUID(),
LLAppearanceMgr::instance().getCOF(),
item->getName(),
item->getDescription(),
LLAssetType::AT_LINK,
link_waiter);
}
LLAppearanceMgr::instance().updateAppearanceFromInitialWearables(initial_items);
delete this;
}
// [/SL:KB]
};
void LLInitialWearablesFetch::processWearablesMessage()
@ -248,11 +188,7 @@ void LLInitialWearablesFetch::processWearablesMessage()
for (U8 i = 0; i < mAgentInitialWearables.size(); ++i)
{
// 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-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]
InitialWearableData *wearable_data = new InitialWearableData(mAgentInitialWearables[i]); // This will be deleted in the callback.
if (wearable_data->mAssetID.notNull())
{
@ -262,7 +198,7 @@ void LLInitialWearablesFetch::processWearablesMessage()
{
llinfos << "Invalid wearable, type " << wearable_data->mType << " itemID "
<< wearable_data->mItemID << " assetID " << wearable_data->mAssetID << llendl;
// delete wearable_data;
delete wearable_data;
}
}

View File

@ -2201,21 +2201,6 @@ void LLAppearanceMgr::updateAppearanceFromCOF(bool update_base_outfit_ordering)
}
}
// [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();
// Remove current COF contents
purgeCategory(idCOF, false);
gInventory.notifyObservers();
// Create links to new COF contents
LLPointer<LLInventoryCallback> link_waiter = new LLUpdateAppearanceOnDestroy();
linkAll(idCOF, initial_items, link_waiter);
}
// [/SL:KB]
void LLAppearanceMgr::getDescendentsOfAssetType(const LLUUID& category,
LLInventoryModel::item_array_t& items,
LLAssetType::EType type,

View File

@ -50,9 +50,6 @@ public:
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-3.0.0a) | Added: Catznip-2.0.0a
void updateAppearanceFromInitialWearables(LLInventoryModel::item_array_t& initial_items);
// [/SL:KB]
bool needToSaveCOF();
void updateCOF(const LLUUID& category, bool append = false);
void wearInventoryCategory(LLInventoryCategory* category, bool copy, bool append);