diff options
author | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2015-02-18 16:44:36 -0500 |
---|---|---|
committer | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2015-02-18 16:44:36 -0500 |
commit | 1f2404aa29249f94ec987a0fe9e9cc5fa1cd634b (patch) | |
tree | 8ed04fdecd53401ce7418d1449b3ae929a942677 /indra | |
parent | fad02b30ce61a38007c5cd450cbdd2e09464888d (diff) |
Logging for attachments and their COF links
Diffstat (limited to 'indra')
-rwxr-xr-x | indra/newview/llagentwearables.cpp | 12 | ||||
-rwxr-xr-x | indra/newview/llappearancemgr.cpp | 63 | ||||
-rwxr-xr-x | indra/newview/llattachmentsmgr.cpp | 7 |
3 files changed, 55 insertions, 27 deletions
diff --git a/indra/newview/llagentwearables.cpp b/indra/newview/llagentwearables.cpp index f06ffb4fb3..6f54e23e38 100755 --- a/indra/newview/llagentwearables.cpp +++ b/indra/newview/llagentwearables.cpp @@ -1344,6 +1344,7 @@ void LLAgentWearables::userRemoveMultipleAttachments(llvo_vec_t& objects_to_remo if (objects_to_remove.empty()) return; + LL_DEBUGS("Avatar") << "removing " << objects_to_remove.size() << " objects" << LL_ENDL; gMessageSystem->newMessage("ObjectDetach"); gMessageSystem->nextBlockFast(_PREHASH_AgentData); gMessageSystem->addUUIDFast(_PREHASH_AgentID, gAgent.getID()); @@ -1357,14 +1358,23 @@ void LLAgentWearables::userRemoveMultipleAttachments(llvo_vec_t& objects_to_remo //gAgentAvatarp->resetJointPositionsOnDetach(objectp); gMessageSystem->nextBlockFast(_PREHASH_ObjectData); gMessageSystem->addU32Fast(_PREHASH_ObjectLocalID, objectp->getLocalID()); + const LLUUID& item_id = objectp->getAttachmentItemID(); + LLViewerInventoryItem *item = gInventory.getItem(item_id); + LL_DEBUGS("Avatar") << "removing object, item is " << (item ? item->getName() : "UNKNOWN") << item_id << LL_ENDL; } gMessageSystem->sendReliable(gAgent.getRegionHost()); } +// FIXME this is basically the same code as LLAttachmentsMgr::onIdle() +// should consolidate. void LLAgentWearables::userAttachMultipleAttachments(LLInventoryModel::item_array_t& obj_item_array) { // Build a compound message to send all the objects that need to be rezzed. S32 obj_count = obj_item_array.size(); + if (obj_count > 0) + { + LL_DEBUGS("Avatar") << "attaching multiple, total obj_count " << obj_count << LL_ENDL; + } // Limit number of packets to send const S32 MAX_PACKETS_TO_SEND = 10; @@ -1396,6 +1406,8 @@ void LLAgentWearables::userAttachMultipleAttachments(LLInventoryModel::item_arra } const LLInventoryItem* item = obj_item_array.at(i).get(); + LL_DEBUGS("Avatar") << "requesting " << item->getName() + << " " << item->getLinkedUUID() << LL_ENDL; msg->nextBlockFast(_PREHASH_ObjectData ); msg->addUUIDFast(_PREHASH_ItemID, item->getLinkedUUID()); msg->addUUIDFast(_PREHASH_OwnerID, item->getPermissions().getOwner()); diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp index d7ef5fcba7..ac619631c0 100755 --- a/indra/newview/llappearancemgr.cpp +++ b/indra/newview/llappearancemgr.cpp @@ -3898,37 +3898,48 @@ void dumpAttachmentSet(const std::set<LLUUID>& atts, const std::string& msg) void LLAppearanceMgr::registerAttachment(const LLUUID& item_id) { - gInventory.addChangedMask(LLInventoryObserver::LABEL, item_id); - - if (mAttachmentInvLinkEnabled) - { - // 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 - if (!isLinkedInCOF(item_id)) - { - LLPointer<LLInventoryCallback> cb = new LLUpdateAppearanceOnDestroy(); - LLAppearanceMgr::addCOFItemLink(item_id, cb); // Add COF link for item. - } - } - else - { - //LL_INFOS() << "no link changes, inv link not enabled" << LL_ENDL; - } + LLViewerInventoryItem *item = gInventory.getItem(item_id); + LL_DEBUGS("Avatar") << "registering attachment " + << (item ? item->getName() : "UNKNOWN") << " " << item_id << LL_ENDL; + gInventory.addChangedMask(LLInventoryObserver::LABEL, item_id); + + if (mAttachmentInvLinkEnabled) + { + // 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 + if (!isLinkedInCOF(item_id)) + { + LL_DEBUGS("Avatar") << "adding COF link for attachment " + << (item ? item->getName() : "UNKNOWN") << " " << item_id << LL_ENDL; + // FIXME replace with just a call to request bake update? + LLPointer<LLInventoryCallback> cb = new LLUpdateAppearanceOnDestroy(); + LLAppearanceMgr::addCOFItemLink(item_id, cb); // Add COF link for item. + } + } + else + { + //LL_INFOS() << "no link changes, inv link not enabled" << LL_ENDL; + } } void LLAppearanceMgr::unregisterAttachment(const LLUUID& item_id) { - gInventory.addChangedMask(LLInventoryObserver::LABEL, item_id); + LLViewerInventoryItem *item = gInventory.getItem(item_id); + LL_DEBUGS("Avatar") << "unregistering attachment " + << (item ? item->getName() : "UNKNOWN") << " " << item_id << LL_ENDL; + gInventory.addChangedMask(LLInventoryObserver::LABEL, item_id); - if (mAttachmentInvLinkEnabled) - { - LLAppearanceMgr::removeCOFItemLinks(item_id); - } - else - { - //LL_INFOS() << "no link changes, inv link not enabled" << LL_ENDL; - } + if (mAttachmentInvLinkEnabled) + { + LL_DEBUGS("Avatar") << "removing COF link for attachment " + << (item ? item->getName() : "UNKNOWN") << " " << item_id << LL_ENDL; + LLAppearanceMgr::removeCOFItemLinks(item_id); + } + else + { + //LL_INFOS() << "no link changes, inv link not enabled" << LL_ENDL; + } } BOOL LLAppearanceMgr::getIsInCOF(const LLUUID& obj_id) const diff --git a/indra/newview/llattachmentsmgr.cpp b/indra/newview/llattachmentsmgr.cpp index 256980eb04..d7c4a24fb5 100755 --- a/indra/newview/llattachmentsmgr.cpp +++ b/indra/newview/llattachmentsmgr.cpp @@ -60,6 +60,8 @@ void LLAttachmentsMgr::onIdle(void *) LLAttachmentsMgr::instance().onIdle(); } +// FIXME this is basically the same code as LLAgentWearables::userAttachMultipleAttachments(), +// should consolidate. void LLAttachmentsMgr::onIdle() { // Make sure we got a region before trying anything else @@ -73,7 +75,8 @@ void LLAttachmentsMgr::onIdle() { return; } - + LL_DEBUGS("Avatar") << "attaching multiple, total obj_count " << obj_count << LL_ENDL; + // Limit number of packets to send const S32 MAX_PACKETS_TO_SEND = 10; const S32 OBJECTS_PER_PACKET = 4; @@ -113,6 +116,8 @@ void LLAttachmentsMgr::onIdle() LL_INFOS() << "Attempted to add non-existant item ID:" << attachment.mItemID << LL_ENDL; continue; } + LL_DEBUGS("Avatar") << "requesting " << item->getName() + << " " << item->getLinkedUUID() << LL_ENDL; S32 attachment_pt = attachment.mAttachmentPt; if (attachment.mAdd) attachment_pt |= ATTACHMENT_ADD; |