Merged with default tip (Revision a5fd4c198756)

--HG--
branch : Appearance-Misc
meow-7.2.2
Kitty Barnett 2015-06-23 22:00:42 +02:00
commit e396790bc9
21 changed files with 547 additions and 137 deletions

View File

@ -0,0 +1 @@
711d043c293320f2723c2210d03b2cec414c420d

View File

@ -0,0 +1,23 @@
[Appearance/Misc]
- fixed : LLAppearanceMgr::filterWearableItems() doesn't properly filter body parts
- fixed : LLWearableList::processGetAssetReply() creates multiple LLWearable instances for the same asset UUID
-> fix for http://jira.secondlife.com/browse/VWR-20608
- fixed : attachments sometimes detach only to instantly get reattached after logon
- fixed : Add to/Replace Outfit removes newly worn attachments on completion
-> fix for http://jira.secondlife.com/browse/VWR-18512
- fixed : "Replace Outfit" isn't available for non-outfit folders that don't contain a full set of body parts (eyes, hair base, skin and shape)
-> fix for http://jira.secondlife.com/browse/VWR-23972
- fixed : attachments that attach and then instantly detach don't have their COF link removed
- fixed : multiple LLWearableHoldingPattern instances lead to "COF corruption"
- fixed : get_is_item_worn() shouldn't make the assumption that items in COFs are always worn
- fixed : drag-and-drop wear behaviour of an attachment onto self isn't consistant with the drag-and-drop behaviour of wearables
-> normal-drop : replace wear
-> Ctrl-drop : add wear
- fixed : LLAppearanceMgr::registerAttachment() fails to (re)add a link for worn attachments that aren't linked to in COF at log-on
- fixed : LLViewerObject::getAttachmentItemID() sometimes returns the NULL UUID for the avatar's own attachments
- fixed : LLAppearanceMgr::updateAppearanceFromCOF() doesn't properly filter items collected from folder links
-> create an outfit with a folder link + "Replace Outfit" == wearables that exist in both COF and the linked folder will end up worn multiple times
- changed : enable "Replace Current Outfit" on the base outfit if it's marked dirty
- changed : "RenderUnloadedAvatar" no longer affects the user's own avatar
-> side-effect of the fix above due to the change to LLVOAvatar::isFullyLoaded()
- added : InitialWearablesLoadedSignal signal which is emitted *once* when the initial wearables are loaded

View File

@ -93,7 +93,10 @@ LLWearableDictionary::LLWearableDictionary()
addEntry(LLWearableType::WT_ALPHA, new WearableEntry("alpha", "New Alpha", LLAssetType::AT_CLOTHING, LLInventoryType::ICONNAME_CLOTHING_ALPHA, FALSE, TRUE));
addEntry(LLWearableType::WT_TATTOO, new WearableEntry("tattoo", "New Tattoo", LLAssetType::AT_CLOTHING, LLInventoryType::ICONNAME_CLOTHING_TATTOO, FALSE, TRUE));
addEntry(LLWearableType::WT_PHYSICS, new WearableEntry("physics", "New Physics", LLAssetType::AT_CLOTHING, LLInventoryType::ICONNAME_CLOTHING_PHYSICS, TRUE, TRUE));
// [SL:KB] - Patch: Appearance-Misc | Checked: 2011-05-29 (Catznip-2.6)
addEntry(LLWearableType::WT_PHYSICS, new WearableEntry("physics", "New Physics", LLAssetType::AT_CLOTHING, LLInventoryType::ICONNAME_CLOTHING_PHYSICS, TRUE, FALSE));
// [/SL:KB]
// addEntry(LLWearableType::WT_PHYSICS, new WearableEntry("physics", "New Physics", LLAssetType::AT_CLOTHING, LLInventoryType::ICONNAME_CLOTHING_PHYSICS, TRUE, TRUE));
addEntry(LLWearableType::WT_INVALID, new WearableEntry("invalid", "Invalid Wearable", LLAssetType::AT_NONE, LLInventoryType::ICONNAME_NONE, FALSE, FALSE));
addEntry(LLWearableType::WT_NONE, new WearableEntry("none", "Invalid Wearable", LLAssetType::AT_NONE, LLInventoryType::ICONNAME_NONE, FALSE, FALSE));

View File

@ -104,6 +104,17 @@
<key>Value</key>
<integer>0</integer>
</map>
<key>AISCommandFilterMask</key>
<map>
<key>Comment</key>
<string>AIS command filter (death by Kitty if you change this)</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>U32</string>
<key>Value</key>
<integer>65263</integer>
</map>
<key>AlertedUnsupportedHardware</key>
<map>
<key>Comment</key>

View File

