From 2aacee62ad2c001b8c860f8bedc84e2b7f634fef Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Wed, 17 Feb 2010 18:17:48 -0500 Subject: Work in progress on EXT-5333: Bodyparts missing from appearance and COF --- indra/newview/llagentwearables.cpp | 33 +++++++++++++++++++++++---------- 1 file changed, 23 insertions(+), 10 deletions(-) (limited to 'indra/newview/llagentwearables.cpp') diff --git a/indra/newview/llagentwearables.cpp b/indra/newview/llagentwearables.cpp index 68ee9cd612..401e8d25c5 100644 --- a/indra/newview/llagentwearables.cpp +++ b/indra/newview/llagentwearables.cpp @@ -286,6 +286,7 @@ void LLAgentWearables::addWearableToAgentInventoryCallback::fire(const LLUUID& i } if (mTodo & CALL_RECOVERDONE) { + LLAppearanceManager::instance().addCOFItemLink(inv_item,false); gAgentWearables.recoverMissingWearableDone(); } /* @@ -1038,8 +1039,10 @@ void LLAgentWearables::onInitialWearableAssetArrived(LLWearable* wearable, void* { return; } - - if (wearable) +// BAP RESTORE TMP + if (wearable && type != WT_SHAPE) // force failure for shape to test recovery path. + +// if (wearable) { llassert(type == wearable->getType()); wearable->setItemID(wear_data->mItemID); @@ -1057,6 +1060,7 @@ void LLAgentWearables::onInitialWearableAssetArrived(LLWearable* wearable, void* // Somehow the asset doesn't exist in the database. gAgentWearables.recoverMissingWearable(type,index); } + gInventory.notifyObservers(); @@ -2484,7 +2488,7 @@ class LLFetchAndLinkObserver: public LLInventoryFetchObserver public: LLFetchAndLinkObserver(LLInventoryFetchObserver::item_ref_t& ids): m_ids(ids), - LLInventoryFetchObserver(true) + LLInventoryFetchObserver(true) // retry for missing items { } ~LLFetchAndLinkObserver() @@ -2493,7 +2497,9 @@ public: virtual void done() { gInventory.removeObserver(this); + // Link to all fetched items in COF. + LLPointer link_waiter = new LLUpdateAppearanceOnDestroy; for (LLInventoryFetchObserver::item_ref_t::iterator it = m_ids.begin(); it != m_ids.end(); ++it) @@ -2505,8 +2511,13 @@ public: llwarns << "fetch failed!" << llendl; continue; } - link_inventory_item(gAgent.getID(), item->getLinkedUUID(), LLAppearanceManager::instance().getCOF(), item->getName(), - LLAssetType::AT_LINK, LLPointer(NULL)); + + link_inventory_item(gAgent.getID(), + item->getLinkedUUID(), + LLAppearanceManager::instance().getCOF(), + item->getName(), + LLAssetType::AT_LINK, + link_waiter); } } private: @@ -2529,11 +2540,13 @@ void LLInitialWearablesFetch::processWearablesMessage() #ifdef USE_CURRENT_OUTFIT_FOLDER ids.push_back(wearable_data->mItemID); #endif - // Fetch the wearables - LLWearableList::instance().getAsset(wearable_data->mAssetID, - LLStringUtil::null, - LLWearableDictionary::getAssetType(wearable_data->mType), - LLAgentWearables::onInitialWearableAssetArrived, (void*)(wearable_data)); +#if 0 +// // Fetch the wearables +// LLWearableList::instance().getAsset(wearable_data->mAssetID, +// LLStringUtil::null, +// LLWearableDictionary::getAssetType(wearable_data->mType), +// LLAgentWearables::onInitialWearableAssetArrived, (void*)(wearable_data)); +#endif } else { -- cgit v1.3 From 284eb11a102af4889f3e1a1ef97699f67e4c0fa3 Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Thu, 18 Feb 2010 16:10:35 -0500 Subject: Work in progress on EXT-5333: Bodyparts missing from appearance and COF --- indra/newview/llagentwearables.cpp | 6 +++--- indra/newview/llappearancemgr.cpp | 3 ++- 2 files changed, 5 insertions(+), 4 deletions(-) (limited to 'indra/newview/llagentwearables.cpp') diff --git a/indra/newview/llagentwearables.cpp b/indra/newview/llagentwearables.cpp index a955696447..94fd5132ca 100644 --- a/indra/newview/llagentwearables.cpp +++ b/indra/newview/llagentwearables.cpp @@ -1040,9 +1040,9 @@ void LLAgentWearables::onInitialWearableAssetArrived(LLWearable* wearable, void* return; } // BAP RESTORE TMP - if (wearable && type != WT_SHAPE) // force failure for shape to test recovery path. +// if (wearable && type != WT_SHAPE) // force failure for shape to test recovery path. -// if (wearable) + if (wearable) { llassert(type == wearable->getType()); wearable->setItemID(wear_data->mItemID); @@ -1580,7 +1580,7 @@ void LLAgentWearables::setWearableOutfit(const LLInventoryItem::item_array_t& it const LLDynamicArray< LLWearable* >& wearables, BOOL remove) { - lldebugs << "setWearableOutfit() start" << llendl; + llinfos << "setWearableOutfit() start" << llendl; BOOL wearables_to_remove[WT_COUNT]; wearables_to_remove[WT_SHAPE] = FALSE; diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp index 9da341b669..74c45a9467 100644 --- a/indra/newview/llappearancemgr.cpp +++ b/indra/newview/llappearancemgr.cpp @@ -712,7 +712,8 @@ void LLAppearanceManager::linkAll(const LLUUID& category, void LLAppearanceManager::updateCOF(const LLUUID& category, bool append) { - llinfos << "starting" << llendl; + LLViewerInventoryCategory *pcat = gInventory.getCategory(category); + llinfos << "starting, cat " << (pcat ? pcat->getName() : "[UNKNOWN]") << llendl; const LLUUID cof = getCOF(); -- cgit v1.3 From 00fdc0acd5e27d353c070706e838a35bf889a536 Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Mon, 22 Feb 2010 14:03:29 -0500 Subject: Work in progress on EXT-5333: Cleanup. --- indra/newview/llagentwearables.cpp | 2 -- indra/newview/llappearancemgr.cpp | 24 +++++++++--------------- indra/newview/llinventorybridge.cpp | 6 ++---- 3 files changed, 11 insertions(+), 21 deletions(-) (limited to 'indra/newview/llagentwearables.cpp') diff --git a/indra/newview/llagentwearables.cpp b/indra/newview/llagentwearables.cpp index 94fd5132ca..08cd101b01 100644 --- a/indra/newview/llagentwearables.cpp +++ b/indra/newview/llagentwearables.cpp @@ -1039,8 +1039,6 @@ void LLAgentWearables::onInitialWearableAssetArrived(LLWearable* wearable, void* { return; } -// BAP RESTORE TMP -// if (wearable && type != WT_SHAPE) // force failure for shape to test recovery path. if (wearable) { diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp index ae1a7a0cbe..c9da08701d 100644 --- a/indra/newview/llappearancemgr.cpp +++ b/indra/newview/llappearancemgr.cpp @@ -648,14 +648,14 @@ static void onWearableAssetFetch(LLWearable* wearable, void* data) { LLWearableHoldingPattern* holder = (LLWearableHoldingPattern*)data; holder->mResolved += 1; // just counting callbacks, not successes. - llinfos << "onWearableAssetFetch, resolved " << holder->mResolved << " requested " << holder->mFoundList.size() << llendl; + llinfos << "onWearableAssetFetch, resolved count " << holder->mResolved << " of requested " << holder->mFoundList.size() << llendl; if (wearable) { - llinfos << "wearable type " << wearable->getType() << llendl; + llinfos << "wearable found, type " << wearable->getType() << " asset " << wearable->getAssetID() << llendl; } else { - llinfos << "wearable: NONE" << llendl; + llwarns << "no wearable found" << llendl; } if (holder->mFired) @@ -666,18 +666,9 @@ static void onWearableAssetFetch(LLWearable* wearable, void* data) if (!wearable) { - llwarns << "no wearable found" << llendl; return; } -#if 0 - if ((wearable->getType() == WT_SHAPE) || (wearable->getType() == WT_JACKET)) - { - llwarns << "Forcing failure for type " << wearable->getType() << llendl; - return; - } -#endif - for (LLWearableHoldingPattern::found_list_t::iterator iter = holder->mFoundList.begin(); iter != holder->mFoundList.end(); ++iter) { @@ -1118,7 +1109,8 @@ void LLAppearanceManager::updateAppearanceFromCOF() // callback will be called (and this object deleted) // before the final getNextData(). - // BAP cleanup - no point having found_container when mFoundList already has all the info. + // BAP future cleanup - no point having found_container when + // mFoundList already has all the info. LLDynamicArray found_container; for(S32 i = 0; i < wear_items.count(); ++i) { @@ -1133,8 +1125,10 @@ void LLAppearanceManager::updateAppearanceFromCOF() linked_item->isWearableType() ? linked_item->getWearableType() : WT_INVALID ); -#if 1 - // BAP REMOVEME Force failure to test handling +#if 0 + // Fault injection: uncomment this block to test asset + // fetch failures (should be replaced by new defaults in + // lost&found). if (found.mWearableType == WT_SHAPE || found.mWearableType == WT_JACKET) { found.mAssetID.generate(); // Replace with new UUID, guaranteed not to exist in DB diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index 5b59f52fa5..d0513c35ce 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -1925,7 +1925,7 @@ bool LLFindCOFValidItems::operator()(LLInventoryCategory* cat, // - links to attachments // - links to gestures // - links to ensemble folders - LLViewerInventoryItem *linked_item = ((LLViewerInventoryItem*)item)->getLinkedItem(); // BAP - safe? + LLViewerInventoryItem *linked_item = ((LLViewerInventoryItem*)item)->getLinkedItem(); if (linked_item) { LLAssetType::EType type = linked_item->getType(); @@ -1936,7 +1936,7 @@ bool LLFindCOFValidItems::operator()(LLInventoryCategory* cat, } else { - LLViewerInventoryCategory *linked_category = ((LLViewerInventoryItem*)item)->getLinkedCategory(); // BAP - safe? + LLViewerInventoryCategory *linked_category = ((LLViewerInventoryItem*)item)->getLinkedCategory(); // BAP remove AT_NONE support after ensembles are fully working? return (linked_category && ((linked_category->getPreferredType() == LLFolderType::FT_NONE) || @@ -2962,8 +2962,6 @@ void LLFolderBridge::modifyOutfit(BOOL append) LLViewerInventoryCategory* cat = getCategory(); if(!cat) return; - // BAP - was: - // wear_inventory_category_on_avatar( cat, append ); LLAppearanceManager::instance().wearInventoryCategory( cat, FALSE, append ); } -- cgit v1.3