Merged with default tip (Revision a82eb9becc15)

--HG--
branch : Appearance-Misc
master
Kitty Barnett 2015-06-25 01:24:12 +02:00
commit eed94f728f
21 changed files with 498 additions and 166 deletions

View File

@ -0,0 +1 @@
c80f62a45fc274eb449fd5383f5b3b5d20fd85e3

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>65247</integer>
</map>
<key>AlertedUnsupportedHardware</key>
<map>
<key>Comment</key>

View File

@ -57,6 +57,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;
@ -1107,6 +1110,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.
@ -1584,6 +1594,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

@ -612,16 +612,20 @@ public:
bool pollMissingWearables();
bool isMissingCompleted();
void recoverMissingWearable(LLWearableType::EType type);
void clearCOFLinksForMissingWearables();
// void clearCOFLinksForMissingWearables();
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();
@ -631,7 +635,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;
@ -708,10 +712,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)
{
@ -818,52 +823,52 @@ 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();
if (objects_to_remove.size() || items_to_add.size())
{
LL_DEBUGS("Avatar") << "ATT will remove " << objects_to_remove.size()
<< " and add " << items_to_add.size() << " items" << LL_ENDL;
}
// 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();
//
// if (objects_to_remove.size() || items_to_add.size())
// {
// LL_DEBUGS("Avatar") << "ATT will remove " << objects_to_remove.size()
// << " and add " << items_to_add.size() << " items" << LL_ENDL;
// }
//
// // 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())
@ -901,6 +906,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();
@ -971,6 +982,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;
@ -1022,19 +1038,32 @@ bool LLWearableHoldingPattern::isMissingCompleted()
return mTypesToLink.size()==0 && mTypesToRecover.size()==0;
}
void LLWearableHoldingPattern::clearCOFLinksForMissingWearables()
//void LLWearableHoldingPattern::clearCOFLinksForMissingWearables()
//{
// for (found_list_t::iterator it = getFoundList().begin(); it != getFoundList().end(); ++it)
// {
// LLFoundData &data = *it;
// if ((data.mWearableType < LLWearableType::WT_COUNT) && (!data.mWearable))
// {
// // Wearable link that was never resolved; remove links to it from COF
// LL_INFOS("Avatar") << self_av_string() << "HP " << index() << " removing link for unresolved item " << data.mItemID.asString() << LL_ENDL;
// LLAppearanceMgr::instance().removeCOFItemLinks(data.mItemID);
// }
// }
//}
// [SL:KB] - Patch: Appearance-COFCorruption | Checked: 2010-04-14 (Catznip-2.0)
bool LLWearableHoldingPattern::pollStopped()
{
for (found_list_t::iterator it = getFoundList().begin(); it != getFoundList().end(); ++it)
// We have to keep on polling until we're sure that all callbacks have completed or they'll cause a crash
if ( (isFetchCompleted()) && (isMissingCompleted()) )
{
LLFoundData &data = *it;
if ((data.mWearableType < LLWearableType::WT_COUNT) && (!data.mWearable))
{
// Wearable link that was never resolved; remove links to it from COF
LL_INFOS("Avatar") << self_av_string() << "HP " << index() << " removing link for unresolved item " << data.mItemID.asString() << LL_ENDL;
LLAppearanceMgr::instance().removeCOFItemLinks(data.mItemID);
}
delete this;
return true;
}
return false;
}
// [/SL:KB]
bool LLWearableHoldingPattern::pollMissingWearables()
{
@ -1042,6 +1071,12 @@ bool LLWearableHoldingPattern::pollMissingWearables()
{
// 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();
@ -1430,7 +1465,10 @@ void LLAppearanceMgr::wearItemsOnAvatar(const uuid_vec_t& item_ids_to_wear,
{
LLUUID item_id = gAgentWearables.getWearableItemID(item_to_wear->getWearableType(),
wearable_count-1);
removeCOFItemLinks(item_id, cb);
// [SL:KB] - Patch: Appearance-AISFilter | Checked: 2015-05-02 (Catznip-3.7)
removeCOFItemLinks(item_id, NULL, true);
// [/SL:KB]
// removeCOFItemLinks(item_id, cb);
}
items_to_link.push_back(item_to_wear);
@ -1820,7 +1858,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;
}
@ -1929,7 +1970,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]);
@ -2254,14 +2298,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())
@ -2294,6 +2342,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");
@ -2305,6 +2360,45 @@ 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())
{
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");
@ -2319,7 +2413,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
@ -2824,7 +2918,10 @@ void LLAppearanceMgr::removeAllAttachmentsFromAvatar()
removeItemsFromAvatar(ids_to_remove);
}
void LLAppearanceMgr::removeCOFItemLinks(const LLUUID& item_id, LLPointer<LLInventoryCallback> cb)
//void LLAppearanceMgr::removeCOFItemLinks(const LLUUID& item_id, LLPointer<LLInventoryCallback> cb)
// [SL:KB] - Patch: Appearance-AISFilter | Checked: 2015-05-02 (Catznip-3.7)
void LLAppearanceMgr::removeCOFItemLinks(const LLUUID& item_id, LLPointer<LLInventoryCallback> cb, bool immediate_delete)
// [/SL:KB]
{
gInventory.addChangedMask(LLInventoryObserver::LABEL, item_id);
@ -2839,11 +2936,11 @@ void LLAppearanceMgr::removeCOFItemLinks(const LLUUID& item_id, LLPointer<LLInve
const LLInventoryItem* item = item_array.at(i).get();
if (item->getIsLinkType() && item->getLinkedUUID() == item_id)
{
bool immediate_delete = false;
if (item->getType() == LLAssetType::AT_OBJECT)
{
immediate_delete = true;
}
// bool immediate_delete = false;
// if (item->getType() == LLAssetType::AT_OBJECT)
// {
// immediate_delete = true;
// }
remove_inventory_item(item->getUUID(), cb, immediate_delete);
}
}
@ -3798,14 +3895,23 @@ void LLAppearanceMgr::wearBaseOutfit()
updateCOF(base_outfit_id);
}
void LLAppearanceMgr::removeItemsFromAvatar(const uuid_vec_t& ids_to_remove)
//void LLAppearanceMgr::removeItemsFromAvatar(const uuid_vec_t& ids_to_remove)
// [SL:KB] - Patch: Appearance-Misc | Checked: 2015-05-05 (Catznip-3.7)
void LLAppearanceMgr::removeItemsFromAvatar(const uuid_vec_t& ids_to_remove, LLPointer<LLInventoryCallback> cb /*= NULL*/, bool immediate_delete /*= false*/)
// [/SL:KB]
{
if (ids_to_remove.empty())
{
LL_WARNS() << "called with empty list, nothing to do" << LL_ENDL;
return;
}
LLPointer<LLInventoryCallback> cb = new LLUpdateAppearanceOnDestroy;
// LLPointer<LLInventoryCallback> cb = new LLUpdateAppearanceOnDestroy;
// [SL:KB] - Patch: Appearance-Misc | Checked: 2015-05-05 (Catznip-3.7)
if (!cb)
{
cb = new LLUpdateAppearanceOnDestroy;
}
// [/SL:KB]
for (uuid_vec_t::const_iterator it = ids_to_remove.begin(); it != ids_to_remove.end(); ++it)
{
const LLUUID& id_to_remove = *it;
@ -3815,16 +3921,25 @@ void LLAppearanceMgr::removeItemsFromAvatar(const uuid_vec_t& ids_to_remove)
{
LL_DEBUGS("Avatar") << "ATT removing attachment " << item->getName() << " id " << item->getUUID() << LL_ENDL;
}
removeCOFItemLinks(linked_item_id, cb);
// [SL:KB] - Patch: Appearance-Misc | Checked: 2015-05-05 (Catznip-3.7)
removeCOFItemLinks(linked_item_id, cb, immediate_delete);
// [/SL:KB]
// removeCOFItemLinks(linked_item_id, cb);
addDoomedTempAttachment(linked_item_id);
}
}
void LLAppearanceMgr::removeItemFromAvatar(const LLUUID& id_to_remove)
//void LLAppearanceMgr::removeItemFromAvatar(const LLUUID& id_to_remove)
// [SL:KB] - Patch: Appearance-Misc | Checked: 2015-05-05 (Catznip-3.7)
void LLAppearanceMgr::removeItemFromAvatar(const LLUUID& id_to_remove, LLPointer<LLInventoryCallback> cb /*= NULL*/, bool immediate_delete /*= false*/)
// [/SL:KB]
{
uuid_vec_t ids_to_remove;
ids_to_remove.push_back(id_to_remove);
removeItemsFromAvatar(ids_to_remove);
// [SL:KB] - Patch: Appearance-Misc | Checked: 2015-05-05 (Catznip-3.7)
removeItemsFromAvatar(ids_to_remove, cb, immediate_delete);
// [/SL:KB]
// removeItemsFromAvatar(ids_to_remove);
}