@ -56,6 +56,9 @@
LLAgentWearables gAgentWearables;
BOOL LLAgentWearables::mInitialWearablesUpdateReceived = FALSE;
// [SL:KB] - Patch: Appearance-InitialWearablesLoadedCallback | Checked: 2010-08-14 (Catznip-2.1)
bool LLAgentWearables::mInitialWearablesLoaded = false;
// [/SL:KB]
using namespace LLAvatarAppearanceDefines;
@ -1106,6 +1109,13 @@ void LLAgentWearables::setWearableOutfit(const LLInventoryItem::item_array_t& it
// Start rendering & update the server
mWearablesLoaded = TRUE;
// [SL:KB] - Patch: Appearance-InitialWearablesLoadedCallback | Checked: 2010-09-22 (Catznip-2.2)
if (!mInitialWearablesLoaded)
{
mInitialWearablesLoaded = true;
mInitialWearablesLoadedSignal();
}
// [/SL:KB]
notifyLoadingFinished();
// Copy wearable params to avatar.
@ -1611,6 +1621,13 @@ bool LLAgentWearables::changeInProgress() const
return mCOFChangeInProgress;
}
// [SL:KB] - Patch: Appearance-InitialWearablesLoadedCallback | Checked: 2010-08-14 (Catznip-2.1)
boost::signals2::connection LLAgentWearables::addInitialWearablesLoadedCallback(const loaded_callback_t& cb)
{
return mInitialWearablesLoadedSignal.connect(cb);
}
// [/SL:KB]
void LLAgentWearables::notifyLoadingStarted()
{
mCOFChangeInProgress = true;

View File

@ -71,6 +71,9 @@ public:
BOOL isWearableCopyable(LLWearableType::EType type, U32 index /*= 0*/) const;
BOOL areWearablesLoaded() const;
// [SL:KB] - Patch: Appearance-InitialWearablesLoadedCallback | Checked: 2010-08-14 (Catznip-2.1)
bool areInitalWearablesLoaded() const { return mInitialWearablesLoaded; }
// [/SL:KB]
bool isCOFChangeInProgress() const { return mCOFChangeInProgress; }
F32 getCOFChangeTime() const { return mCOFChangeTimer.getElapsedTimeF32(); }
void updateWearablesLoaded();
@ -196,6 +199,9 @@ public:
typedef boost::function<void()> loaded_callback_t;
typedef boost::signals2::signal<void()> loaded_signal_t;
boost::signals2::connection addLoadedCallback(loaded_callback_t cb);
// [SL:KB] - Patch: Appearance-InitialWearablesLoadedCallback | Checked: 2010-08-14 (Catznip-2.1)
boost::signals2::connection addInitialWearablesLoadedCallback(const loaded_callback_t& cb);
// [/SL:KB]
bool changeInProgress() const;
void notifyLoadingStarted();
@ -204,12 +210,18 @@ public:
private:
loading_started_signal_t mLoadingStartedSignal; // should be called before wearables are changed
loaded_signal_t mLoadedSignal; // emitted when all agent wearables get loaded
// [SL:KB] - Patch: Appearance-InitialWearablesLoadedCallback | Checked: 2010-08-14 (Catznip-2.1)
loaded_signal_t mInitialWearablesLoadedSignal; // emitted once when the initial wearables are loaded
// [/SL:KB]
//--------------------------------------------------------------------
// Member variables
//--------------------------------------------------------------------
private:
static BOOL mInitialWearablesUpdateReceived;
// [SL:KB] - Patch: Appearance-InitialWearablesLoadedCallback | Checked: 2010-08-14 (Catznip-2.2)
static bool mInitialWearablesLoaded;
// [/SL:KB]
BOOL mWearablesLoaded;
/**

View File

@ -32,6 +32,9 @@
#include "llcallbacklist.h"
#include "llinventorymodel.h"
#include "llsdutil.h"
// [SL:KB] - Patch: Appearance-AISFilter | Checked: 2015-03-01 (Catznip-3.7)
#include "llviewercontrol.h"
// [/SL:KB]
#include "llviewerregion.h"
#include "llinventoryobserver.h"
#include "llviewercontrol.h"
@ -121,11 +124,22 @@ void AISCommand::httpFailure()
}
//static
bool AISCommand::isAPIAvailable()
//bool AISCommand::isAPIAvailable()
// [SL:KB] - Patch: Appearance-AISFilter | Checked: 2015-03-01 (Catznip-3.7)
bool AISCommand::isAPIAvailable(EAISCommand cmd)
// [/SL:KB]
{
if (gAgent.getRegion())
{
return gAgent.getRegion()->isCapabilityAvailable("InventoryAPIv3");
// [SL:KB] - Patch: Appearance-AISFilter | Checked: 2015-03-01 (Catznip-3.7)
static LLCachedControl<U32> COMMAND_FILTER_MASK(gSavedSettings, "AISCommandFilterMask", U32_MAX);
bool aisAvailable = gAgent.getRegion()->isCapabilityAvailable("InventoryAPIv3");
return
(aisAvailable) &&
( (CMD_UNKNOWN == cmd) || ((U32)cmd & COMMAND_FILTER_MASK) );
// [/SL:KB]
// return gAgent.getRegion()->isCapabilityAvailable("InventoryAPIv3");
}
return false;
}

View File

@ -57,7 +57,24 @@ public:
/* virtual */ void httpSuccess();
/* virtual */ void httpFailure();
static bool isAPIAvailable();
// [SL:KB] - Patch: Appearance-AISFilter | Checked: 2015-03-01 (Catznip-3.7)
// The debug setting is an OR of these values
enum EAISCommand
{
CMD_UNKNOWN = 0x0000, // New or command we're not filtering for
CMD_CAT_UPDATE = 0x0001, // update_inventory_category
CMD_CAT_REMOVE = 0x0002, // remove_inventory_category
CMD_CAT_SLAM = 0x0004, // slam_inventory_folder
CMD_CAT_PURGE = 0x0008, // purge_descendents_of
CMD_ITEM_REMOVE = 0x0010, // remove_inventory_item
CMD_ITEM_UPDATE = 0x0020, // update_inventory_item
CMD_OBJ_LINK = 0x0100, // link_inventory_array
CMD_OBJ_LINKBATCH = 0x0200, // link_inventory_array
};
static bool isAPIAvailable(EAISCommand cmd = CMD_UNKNOWN);
// [/SL:KB]
// static bool isAPIAvailable();
static bool getInvCap(std::string& cap);
static bool getLibCap(std::string& cap);
static void getCapabilityNames(LLSD& capabilityNames);

View File

@ -608,11 +608,15 @@ public:
void onWearableAssetFetch(LLViewerWearable *wearable);
void onAllComplete();
// [SL:KB] - Patch: Appearance-COFCorruption | Checked: 2010-04-14 (Catznip-2.0)
bool pollStopped();
// [/SL:KB]
typedef std::list<LLFoundData> found_list_t;
found_list_t& getFoundList();
void eraseTypeToLink(LLWearableType::EType type);
void eraseTypeToRecover(LLWearableType::EType type);
void setObjItems(const LLInventoryModel::item_array_t& items);
// void setObjItems(const LLInventoryModel::item_array_t& items);
void setGestItems(const LLInventoryModel::item_array_t& items);
bool isMostRecent();
void handleLateArrivals();
@ -622,7 +626,7 @@ public:
private:
found_list_t mFoundList;
LLInventoryModel::item_array_t mObjItems;
// LLInventoryModel::item_array_t mObjItems;
LLInventoryModel::item_array_t mGestItems;
typedef std::set<S32> type_set_t;
type_set_t mTypesToRecover;
@ -699,10 +703,11 @@ void LLWearableHoldingPattern::eraseTypeToRecover(LLWearableType::EType type)
mTypesToRecover.erase(type);
}
void LLWearableHoldingPattern::setObjItems(const LLInventoryModel::item_array_t& items)
{
mObjItems = items;
}
// [SL:KB] - Patch: Appearance-SyncAttach | Checked: 2010-06-19 (Catznip-2.1)
//void LLWearableHoldingPattern::setObjItems(const LLInventoryModel::item_array_t& items)
//{
// mObjItems = items;
//}
void LLWearableHoldingPattern::setGestItems(const LLInventoryModel::item_array_t& items)
{
@ -809,46 +814,46 @@ void LLWearableHoldingPattern::onAllComplete()
if (isAgentAvatarValid())
{
LL_DEBUGS("Avatar") << self_av_string() << "Updating " << mObjItems.size() << " attachments" << LL_ENDL;
LLAgentWearables::llvo_vec_t objects_to_remove;
LLAgentWearables::llvo_vec_t objects_to_retain;
LLInventoryModel::item_array_t items_to_add;
LLAgentWearables::findAttachmentsAddRemoveInfo(mObjItems,
objects_to_remove,
objects_to_retain,
items_to_add);
LL_DEBUGS("Avatar") << self_av_string() << "Removing " << objects_to_remove.size()
<< " attachments" << LL_ENDL;
// Here we remove the attachment pos overrides for *all*
// attachments, even those that are not being removed. This is
// needed to get joint positions all slammed down to their
// pre-attachment states.
gAgentAvatarp->clearAttachmentPosOverrides();
// Take off the attachments that will no longer be in the outfit.
LLAgentWearables::userRemoveMultipleAttachments(objects_to_remove);
// LL_DEBUGS("Avatar") << self_av_string() << "Updating " << mObjItems.size() << " attachments" << LL_ENDL;
// LLAgentWearables::llvo_vec_t objects_to_remove;
// LLAgentWearables::llvo_vec_t objects_to_retain;
// LLInventoryModel::item_array_t items_to_add;
//
// LLAgentWearables::findAttachmentsAddRemoveInfo(mObjItems,
// objects_to_remove,
// objects_to_retain,
// items_to_add);
//
// LL_DEBUGS("Avatar") << self_av_string() << "Removing " << objects_to_remove.size()
// << " attachments" << LL_ENDL;
//
// // Here we remove the attachment pos overrides for *all*
// // attachments, even those that are not being removed. This is
// // needed to get joint positions all slammed down to their
// // pre-attachment states.
// gAgentAvatarp->clearAttachmentPosOverrides();
//
// // Take off the attachments that will no longer be in the outfit.
// LLAgentWearables::userRemoveMultipleAttachments(objects_to_remove);
// Update wearables.
LL_INFOS("Avatar") << self_av_string() << "HP " << index() << " updating agent wearables with "
<< mResolved << " wearable items " << LL_ENDL;
LLAppearanceMgr::instance().updateAgentWearables(this);
// Restore attachment pos overrides for the attachments that
// are remaining in the outfit.
for (LLAgentWearables::llvo_vec_t::iterator it = objects_to_retain.begin();
it != objects_to_retain.end();
++it)
{
LLViewerObject *objectp = *it;
gAgentAvatarp->addAttachmentPosOverridesForObject(objectp);
}
// // Restore attachment pos overrides for the attachments that
// // are remaining in the outfit.
// for (LLAgentWearables::llvo_vec_t::iterator it = objects_to_retain.begin();
// it != objects_to_retain.end();
// ++it)
// {
// LLViewerObject *objectp = *it;
// gAgentAvatarp->addAttachmentPosOverridesForObject(objectp);
// }
// Add new attachments to match those requested.
LL_DEBUGS("Avatar") << self_av_string() << "Adding " << items_to_add.size() << " attachments" << LL_ENDL;
LLAgentWearables::userAttachMultipleAttachments(items_to_add);
// // Add new attachments to match those requested.
// LL_DEBUGS("Avatar") << self_av_string() << "Adding " << items_to_add.size() << " attachments" << LL_ENDL;
// LLAgentWearables::userAttachMultipleAttachments(items_to_add);
}
if (isFetchCompleted() && isMissingCompleted())
@ -886,6 +891,12 @@ bool LLWearableHoldingPattern::pollFetchCompletion()
{
// runway skip here?
LL_WARNS() << self_av_string() << "skipping because LLWearableHolding pattern is invalid (superceded by later outfit request)" << LL_ENDL;
// [SL:KB] - Patch: Appearance-COFCorruption | Checked: 2010-04-14 (Catznip-2.0)
// If we were signalled to stop then we shouldn't do anything else except poll for when it's safe to delete ourselves
doOnIdleRepeating(boost::bind(&LLWearableHoldingPattern::pollStopped, this));
return true;
// [/SL:KB]
}
bool completed = isFetchCompleted();
@ -956,6 +967,11 @@ void recovered_item_cb(const LLUUID& item_id, LLWearableType::EType type, LLView
{
// runway skip here?
LL_WARNS() << self_av_string() << "skipping because LLWearableHolding pattern is invalid (superceded by later outfit request)" << LL_ENDL;
// [SL:KB] - Patch: Appearance-COFCorruption | Checked: 2010-04-14 (Catznip-2.0)
// If we were signalled to stop then we shouldn't do anything else except poll for when it's safe to delete ourselves
return;
// [/SL:KB]
}
LL_DEBUGS("Avatar") << self_av_string() << "Recovered item for type " << type << LL_ENDL;
@ -1021,12 +1037,31 @@ void LLWearableHoldingPattern::clearCOFLinksForMissingWearables()
}
}
// [SL:KB] - Patch: Appearance-COFCorruption | Checked: 2010-04-14 (Catznip-2.0)
bool LLWearableHoldingPattern::pollStopped()
{
// We have to keep on polling until we're sure that all callbacks have completed or they'll cause a crash
if ( (isFetchCompleted()) && (isMissingCompleted()) )
{
delete this;
return true;
}
return false;
}
// [/SL:KB]
bool LLWearableHoldingPattern::pollMissingWearables()
{
if (!isMostRecent())
{
// runway skip here?
LL_WARNS() << self_av_string() << "skipping because LLWearableHolding pattern is invalid (superceded by later outfit request)" << LL_ENDL;
// [SL:KB] - Patch: Appearance-COFCorruption | Checked: 2010-04-14 (Catznip-2.0)
// If we were signalled to stop then we shouldn't do anything else except poll for when it's safe to delete ourselves
doOnIdleRepeating(boost::bind(&LLWearableHoldingPattern::pollStopped, this));
return true;
// [/SL:KB]
}
bool timed_out = isTimedOut();
@ -1787,7 +1822,10 @@ bool LLAppearanceMgr::getCanReplaceCOF(const LLUUID& outfit_cat_id)
}
// Check whether it's the base outfit.
if (outfit_cat_id.isNull() || outfit_cat_id == getBaseOutfitUUID())
// if (outfit_cat_id.isNull() || outfit_cat_id == getBaseOutfitUUID())
// [SL:KB] - Patch: Appearance-Misc | Checked: 2010-09-21 (Catznip-2.1)
if ( (outfit_cat_id.isNull()) || ((outfit_cat_id == getBaseOutfitUUID()) && (!isOutfitDirty())) )
// [/SL:KB]
{
return false;
}
@ -1896,7 +1934,10 @@ void LLAppearanceMgr::filterWearableItems(
S32 size = items_by_type[i].size();
if (size <= 0)
continue;
S32 start_index = llmax(0,size-max_per_type);
// S32 start_index = llmax(0,size-max_per_type);
// [SL:KB] - Patch: Appearance-Misc | Checked: 2010-05-11 (Catznip-2.0)
S32 start_index = llmax(0, size - ((LLWearableType::getAllowMultiwear((LLWearableType::EType)i)) ? max_per_type : 1));
// [/SL:KB[
for (S32 j = start_index; j<size; j++)
{
items.push_back(items_by_type[i][j]);
@ -2221,14 +2262,18 @@ void LLAppearanceMgr::updateAppearanceFromCOF(bool enforce_item_restrictions,
{
//checking integrity of the COF in terms of ordering of wearables,
//checking and updating links' descriptions of wearables in the COF (before analyzed for "dirty" state)
// [SL:KB] - Patch: Appearance-AISFilter | Checked: 2015-03-01 (Catznip-3.7)
// Ordering information is pre-applied locally so no reason to reason to wait on the inventory backend
updateClothingOrderingInfo(LLUUID::null);
// [/SL:KB]
// As with enforce_item_restrictions handling above, we want
// to wait for the update callbacks, then (finally!) call
// updateAppearanceFromCOF() with no additional COF munging needed.
LLPointer<LLInventoryCallback> cb(
new LLUpdateAppearanceOnDestroy(false, false, post_update_func));
updateClothingOrderingInfo(LLUUID::null, cb);
return;
// // As with enforce_item_restrictions handling above, we want
// // to wait for the update callbacks, then (finally!) call
// // updateAppearanceFromCOF() with no additional COF munging needed.
// LLPointer<LLInventoryCallback> cb(
// new LLUpdateAppearanceOnDestroy(false, false, post_update_func));
// updateClothingOrderingInfo(LLUUID::null, cb);
// return;
}
if (!validateClothingOrderingInfo())
@ -2261,6 +2306,13 @@ void LLAppearanceMgr::updateAppearanceFromCOF(bool enforce_item_restrictions,
remove_non_link_items(wear_items);
remove_non_link_items(obj_items);
remove_non_link_items(gest_items);
// [SL:KB] - Patch: Apperance-Misc | Checked: 2010-11-24 (Catznip-2.4)
// Since we're following folder links we might have picked up new duplicates, or exceeded MAX_CLOTHING_LAYERS
removeDuplicateItems(wear_items);
removeDuplicateItems(obj_items);
removeDuplicateItems(gest_items);
filterWearableItems(wear_items, LLAgentWearables::MAX_CLOTHING_LAYERS, LLAgentWearables::MAX_CLOTHING_LAYERS);
// [/SL:KB]
dumpItemArray(wear_items,"asset_dump: wear_item");
dumpItemArray(obj_items,"asset_dump: obj_item");
@ -2272,6 +2324,66 @@ void LLAppearanceMgr::updateAppearanceFromCOF(bool enforce_item_restrictions,
<< " descendent_count " << cof->getDescendentCount()
<< " viewer desc count " << cof->getViewerDescendentCount() << LL_ENDL;
}
// [SL:KB] - Patch: Appearance-SyncAttach | Checked: 2010-09-22 (Catznip-2.2)
// Update attachments to match those requested.
if (isAgentAvatarValid())
{
// Include attachments which should be in COF but don't have their link created yet
uuid_vec_t::iterator itPendingAttachLink = mPendingAttachLinks.begin();
while (itPendingAttachLink != mPendingAttachLinks.end())
{
const LLUUID& idItem = *itPendingAttachLink;
if ( (!gAgentAvatarp->isWearingAttachment(idItem)) || (isLinkInCOF(idItem)) )
{
itPendingAttachLink = mPendingAttachLinks.erase(itPendingAttachLink);
continue;
}
LLViewerInventoryItem* pItem = gInventory.getItem(idItem);
if (pItem)
{
obj_items.push_back(pItem);
}
++itPendingAttachLink;
}
LL_DEBUGS("Avatar") << self_av_string() << "Updating " << obj_items.size() << " attachments" << LL_ENDL;
LLAgentWearables::llvo_vec_t objects_to_remove;
LLAgentWearables::llvo_vec_t objects_to_retain;
LLInventoryModel::item_array_t items_to_add;
LLAgentWearables::findAttachmentsAddRemoveInfo(obj_items, objects_to_remove, objects_to_retain, items_to_add);
// Here we remove the attachment pos overrides for *all*
// attachments, even those that are not being removed. This is
// needed to get joint positions all slammed down to their
// pre-attachment states.
gAgentAvatarp->clearAttachmentPosOverrides();
// Take off the attachments that will no longer be in the outfit.
// (but don't remove attachments until avatar is fully loaded - should reduce random attaching/detaching/reattaching at log-on)
if (gAgentAvatarp->isFullyLoaded())
{
LL_DEBUGS("Avatar") << self_av_string() << "Removing " << objects_to_remove.size() << " attachments" << LL_ENDL;
LLAgentWearables::userRemoveMultipleAttachments(objects_to_remove);
}
// Restore attachment pos overrides for the attachments that
// are remaining in the outfit.
for (LLAgentWearables::llvo_vec_t::iterator it = objects_to_retain.begin(); it != objects_to_retain.end(); ++it)
{
LLViewerObject *objectp = *it;
gAgentAvatarp->addAttachmentPosOverridesForObject(objectp);
}
// Add new attachments to match those requested.
LL_DEBUGS("Avatar") << self_av_string() << "Adding " << items_to_add.size() << " attachments" << LL_ENDL;
LLAgentWearables::userAttachMultipleAttachments(items_to_add);
}
// [/SL:KB]
if(!wear_items.size())
{
LLNotificationsUtil::add("CouldNotPutOnOutfit");
@ -2286,7 +2398,7 @@ void LLAppearanceMgr::updateAppearanceFromCOF(bool enforce_item_restrictions,
LLTimer hp_block_timer;
LLWearableHoldingPattern* holder = new LLWearableHoldingPattern;
holder->setObjItems(obj_items);
// holder->setObjItems(obj_items);
holder->setGestItems(gest_items);
// Note: can't do normal iteration, because if all the
@ -3783,6 +3895,9 @@ void LLAppearanceMgr::removeItemsFromAvatar(const uuid_vec_t& ids_to_remove)
const LLUUID& id_to_remove = *it;
const LLUUID& linked_item_id = gInventory.getLinkedItemID(id_to_remove);
removeCOFItemLinks(linked_item_id, cb);
// [SL:KB] - Patch: Appearance-SyncAttach | Checked: 2015-03-01 (Catznip-3.7)
clearPendingAttachment(linked_item_id);
// [/SL:KB]
addDoomedTempAttachment(linked_item_id);
}
}
@ -3792,6 +3907,9 @@ void LLAppearanceMgr::removeItemFromAvatar(const LLUUID& id_to_remove)
LLUUID linked_item_id = gInventory.getLinkedItemID(id_to_remove);
LLPointer<LLInventoryCallback> cb = new LLUpdateAppearanceOnDestroy;
removeCOFItemLinks(linked_item_id, cb);
// [SL:KB] - Patch: Appearance-SyncAttach | Checked: 2015-03-01 (Catznip-3.7)
clearPendingAttachment(linked_item_id);
// [/SL:KB]
addDoomedTempAttachment(linked_item_id);
}
@ -3956,6 +4074,12 @@ void LLAppearanceMgr::setAttachmentInvLinkEnable(bool val)
{
LL_DEBUGS("Avatar") << "setAttachmentInvLinkEnable => " << (int) val << LL_ENDL;
mAttachmentInvLinkEnabled = val;
// [SL:KB] - Patch: Appearance-SyncAttach | Checked: 2010-10-05 (Catznip-2.2)
if (mAttachmentInvLinkEnabled)
{
linkPendingAttachments();
}
// [/SL:KB]
}
void dumpAttachmentSet(const std::set<LLUUID>& atts, const std::string& msg)
@ -3978,6 +4102,13 @@ void dumpAttachmentSet(const std::set<LLUUID>& atts, const std::string& msg)
void LLAppearanceMgr::registerAttachment(const LLUUID& item_id)
{
gInventory.addChangedMask(LLInventoryObserver::LABEL, item_id);
// [SL:KB] - Patch: Appearance-SyncAttach | Checked: 2010-10-05 (Catznip-2.2)
if (isLinkInCOF(item_id))
{
return;
}
mPendingAttachLinks.push_back(item_id);
// [/SL:KB]
if (mAttachmentInvLinkEnabled)
{
@ -3986,8 +4117,12 @@ void LLAppearanceMgr::registerAttachment(const LLUUID& item_id)
// 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.
// [SL:KB] - Patch: Appearance-SyncAttach | Checked: 2010-10-05 (Catznip-2.2)
LLPointer<LLInventoryCallback> cb = new LLRegisterAttachmentCallback(item_id);
LLAppearanceMgr::addCOFItemLink(item_id, cb); // Add COF link for item.
// [/SL:KB]
// LLPointer<LLInventoryCallback> cb = new LLUpdateAppearanceOnDestroy();
// LLAppearanceMgr::addCOFItemLink(item_id, cb); // Add COF link for item.
}
}
else
@ -3999,6 +4134,9 @@ void LLAppearanceMgr::registerAttachment(const LLUUID& item_id)
void LLAppearanceMgr::unregisterAttachment(const LLUUID& item_id)
{
gInventory.addChangedMask(LLInventoryObserver::LABEL, item_id);
// [SL:KB] - Patch: Appearance-SyncAttach | Checked: 2010-10-05 (Catznip-2.2)
clearPendingAttachment(item_id);
// [/SL:KB]
if (mAttachmentInvLinkEnabled)
{
@ -4010,6 +4148,47 @@ void LLAppearanceMgr::unregisterAttachment(const LLUUID& item_id)
}
}
// [SL:KB] - Patch: Appearance-SyncAttach | Checked: 2010-09-18 (Catznip-2.2)
void LLAppearanceMgr::linkPendingAttachments()
{
LLPointer<LLInventoryCallback> cb = NULL;
for (uuid_vec_t::const_iterator itPendingAttachLink = mPendingAttachLinks.begin(); itPendingAttachLink != mPendingAttachLinks.end(); ++itPendingAttachLink)
{
const LLUUID& idAttachItem = *itPendingAttachLink;
if ( (gAgentAvatarp->isWearingAttachment(idAttachItem)) && (!isLinkInCOF(idAttachItem)) )
{
// if (!cb)
// cb = new LLRegisterAttachmentCallback(idAttachItem);
// One LLInventoryCallback instance should handle multiple items but thanks to AIS we don't currently have access to the UUIDs of the new links
// so we need one instance per needed link - yay for progress
cb = new LLRegisterAttachmentCallback(idAttachItem);
LLAppearanceMgr::addCOFItemLink(idAttachItem, cb);
}
}
}
void LLAppearanceMgr::clearPendingAttachment(const LLUUID& idItem)
{
uuid_vec_t::iterator itPendingAttachLink = std::find(mPendingAttachLinks.begin(), mPendingAttachLinks.end(), idItem);
if (itPendingAttachLink != mPendingAttachLinks.end())
{
mPendingAttachLinks.erase(itPendingAttachLink);
}
}
void LLAppearanceMgr::onRegisterAttachmentComplete(const LLUUID& idAttachItem)
{
// Remove the attachment from the pending list
clearPendingAttachment(idAttachItem);
// It may have been detached already in which case we should remove the COF link
if ( (isAgentAvatarValid()) && (!gAgentAvatarp->isWearingAttachment(idAttachItem)) )
{
removeCOFItemLinks(idAttachItem);
}
}
// [/SL:KB]
BOOL LLAppearanceMgr::getIsInCOF(const LLUUID& obj_id) const
{
const LLUUID& cof = getCOF();

View File

@ -277,6 +277,15 @@ private:
void addDoomedTempAttachment(const LLUUID& id_to_remove);
// [SL:KB] - Patch: Appearance-SyncAttach | Checked: 2010-09-18 (Catznip-2.1)
public:
void linkPendingAttachments();
void clearPendingAttachment(const LLUUID& idItem);
void onRegisterAttachmentComplete(const LLUUID& idAttachItem);
private:
uuid_vec_t mPendingAttachLinks;
// [/SL:KB]
//////////////////////////////////////////////////////////////////////////////////
// Item-specific convenience functions
public:
@ -307,6 +316,21 @@ private:
nullary_func_t mPostUpdateFunc;
};
// [SL:KB] - Patch: Appearance-SyncAttach | Checked: 2010-08-31 (Catznip-2.1)
class LLRegisterAttachmentCallback : public LLInventoryCallback
{
public:
LLRegisterAttachmentCallback(const LLUUID& idAttachItem) : m_idAttachItem(idAttachItem) {}
/*virtual*/ void fire(const LLUUID&)
{
// NOTE: AISCommand::getResponseUUID() currently returns false so the passed UUID is NULL and hence useless
LLAppearanceMgr::instance().onRegisterAttachmentComplete(m_idAttachItem);
}
protected:
LLUUID m_idAttachItem;
};
// [/SL:KB]
class LLUpdateAppearanceAndEditWearableOnDestroy: public LLInventoryCallback
{
public:

View File

@ -94,6 +94,9 @@
#include "llprogressview.h"
#include "llvocache.h"
#include "llvopartgroup.h"
// [SL:KB] - Patch: Appearance-Misc | Checked: 2013-02-12 (Catznip-3.4)
#include "llappearancemgr.h"
// [/SL:KB]
#include "llweb.h"
#include "llupdaterservice.h"
#include "llfloatertexturefetchdebugger.h"
@ -5496,6 +5499,11 @@ void LLAppViewer::disconnectViewer()
// close inventory interface, close all windows
LLFloaterInventory::cleanup();
// [SL:KB] - Patch: Appearance-Misc | Checked: 2013-02-12 (Catznip-3.4)
// Destroying all objects below will trigger attachment detaching code and attempt to remove the COF links for them
LLAppearanceMgr::instance().setAttachmentInvLinkEnable(false);
// [/SL:KB]
gAgentWearables.cleanup();
gAgentCamera.cleanup();
// Also writes cached agent settings to gSavedSettings

View File

@ -3562,6 +3562,9 @@ void LLFolderBridge::buildContextMenuFolderOptions(U32 flags, menuentry_vec_t&
// BAP change once we're no longer treating regular categories as ensembles.
const bool is_ensemble = (type == LLFolderType::FT_NONE ||
LLFolderType::lookupIsEnsembleType(type));
// [SL:KB] - Patch: Appearance-Misc | Checked: 2010-11-24 (Catznip-2.4)
const bool is_outfit = (type == LLFolderType::FT_OUTFIT);
// [/SL:KB]
// Only enable calling-card related options for non-system folders.
if (!is_system_folder)
@ -3620,7 +3623,11 @@ void LLFolderBridge::buildContextMenuFolderOptions(U32 flags, menuentry_vec_t&
{
disabled_items.push_back(std::string("Remove From Outfit"));
}
if (!LLAppearanceMgr::instance().getCanReplaceCOF(mUUID))
// if (!LLAppearanceMgr::instance().getCanReplaceCOF(mUUID))
// [SL:KB] - Patch: Appearance-Misc | Checked: 2010-11-24 (Catznip-2.4)
if ( ((is_outfit) && (!LLAppearanceMgr::instance().getCanReplaceCOF(mUUID))) ||
((!is_outfit) && (gAgentWearables.isCOFChangeInProgress())) )
// [/SL:KB]
{
disabled_items.push_back(std::string("Replace Outfit"));
}
@ -5373,7 +5380,11 @@ void LLObjectBridge::performAction(LLInventoryModel* model, std::string action)
else if(item && item->isFinished())
{
// must be in library. copy it to our inventory and put it on.
LLPointer<LLInventoryCallback> cb = new LLBoostFuncInventoryCallback(boost::bind(rez_attachment_cb, _1, (LLViewerJointAttachment*)0));
// LLPointer<LLInventoryCallback> cb = new LLBoostFuncInventoryCallback(boost::bind(rez_attachment_cb, _1, (LLViewerJointAttachment*)0));
// [SL:KB] - Patch: Appearance-DnDWear | Checked: 2013-02-04 (Catznip-3.4)
// "Wear" from inventory replaces, so library items should too
LLPointer<LLInventoryCallback> cb = new LLBoostFuncInventoryCallback(boost::bind(rez_attachment_cb, _1, (LLViewerJointAttachment*)0, true));
// [/SL;KB]
copy_inventory_item(
gAgent.getID(),
item->getPermissions().getOwner(),
@ -5896,56 +5907,56 @@ void LLWearableBridge::wearAddOnAvatar()
}
// static
void LLWearableBridge::onWearOnAvatarArrived( LLViewerWearable* wearable, void* userdata )
{
LLUUID* item_id = (LLUUID*) userdata;
if(wearable)
{
LLViewerInventoryItem* item = NULL;
item = (LLViewerInventoryItem*)gInventory.getItem(*item_id);
if(item)
{
if(item->getAssetUUID() == wearable->getAssetID())
{
gAgentWearables.setWearableItem(item, wearable);
gInventory.notifyObservers();
//self->getFolderItem()->refreshFromRoot();
}
else
{
LL_INFOS() << "By the time wearable asset arrived, its inv item already pointed to a different asset." << LL_ENDL;
}
}
}
delete item_id;
}
//void LLWearableBridge::onWearOnAvatarArrived( LLViewerWearable* wearable, void* userdata )
//{
// LLUUID* item_id = (LLUUID*) userdata;
// if(wearable)
// {
// LLViewerInventoryItem* item = NULL;
// item = (LLViewerInventoryItem*)gInventory.getItem(*item_id);
// if(item)
// {
// if(item->getAssetUUID() == wearable->getAssetID())
// {
// gAgentWearables.setWearableItem(item, wearable);
// gInventory.notifyObservers();
// //self->getFolderItem()->refreshFromRoot();
// }
// else
// {
// LL_INFOS() << "By the time wearable asset arrived, its inv item already pointed to a different asset." << LL_ENDL;
// }
// }
// }
// delete item_id;
//}
// static
// BAP remove the "add" code path once everything is fully COF-ified.
void LLWearableBridge::onWearAddOnAvatarArrived( LLViewerWearable* wearable, void* userdata )
{
LLUUID* item_id = (LLUUID*) userdata;
if(wearable)
{
LLViewerInventoryItem* item = NULL;
item = (LLViewerInventoryItem*)gInventory.getItem(*item_id);
if(item)
{
if(item->getAssetUUID() == wearable->getAssetID())
{
bool do_append = true;
gAgentWearables.setWearableItem(item, wearable, do_append);
gInventory.notifyObservers();
//self->getFolderItem()->refreshFromRoot();
}
else
{
LL_INFOS() << "By the time wearable asset arrived, its inv item already pointed to a different asset." << LL_ENDL;
}
}
}
delete item_id;
}
//void LLWearableBridge::onWearAddOnAvatarArrived( LLViewerWearable* wearable, void* userdata )
//{
// LLUUID* item_id = (LLUUID*) userdata;
// if(wearable)
// {
// LLViewerInventoryItem* item = NULL;
// item = (LLViewerInventoryItem*)gInventory.getItem(*item_id);
// if(item)
// {
// if(item->getAssetUUID() == wearable->getAssetID())
// {
// bool do_append = true;
// gAgentWearables.setWearableItem(item, wearable, do_append);
// gInventory.notifyObservers();
// //self->getFolderItem()->refreshFromRoot();
// }
// else
// {
// LL_INFOS() << "By the time wearable asset arrived, its inv item already pointed to a different asset." << LL_ENDL;
// }
// }
// }
// delete item_id;
//}
// static
BOOL LLWearableBridge::canEditOnAvatar(void* user_data)

View File

@ -523,10 +523,10 @@ public:
static void onWearOnAvatar( void* userdata ); // Access to wearOnAvatar() from menu
static BOOL canWearOnAvatar( void* userdata );
static void onWearOnAvatarArrived( LLViewerWearable* wearable, void* userdata );
// static void onWearOnAvatarArrived( LLViewerWearable* wearable, void* userdata );
void wearOnAvatar();
static void onWearAddOnAvatarArrived( LLViewerWearable* wearable, void* userdata );
// static void onWearAddOnAvatarArrived( LLViewerWearable* wearable, void* userdata );
void wearAddOnAvatar();
static BOOL canEditOnAvatar( void* userdata ); // Access to editOnAvatar() from menu

View File

@ -231,10 +231,11 @@ BOOL get_is_item_worn(const LLUUID& id)
return FALSE;
// Consider the item as worn if it has links in COF.
if (LLAppearanceMgr::instance().isLinkInCOF(id))
{
return TRUE;
}
// [SL:KB] - The code below causes problems across the board so it really just needs to go
// if (LLAppearanceMgr::instance().isLinkInCOF(id))
// {
// return TRUE;
// }
switch(item->getType())
{

View File

@ -1786,7 +1786,11 @@ EAcceptance LLToolDragAndDrop::dad3dRezAttachmentFromInv(
{
if(mSource == SOURCE_LIBRARY)
{
LLPointer<LLInventoryCallback> cb = new LLBoostFuncInventoryCallback(boost::bind(rez_attachment_cb, _1, (LLViewerJointAttachment*)0));
// LLPointer<LLInventoryCallback> cb = new LLBoostFuncInventoryCallback(boost::bind(rez_attachment_cb, _1, (LLViewerJointAttachment*)0));
// [SL:KB] - Patch: Appearance-DnDWear | Checked: 2010-09-28 (Catznip-2.2)
// Make this behave consistent with dad3dWearItem
LLPointer<LLInventoryCallback> cb = new LLBoostFuncInventoryCallback(boost::bind(rez_attachment_cb, _1, (LLViewerJointAttachment*)0, !(mask & MASK_CONTROL)));
// [/SL:KB]
copy_inventory_item(
gAgent.getID(),
item->getPermissions().getOwner(),
@ -1797,7 +1801,11 @@ EAcceptance LLToolDragAndDrop::dad3dRezAttachmentFromInv(
}
else
{
rez_attachment(item, 0);
// [SL:KB] - Patch: Appearance-DnDWear | Checked: 2010-09-28 (Catznip-2.2)
// Make this behave consistent with dad3dWearItem
rez_attachment(item, 0, !(mask & MASK_CONTROL));
// [/SL:KB]
// rez_attachment(item, 0);
}
}
return ACCEPT_YES_SINGLE;

View File

@ -121,7 +121,10 @@ void LLViewerAttachMenu::attachObjects(const uuid_vec_t& items, const std::strin
else if(item && item->isFinished())
{
// must be in library. copy it to our inventory and put it on.
LLPointer<LLInventoryCallback> cb = new LLBoostFuncInventoryCallback(boost::bind(rez_attachment_cb, _1, attachmentp));
// LLPointer<LLInventoryCallback> cb = new LLBoostFuncInventoryCallback(boost::bind(rez_attachment_cb, _1, attachmentp));
// [SL:KB] - Patch: Appearance-DnDWear | Checked: 2013-02-04 (Catznip-3.4)
LLPointer<LLInventoryCallback> cb = new LLBoostFuncInventoryCallback(boost::bind(rez_attachment_cb, _1, attachmentp, false));
// [/SL;KB]
copy_inventory_item(gAgent.getID(),
item->getPermissions().getOwner(),
item->getUUID(),

View File

@ -971,7 +971,10 @@ void LLInventoryCallbackManager::fire(U32 callback_id, const LLUUID& item_id)
}
}
void rez_attachment_cb(const LLUUID& inv_item, LLViewerJointAttachment *attachmentp)
//void rez_attachment_cb(const LLUUID& inv_item, LLViewerJointAttachment *attachmentp)
// [SL:KB] - Patch: Appearance-DnDWear | Checked: 2010-09-28 (Catznip-3.4)
void rez_attachment_cb(const LLUUID& inv_item, LLViewerJointAttachment *attachmentp, bool replace)
// [/SL:KB]
{
if (inv_item.isNull())
return;
@ -979,7 +982,10 @@ void rez_attachment_cb(const LLUUID& inv_item, LLViewerJointAttachment *attachme
LLViewerInventoryItem *item = gInventory.getItem(inv_item);
if (item)
{
rez_attachment(item, attachmentp);
// [SL:KB] - Patch: Appearance-DnDWear | Checked: 2010-09-28 (Catznip-3.4)
rez_attachment(item, attachmentp, replace);
// [/SL:KB]
// rez_attachment(item, attachmentp);
}
}
@ -1251,7 +1257,10 @@ void link_inventory_array(const LLUUID& category,
}
bool ais_ran = false;
if (AISCommand::isAPIAvailable())
// if (AISCommand::isAPIAvailable())
// [SL:KB] - Patch: Appearance-AISFilter | Checked: 2015-03-01 (Catznip-3.7)
if (AISCommand::isAPIAvailable( (baseobj_array.size() > 1) ? AISCommand::CMD_OBJ_LINKBATCH : AISCommand::CMD_OBJ_LINK ))
// [/SL:KB]
{
LLSD new_inventory = LLSD::emptyMap();
new_inventory["links"] = links;
@ -1317,7 +1326,10 @@ void update_inventory_item(
{
const LLUUID& item_id = update_item->getUUID();
bool ais_ran = false;
if (AISCommand::isAPIAvailable())
// if (AISCommand::isAPIAvailable())
// [SL:KB] - Patch: Appearance-AISFilter | Checked: 2015-03-01 (Catznip-3.7)
if (AISCommand::isAPIAvailable(AISCommand::CMD_ITEM_UPDATE))
// [/SL:KB]
{
LLSD updates = update_item->asLLSD();
// Replace asset_id and/or shadow_id with transaction_id (hash_id)
@ -1370,22 +1382,45 @@ void update_inventory_item(
const LLSD& updates,
LLPointer<LLInventoryCallback> cb)
{
// [SL:KB] - Patch: Appearance-AISFilter | Checked: 2015-03-01 (Catznip-3.7)
LLPointer<LLViewerInventoryItem> obj = gInventory.getItem(item_id);
LL_DEBUGS(LOG_INV) << "item_id: [" << item_id << "] name " << (obj ? obj->getName() : "(NOT FOUND)") << LL_ENDL;
LLPointer<LLViewerInventoryItem> new_item = NULL;
if (obj)
{
new_item = new LLViewerInventoryItem(obj);
new_item->fromLLSD(updates,false);
LLInventoryModel::LLCategoryUpdate up(new_item->getParentUUID(), 0);
gInventory.accountForUpdate(up);
gInventory.updateItem(new_item);
}
// [/SL:KB]
bool ais_ran = false;
if (AISCommand::isAPIAvailable())
// if (AISCommand::isAPIAvailable())
// [SL:KB] - Patch: Appearance-AISFilter | Checked: 2015-03-01 (Catznip-3.7)
if (AISCommand::isAPIAvailable(AISCommand::CMD_ITEM_UPDATE))
// [/SL:KB]
{
LLPointer<AISCommand> cmd_ptr = new UpdateItemCommand(item_id, updates, cb);
ais_ran = cmd_ptr->run_command();
}
if (!ais_ran)
{
LLPointer<LLViewerInventoryItem> obj = gInventory.getItem(item_id);
LL_DEBUGS(LOG_INV) << "item_id: [" << item_id << "] name " << (obj ? obj->getName() : "(NOT FOUND)") << LL_ENDL;
if(obj)
{
LLPointer<LLViewerInventoryItem> new_item(new LLViewerInventoryItem);
new_item->copyViewerItem(obj);
new_item->fromLLSD(updates,false);
// LLPointer<LLViewerInventoryItem> obj = gInventory.getItem(item_id);
// LL_DEBUGS(LOG_INV) << "item_id: [" << item_id << "] name " << (obj ? obj->getName() : "(NOT FOUND)") << LL_ENDL;
// if(obj)
// {
// LLPointer<LLViewerInventoryItem> new_item(new LLViewerInventoryItem);
// new_item->copyViewerItem(obj);
// new_item->fromLLSD(updates,false);
// [SL:KB] - Patch: Appearance-AISFilter | Checked: 2015-03-01 (Catznip-3.7)
if (new_item)
{
// [/SL:KB]
LLMessageSystem* msg = gMessageSystem;
msg->newMessageFast(_PREHASH_UpdateInventoryItem);
msg->nextBlockFast(_PREHASH_AgentData);
@ -1397,9 +1432,9 @@ void update_inventory_item(
new_item->packMessage(msg);
gAgent.sendReliableMessage();
LLInventoryModel::LLCategoryUpdate up(new_item->getParentUUID(), 0);
gInventory.accountForUpdate(up);
gInventory.updateItem(new_item);
// LLInventoryModel::LLCategoryUpdate up(new_item->getParentUUID(), 0);
// gInventory.accountForUpdate(up);
// gInventory.updateItem(new_item);
if (cb)
{
cb->fire(item_id);
@ -1426,7 +1461,10 @@ void update_inventory_category(
LLPointer<LLViewerInventoryCategory> new_cat = new LLViewerInventoryCategory(obj);
new_cat->fromLLSD(updates);
// FIXME - restore this once the back-end work has been done.
if (AISCommand::isAPIAvailable())
// if (AISCommand::isAPIAvailable())
// [SL:KB] - Patch: Appearance-AISFilter | Checked: 2015-03-01 (Catznip-3.7)
if (AISCommand::isAPIAvailable(AISCommand::CMD_CAT_UPDATE))
// [/SL:KB]
{
LLSD new_llsd = new_cat->asLLSD();
LLPointer<AISCommand> cmd_ptr = new UpdateCategoryCommand(cat_id, new_llsd, cb);
@ -1492,7 +1530,10 @@ void remove_inventory_item(
{
const LLUUID item_id(obj->getUUID());
LL_DEBUGS(LOG_INV) << "item_id: [" << item_id << "] name " << obj->getName() << LL_ENDL;
if (AISCommand::isAPIAvailable())
// if (AISCommand::isAPIAvailable())
// [SL:KB] - Patch: Appearance-AISFilter | Checked: 2015-03-01 (Catznip-3.7)
if (AISCommand::isAPIAvailable(AISCommand::CMD_ITEM_REMOVE))
// [/SL:KB]
{
LLPointer<AISCommand> cmd_ptr = new RemoveItemCommand(item_id, cb);
cmd_ptr->run_command();
@ -1568,7 +1609,10 @@ void remove_inventory_category(
LLNotificationsUtil::add("CannotRemoveProtectedCategories");
return;
}
if (AISCommand::isAPIAvailable())
// if (AISCommand::isAPIAvailable())
// [SL:KB] - Patch: Appearance-AISFilter | Checked: 2015-03-01 (Catznip-3.7)
if (AISCommand::isAPIAvailable(AISCommand::CMD_CAT_REMOVE))
// [/SL:KB]
{
LLPointer<AISCommand> cmd_ptr = new RemoveCategoryCommand(cat_id, cb);
cmd_ptr->run_command();
@ -1671,7 +1715,10 @@ void purge_descendents_of(const LLUUID& id, LLPointer<LLInventoryCallback> cb)
}
else
{
if (AISCommand::isAPIAvailable())
// if (AISCommand::isAPIAvailable())
// [SL:KB] - Patch: Appearance-AISFilter | Checked: 2015-03-01 (Catznip-3.7)
if (AISCommand::isAPIAvailable(AISCommand::CMD_CAT_PURGE))
// [/SL:KB]
{
LLPointer<AISCommand> cmd_ptr = new PurgeDescendentsCommand(id, cb);
cmd_ptr->run_command();
@ -1828,7 +1875,10 @@ void slam_inventory_folder(const LLUUID& folder_id,
const LLSD& contents,
LLPointer<LLInventoryCallback> cb)
{
if (AISCommand::isAPIAvailable())
// if (AISCommand::isAPIAvailable())
// [SL:KB] - Patch: Appearance-AISFilter | Checked: 2015-03-01 (Catznip-3.7)
if (AISCommand::isAPIAvailable(AISCommand::CMD_CAT_SLAM))
// [/SL:KB]
{
LL_DEBUGS(LOG_INV) << "using AISv3 to slam folder, id " << folder_id
<< " new contents: " << ll_pretty_print_sd(contents) << LL_ENDL;

View File

@ -248,7 +248,10 @@ public:
class LLViewerJointAttachment;
void rez_attachment_cb(const LLUUID& inv_item, LLViewerJointAttachment *attachmentp);
// [SL:KB] - Patch: Appearance-DnDWear | Checked: 2010-09-28 (Catznip-3.4)
void rez_attachment_cb(const LLUUID& inv_item, LLViewerJointAttachment *attachmentp, bool replace);
// [/SL:KB]
//void rez_attachment_cb(const LLUUID& inv_item, LLViewerJointAttachment *attachmentp);
void activate_gesture_cb(const LLUUID& inv_item);

View File

@ -166,7 +166,7 @@ void LLViewerJointAttachment::setupDrawable(LLViewerObject *object)
//-----------------------------------------------------------------------------
BOOL LLViewerJointAttachment::addObject(LLViewerObject* object)
{
object->extractAttachmentItemID();
// object->extractAttachmentItemID();
// Same object reattached
if (isObjectAttached(object))
@ -177,6 +177,11 @@ BOOL LLViewerJointAttachment::addObject(LLViewerObject* object)
// re-connect object to the joint correctly
}
// [SL:KB] - Patch: Appearance-Misc | Checked: 2011-01-13 (Catznip-2.4)
// LLViewerJointAttachment::removeObject() sets the object's item to the NULL UUID so we need to extract it *after* the block above
object->extractAttachmentItemID();
// [/SL:KB]
// Two instances of the same inventory item attached --
// Request detach, and kill the object in the meantime.
if (getAttachedObject(object->getAttachmentItemID()))

View File

@ -6519,7 +6519,11 @@ BOOL LLVOAvatar::processFullyLoadedChange(bool loading)
BOOL LLVOAvatar::isFullyLoaded() const
{
return (mRenderUnloadedAvatar || mFullyLoaded);
// [SL:KB] - Patch: Appearance-SyncAttach | Checked: 2010-09-22 (Catznip-2.2)
// Changes to LLAppearanceMgr::updateAppearanceFromCOF() expect this function to actually return mFullyLoaded for gAgentAvatarp
return (mRenderUnloadedAvatar && !isSelf()) ||(mFullyLoaded);
// [/SL:KB]
// return (mRenderUnloadedAvatar || mFullyLoaded);
}
bool LLVOAvatar::isTooComplex() const

View File

@ -99,7 +99,23 @@ void LLWearableList::processGetAssetReply( const char* filename, const LLAssetID
{
BOOL isNewWearable = FALSE;
LLWearableArrivedData* data = (LLWearableArrivedData*) userdata;
LLViewerWearable* wearable = NULL; // NULL indicates failure
// LLViewerWearable* wearable = NULL; // NULL indicates failure
// [SL:KB] - Patch: Appearance-Misc | Checked: 2010-08-13 (Catznip-2.1)
LLViewerWearable* wearable = get_if_there(LLWearableList::instance().mList, uuid, (LLViewerWearable*)NULL);
if (wearable)
{
LL_DEBUGS("Wearable") << "processGetAssetReply()" << LL_ENDL;
LL_DEBUGS("Wearable") << wearable << LL_ENDL;
if(data->mCallback)
{
data->mCallback(wearable, data->mUserdata);
}
delete data;
return;
}
// [/SL:KB]
LLAvatarAppearance *avatarp = data->mAvatarp;
if( !filename )