summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xindra/newview/app_settings/logcontrol.xml2
-rwxr-xr-xindra/newview/llappearancemgr.cpp72
-rwxr-xr-xindra/newview/llappearancemgr.h2
-rwxr-xr-xindra/newview/llvoavatar.cpp4
4 files changed, 56 insertions, 24 deletions
diff --git a/indra/newview/app_settings/logcontrol.xml b/indra/newview/app_settings/logcontrol.xml
index 1259039010..64122bbb6c 100755
--- a/indra/newview/app_settings/logcontrol.xml
+++ b/indra/newview/app_settings/logcontrol.xml
@@ -42,8 +42,8 @@
</array>
<key>tags</key>
<array>
- <string>Avatar</string>
<!-- sample entry for debugging specific items
+ <string>Avatar</string>
<string>Voice</string>
-->
</array>
diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp
index d34d54fb3b..e326ca5e15 100755
--- a/indra/newview/llappearancemgr.cpp
+++ b/indra/newview/llappearancemgr.cpp
@@ -191,19 +191,13 @@ public:
{
LLViewerInventoryItem* item = *it;
llassert(item);
- addItem(item);
+ addItem(item->getUUID());
}
}
// Request or re-request operation for specified item.
- void addItem(LLViewerInventoryItem *item)
+ void addItem(const LLUUID& item_id)
{
- const LLUUID& item_id = item->getUUID();
- if (!item)
- {
- llwarns << "item not found for " << item_id << llendl;
- return;
- }
mPendingRequests++;
// On a re-request, this will reset the timer.
mWaitTimes[item_id] = LLTimer();
@@ -222,10 +216,10 @@ public:
return;
}
- requestOperation(item);
+ requestOperation(item_id);
}
- virtual void requestOperation(LLViewerInventoryItem *item) = 0;
+ virtual void requestOperation(const LLUUID& item_id) = 0;
void onOp(const LLUUID& src_id, const LLUUID& dst_id, LLTimer timestamp)
{
@@ -314,7 +308,7 @@ public:
LL_DEBUGS("Avatar") << "Waited " << time_waited <<
" for " << curr_it->first << ", retrying" << llendl;
mRetryCount++;
- addItem(gInventory.getItem(curr_it->first));
+ addItem(curr_it->first);
}
else
{
@@ -379,8 +373,10 @@ public:
addItems(src_items);
}
- virtual void requestOperation(LLViewerInventoryItem *item)
+ virtual void requestOperation(const LLUUID& item_id)
{
+ LLViewerInventoryItem *item = gInventory.getItem(item_id);
+ llassert(item);
copy_inventory_item(
gAgent.getID(),
item->getPermissions().getOwner(),
@@ -408,16 +404,46 @@ public:
addItems(src_items);
}
- virtual void requestOperation(LLViewerInventoryItem *item)
+ virtual void requestOperation(const LLUUID& item_id)
{
- link_inventory_item(gAgent.getID(),
- item->getLinkedUUID(),
- mDstCatID,
- item->getName(),
- item->LLInventoryItem::getDescription(),
- LLAssetType::AT_LINK,
- new LLBoostFuncInventoryCallback(
- boost::bind(&LLCallAfterInventoryBatchMgr::onOp,this,item->getUUID(),_1,LLTimer())));
+ LLViewerInventoryItem *item = gInventory.getItem(item_id);
+ if (item)
+ {
+ // create an inventory item link.
+ link_inventory_item(gAgent.getID(),
+ item->getLinkedUUID(),
+ mDstCatID,
+ item->getName(),
+ item->LLInventoryItem::getDescription(),
+ LLAssetType::AT_LINK,
+ new LLBoostFuncInventoryCallback(
+ boost::bind(&LLCallAfterInventoryBatchMgr::onOp,this,item->getUUID(),_1,LLTimer())));
+ }
+ else
+ {
+ // create a base outfit link if appropriate.
+ LLViewerInventoryCategory *catp = gInventory.getCategory(item_id);
+ if (!catp)
+ {
+ llwarns << "id not found as inventory item or category " << item_id << llendl;
+ return;
+ }
+ const LLUUID cof = LLAppearanceMgr::instance().getCOF();
+ std::string new_outfit_name = "";
+
+ LLAppearanceMgr::instance().purgeBaseOutfitLink(cof);
+
+ if (catp && catp->getPreferredType() == LLFolderType::FT_OUTFIT)
+ {
+ link_inventory_item(gAgent.getID(), item_id, cof, catp->getName(), "",
+ LLAssetType::AT_LINK_FOLDER,
+ new LLBoostFuncInventoryCallback(
+ boost::bind(&LLCallAfterInventoryBatchMgr::onOp,this,item_id,_1,LLTimer())));
+ new_outfit_name = catp->getName();
+ }
+
+ LLAppearanceMgr::instance().updatePanelOutfitName(new_outfit_name);
+ }
}
};
@@ -1742,7 +1768,7 @@ void LLAppearanceMgr::updateCOF(const LLUUID& category, bool append)
// Add link to outfit if category is an outfit.
if (!append)
{
- createBaseOutfitLink(category, NULL);
+ link_waiter->addItem(category);
}
LL_DEBUGS("Avatar") << self_av_string() << "waiting for LLUpdateAppearanceOnDestroy" << LL_ENDL;
}
@@ -2967,6 +2993,8 @@ void LLAppearanceMgr::requestServerAppearanceUpdate(LLCurl::ResponderPtr respond
LLSD body;
S32 cof_version = getCOFVersion();
body["cof_version"] = cof_version;
+ LL_DEBUGS("Avatar") << "my_cof_version " << cof_version << llendl;
+
//LLCurl::ResponderPtr responder_ptr;
if (!responder_ptr.get())
{
diff --git a/indra/newview/llappearancemgr.h b/indra/newview/llappearancemgr.h
index ba5406caa1..cb271cda4d 100755
--- a/indra/newview/llappearancemgr.h
+++ b/indra/newview/llappearancemgr.h
@@ -109,6 +109,7 @@ public:
// Update the displayed outfit name in UI.
void updatePanelOutfitName(const std::string& name);
+ void purgeBaseOutfitLink(const LLUUID& category);
void createBaseOutfitLink(const LLUUID& category, LLPointer<LLInventoryCallback> link_waiter);
void updateAgentWearables(LLWearableHoldingPattern* holder, bool append);
@@ -206,7 +207,6 @@ private:
bool follow_folder_links);
void purgeCategory(const LLUUID& category, bool keep_outfit_links);
- void purgeBaseOutfitLink(const LLUUID& category);
static void onOutfitRename(const LLSD& notification, const LLSD& response);
diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp
index 18d3ea7a47..117f28cc36 100755
--- a/indra/newview/llvoavatar.cpp
+++ b/indra/newview/llvoavatar.cpp
@@ -6462,6 +6462,10 @@ void LLVOAvatar::processAvatarAppearance( LLMessageSystem* mesgsys )
// Only now that we have result of appearance_version can we decide whether to bail out.
if( isSelf() )
{
+ LL_DEBUGS("Avatar") << "this_update_cof_version " << this_update_cof_version
+ << " last_update_request_cof_version " << last_update_request_cof_version
+ << " my_cof_version " << LLAppearanceMgr::instance().getCOFVersion() << llendl;
+
if (getRegion() && (getRegion()->getCentralBakeVersion()==0))
{
llwarns << avString() << "Received AvatarAppearance message for self in non-server-bake region" << llendl;