View File

@ -158,7 +158,10 @@ public:
bool isLinkedInCOF(const LLUUID& item_id);
// Remove COF entries
void removeCOFItemLinks(const LLUUID& item_id, LLPointer<LLInventoryCallback> cb = NULL);
// void removeCOFItemLinks(const LLUUID& item_id, LLPointer<LLInventoryCallback> cb = NULL);
// [SL:KB] - Patch: Appearance-AISFilter | Checked: 2015-05-02 (Catznip-3.7)
void removeCOFItemLinks(const LLUUID& item_id, LLPointer<LLInventoryCallback> cb = NULL, bool immediate_delete = false);
// [/SL:KB]
void removeCOFLinksOfType(LLWearableType::EType type, LLPointer<LLInventoryCallback> cb = NULL);
void removeAllClothesFromAvatar();
void removeAllAttachmentsFromAvatar();
@ -191,8 +194,15 @@ public:
bool updateBaseOutfit();
//Remove clothing or detach an object from the agent (a bodypart cannot be removed)
void removeItemsFromAvatar(const uuid_vec_t& item_ids);
void removeItemFromAvatar(const LLUUID& item_id);
// [SL:KB] - Patch: Appearance-Misc | Checked: 2015-05-05 (Catznip-3.7)
void removeItemFromAvatar(const LLUUID& id_to_remove) { removeItemFromAvatar(id_to_remove, NULL, false); }
void removeItemFromAvatar(const LLUUID& id_to_remove, LLPointer<LLInventoryCallback> cb /*= NULL*/, bool immediate_delete /*= false*/);
void removeItemsFromAvatar(const uuid_vec_t& ids_to_remove) { removeItemsFromAvatar(ids_to_remove, NULL, false); }
void removeItemsFromAvatar(const uuid_vec_t& ids_to_remove, LLPointer<LLInventoryCallback> cb /*= NULL*/, bool immediate_delete /*= false*/);
// [/SL:KB]
// void removeItemsFromAvatar(const uuid_vec_t& item_ids);
// void removeItemFromAvatar(const LLUUID& item_id);
void onOutfitFolderCreated(const LLUUID& folder_id, bool show_panel);

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(),
@ -5872,56 +5883,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().isLinkedInCOF(id))
{
return TRUE;
}
// [SL:KB] - The code below causes problems across the board so it really just needs to go
// if (LLAppearanceMgr::instance().isLinkedInCOF(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

@ -6545,7 +6545,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 )