- internal : reviewed for SL-2.6.0

--HG--
branch : Appearance-Misc
meow-7.2.2
Kitty Barnett 2011-04-14 15:00:35 +02:00
parent 1b39b01000
commit 855272b1ea
12 changed files with 149 additions and 158 deletions

View File

@ -13,6 +13,9 @@
-> 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 : deprecated removeItemFromAvatar() in favour of having LLAppearanceMgr::removeItemFromAvatar() handle it directly/correctly
-> wearables can't be worn/removed in 2.X without the viewer already having an LLWearable instance for it anyway
- changed : enable "Replace Current Outfit" on the base outfit if it's marked dirty

View File

@ -55,7 +55,7 @@
LLAgentWearables gAgentWearables;
BOOL LLAgentWearables::mInitialWearablesUpdateReceived = FALSE;
// [SL:KB] - Patch: Appearance-InitialWearablesLoadedCallback | Checked: 2010-08-14 (Catznip-2.5.0a) | Added: Catznip-2.1.1d
// [SL:KB] - Patch: Appearance-InitialWearablesLoadedCallback | Checked: 2010-08-14 (Catznip-2.6.0a) | Added: Catznip-2.1.1d
bool LLAgentWearables::mInitialWearablesLoaded = false;
// [/SL:KB]
@ -1451,7 +1451,7 @@ void LLAgentWearables::setWearableOutfit(const LLInventoryItem::item_array_t& it
// Start rendering & update the server
mWearablesLoaded = TRUE;
checkWearablesLoaded();
// [SL:KB] - Patch: Appearance-InitialWearablesLoadedCallback | Checked: 2010-09-22 (Catznip-2.5.0a) | Modified: Catznip-2.2.0a
// [SL:KB] - Patch: Appearance-InitialWearablesLoadedCallback | Checked: 2010-09-22 (Catznip-2.6.0a) | Modified: Catznip-2.2.0a
if (!mInitialWearablesLoaded)
{
mInitialWearablesLoaded = true;
@ -1736,7 +1736,7 @@ void LLAgentWearables::userRemoveAllClothesStep2(BOOL proceed)
// Combines userRemoveAllAttachments() and userAttachMultipleAttachments() logic to
// get attachments into desired state with minimal number of adds/removes.
//void LLAgentWearables::userUpdateAttachments(LLInventoryModel::item_array_t& obj_item_array)
// [SL:KB] - Patch: Appearance-SyncAttach | Checked: 2010-09-22 (Catznip-2.5.0a) | Added: Catznip-2.2.0a
// [SL:KB] - Patch: Appearance-SyncAttach | Checked: 2010-09-22 (Catznip-2.6.0a) | Added: Catznip-2.2.0a
void LLAgentWearables::userUpdateAttachments(LLInventoryModel::item_array_t& obj_item_array, bool fAttachOnly)
// [/SL:KB]
{
@ -1804,7 +1804,7 @@ void LLAgentWearables::userUpdateAttachments(LLInventoryModel::item_array_t& obj
// Remove everything in objects_to_remove
// userRemoveMultipleAttachments(objects_to_remove);
// [SL:KB] - Patch: Appearance-SyncAttach | Checked: 2010-09-22 (Catznip-2.5.0a) | Added: Catznip-2.2.0a
// [SL:KB] - Patch: Appearance-SyncAttach | Checked: 2010-09-22 (Catznip-2.6.0a) | Added: Catznip-2.2.0a
if (!fAttachOnly)
{
userRemoveMultipleAttachments(objects_to_remove);
@ -2120,7 +2120,7 @@ boost::signals2::connection LLAgentWearables::addLoadedCallback(loaded_callback_
return mLoadedSignal.connect(cb);
}
// [SL:KB] - Patch: Appearance-InitialWearablesLoadedCallback | Checked: 2010-08-14 (Catznip-2.5.0a) | Added: Catznip-2.1.1d
// [SL:KB] - Patch: Appearance-InitialWearablesLoadedCallback | Checked: 2010-08-14 (Catznip-2.6.0a) | Added: Catznip-2.1.1d
boost::signals2::connection LLAgentWearables::addInitialWearablesLoadedCallback(loaded_callback_t cb)
{
return mInitialWearablesLoadedSignal.connect(cb);

View File

@ -76,7 +76,7 @@ public:
BOOL isWearableCopyable(LLWearableType::EType type, U32 index /*= 0*/) const;
BOOL areWearablesLoaded() const;
// [SL:KB] - Patch: Appearance-InitialWearablesLoadedCallback | Checked: 2010-08-14 (Catznip-2.5.0a) | Added: Catznip-2.1.1d
// [SL:KB] - Patch: Appearance-InitialWearablesLoadedCallback | Checked: 2010-08-14 (Catznip-2.6.0a) | Added: Catznip-2.1.1d
bool areInitalWearablesLoaded() const { return mInitialWearablesLoaded; }
// [/SL:KB]
bool isCOFChangeInProgress() const { return mCOFChangeInProgress; }
@ -219,7 +219,7 @@ public:
typedef std::vector<LLViewerObject*> llvo_vec_t;
// static void userUpdateAttachments(LLInventoryModel::item_array_t& obj_item_array);
// [SL:KB] - Patch: Appearance-SyncAttach | Checked: 2010-09-22 (Catznip-2.5.0a) | Added: Catznip-2.2.0a
// [SL:KB] - Patch: Appearance-SyncAttach | Checked: 2010-09-22 (Catznip-2.6.0a) | Added: Catznip-2.2.0a
// Not the best way to go about this but other attempts changed far too much LL code to be a viable solution
static void userUpdateAttachments(LLInventoryModel::item_array_t& obj_item_array, bool fAttachOnly = false);
// [/SL:KB]
@ -241,7 +241,7 @@ 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.5.0a) | Added: Catznip-2.1.1d
// [SL:KB] - Patch: Appearance-InitialWearablesLoadedCallback | Checked: 2010-08-14 (Catznip-2.6.0a) | Added: Catznip-2.1.1d
boost::signals2::connection addInitialWearablesLoadedCallback(loaded_callback_t cb);
// [/SL:KB]
@ -251,7 +251,7 @@ 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.5.0a) | Added: Catznip-2.1.1d
// [SL:KB] - Patch: Appearance-InitialWearablesLoadedCallback | Checked: 2010-08-14 (Catznip-2.6.0a) | Added: Catznip-2.1.1d
loaded_signal_t mInitialWearablesLoadedSignal; // emitted once when the initial wearables are loaded
// [/SL:KB]
@ -264,7 +264,7 @@ private:
wearableentry_map_t mWearableDatas;
static BOOL mInitialWearablesUpdateReceived;
// [SL:KB] - Patch: Appearance-InitialWearablesLoadedCallback | Checked: 2010-08-14 (Catznip-2.5.0a) | Added: Catznip-2.2.0a
// [SL:KB] - Patch: Appearance-InitialWearablesLoadedCallback | Checked: 2010-08-14 (Catznip-2.6.0a) | Added: Catznip-2.2.0a
static bool mInitialWearablesLoaded;
// [/SL:KB]
BOOL mWearablesLoaded;

View File

@ -280,7 +280,7 @@ public:
void onWearableAssetFetch(LLWearable *wearable);
void onAllComplete();
// [SL:KB] - Patch: Appearance-COFCorruption | Checked: 2010-04-14 (Catznip-2.5.0a) | Added: Catznip-2.0.0a
// [SL:KB] - Patch: Appearance-COFCorruption | Checked: 2010-04-14 (Catznip-2.6.0a) | Added: Catznip-2.0.0a
bool pollStopped();
// [/SL:KB]
@ -362,7 +362,7 @@ void LLWearableHoldingPattern::eraseTypeToRecover(LLWearableType::EType type)
mTypesToRecover.erase(type);
}
// [SL:KB] - Patch: Appearance-SyncAttach | Checked: 2010-06-19 (Catznip-2.5.0a) | Added: Catznip-2.1.2a
// [SL:KB] - Patch: Appearance-SyncAttach | Checked: 2010-06-19 (Catznip-2.6.0a) | Added: Catznip-2.1.2a
// Fix for http://jira.secondlife.com/browse/VWR-18512
/*
void LLWearableHoldingPattern::setObjItems(const LLInventoryModel::item_array_t& items)
@ -467,7 +467,7 @@ void LLWearableHoldingPattern::onAllComplete()
llinfos << "Updating agent wearables with " << mResolved << " wearable items " << llendl;
LLAppearanceMgr::instance().updateAgentWearables(this, false);
// [SL:KB] - Patch: Appearance-SyncAttach | Checked: 2010-03-22 (Catznip-2.5.0a) | Added: Catznip-2.1.2a
// [SL:KB] - Patch: Appearance-SyncAttach | Checked: 2010-03-22 (Catznip-2.6.0a) | Added: Catznip-2.1.2a
// Fix for http://jira.secondlife.com/browse/VWR-18512
/*
// Update attachments to match those requested.
@ -508,7 +508,7 @@ bool LLWearableHoldingPattern::pollFetchCompletion()
{
llwarns << "skipping because LLWearableHolding pattern is invalid (superceded by later outfit request)" << llendl;
// [SL:KB] - Patch: Appearance-COFCorruption | Checked: 2010-04-14 (Catznip-2.5.0a) | Added: Catznip-2.0.0a
// [SL:KB] - Patch: Appearance-COFCorruption | Checked: 2010-04-14 (Catznip-2.6.0a) | Added: Catznip-2.0.0a
// 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;
@ -605,7 +605,7 @@ public:
{
llwarns << "skipping because LLWearableHolding pattern is invalid (superceded by later outfit request)" << llendl;
// [SL:KB] - Patch: Appearance-COFCorruption | Checked: 2010-04-14 (Catznip-2.5.0a) | Added: Catznip-2.0.0a
// [SL:KB] - Patch: Appearance-COFCorruption | Checked: 2010-04-14 (Catznip-2.6.0a) | Added: Catznip-2.0.0a
// 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]
@ -683,7 +683,7 @@ void LLWearableHoldingPattern::clearCOFLinksForMissingWearables()
}
}
// [SL:KB] - Patch: Appearance-COFCorruption | Checked: 2010-04-14 (Catznip-2.5.0a) | Added: Catznip-2.0.0a
// [SL:KB] - Patch: Appearance-COFCorruption | Checked: 2010-04-14 (Catznip-2.6.0a) | Added: Catznip-2.0.0a
bool LLWearableHoldingPattern::pollStopped()
{
// We have to keep on polling until we're sure that all callbacks have completed or they'll cause a crash
@ -1340,7 +1340,7 @@ bool LLAppearanceMgr::getCanReplaceCOF(const LLUUID& outfit_cat_id)
// Check whether it's the base outfit.
// if (outfit_cat_id.isNull() || outfit_cat_id == getBaseOutfitUUID())
// [SL:KB] - Patch: Appearance-Misc | Checked: 2010-09-21 (Catznip-2.5.0a) | Added: Catznip-2.1.2d
// [SL:KB] - Patch: Appearance-Misc | Checked: 2010-09-21 (Catznip-2.6.0a) | Added: Catznip-2.1.2d
if ( (outfit_cat_id.isNull()) || ((outfit_cat_id == getBaseOutfitUUID()) && (!isOutfitDirty())) )
// [/SL:KB]
{
@ -1416,7 +1416,7 @@ void LLAppearanceMgr::filterWearableItems(
if (size <= 0)
continue;
// S32 start_index = llmax(0,size-max_per_type);
// [SL:KB] - Patch: Appearance-Misc | Checked: 2010-05-11 (Catznip-2.5.0a) | Added: Catznip-2.0.0h
// [SL:KB] - Patch: Appearance-Misc | Checked: 2010-05-11 (Catznip-2.6.0a) | Added: Catznip-2.0.0h
S32 start_index =
llmax(0, size - ((LLAssetType::AT_BODYPART == LLWearableType::getAssetType((LLWearableType::EType)i)) ? 1 : max_per_type));
// [/SL:KB[
@ -1747,7 +1747,7 @@ void LLAppearanceMgr::updateAppearanceFromCOF(bool update_base_outfit_ordering)
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.5.0a) | Added: Catzip-2.4.0f
// [SL:KB] - Patch: Apperance-Misc | Checked: 2010-11-24 (Catznip-2.6.0a) | Added: Catzip-2.4.0f
// Since we're following folder links we might have picked up new duplicates, or exceeded MAX_CLOTHING_PER_TYPE
removeDuplicateItems(wear_items);
removeDuplicateItems(obj_items);
@ -1758,7 +1758,7 @@ void LLAppearanceMgr::updateAppearanceFromCOF(bool update_base_outfit_ordering)
dumpItemArray(wear_items,"asset_dump: wear_item");
dumpItemArray(obj_items,"asset_dump: obj_item");
// [SL:KB] - Patch: Appearance-SyncAttach | Checked: 2010-09-22 (Catznip-2.5.0a) | Added: Catznip-2.2.0a
// [SL:KB] - Patch: Appearance-SyncAttach | Checked: 2010-09-22 (Catznip-2.6.0a) | Added: Catznip-2.2.0a
// Update attachments to match those requested.
if (isAgentAvatarValid())
{
@ -2610,9 +2610,9 @@ void LLAppearanceMgr::removeItemFromAvatar(const LLUUID& id_to_remove)
// //*TODO move here the exact removing code from LLWearableBridge::removeItemFromAvatar in the future
// LLWearableBridge::removeItemFromAvatar(item_to_remove);
// }
// [SL:KB] - Patch: Appearance-RemoveWearableFromAvatar | Checked: 2010-08-13 (Catznip-2.5.0a) | Added: Catznip-2.1.1d
// [SL:KB] - Patch: Appearance-RemoveWearableFromAvatar | Checked: 2010-08-13 (Catznip-2.6.0a) | Added: Catznip-2.1.1d
{
/*const*/ LLWearable* pWearable = gAgentWearables.getWearableFromItemID(item_to_remove->getLinkedUUID());
const LLWearable* pWearable = gAgentWearables.getWearableFromItemID(item_to_remove->getLinkedUUID());
if ( (pWearable) && (LLAssetType::AT_BODYPART != pWearable->getAssetType()) )
{
U32 idxWearable = gAgentWearables.getWearableIndex(pWearable);
@ -2771,7 +2771,7 @@ void LLAppearanceMgr::setAttachmentInvLinkEnable(bool val)
{
llinfos << "setAttachmentInvLinkEnable => " << (int) val << llendl;
mAttachmentInvLinkEnabled = val;
// [SL:KB] - Patch: Appearance-SyncAttach | Checked: 2010-10-05 (Catznip-2.5.0a) | Added: Catznip-2.2.0a
// [SL:KB] - Patch: Appearance-SyncAttach | Checked: 2010-10-05 (Catznip-2.6.0a) | Added: Catznip-2.2.0a
if (mAttachmentInvLinkEnabled)
{
linkPendingAttachments();
@ -2799,7 +2799,7 @@ 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.5.0a) | Added: Catznip-2.2.0a
// [SL:KB] - Patch: Appearance-SyncAttach | Checked: 2010-10-05 (Catznip-2.6.0a) | Added: Catznip-2.2.0a
if (isLinkInCOF(item_id))
{
return;
@ -2813,7 +2813,7 @@ void LLAppearanceMgr::registerAttachment(const LLUUID& item_id)
// it will trigger gAgentWariables.notifyLoadingFinished()
// But it is not acceptable solution. See EXT-7777
// LLAppearanceMgr::addCOFItemLink(item_id, false); // Add COF link for item.
// [SL:KB] - Patch: Appearance-SyncAttach | Checked: 2010-10-05 (Catznip-2.5.0a) | Modified: Catznip-2.2.0a
// [SL:KB] - Patch: Appearance-SyncAttach | Checked: 2010-10-05 (Catznip-2.6.0a) | Modified: Catznip-2.2.0a
LLPointer<LLInventoryCallback> cb = new LLRegisterAttachmentCallback();
LLAppearanceMgr::addCOFItemLink(item_id, false, cb); // Add COF link for item.
// [/SL:KB]
@ -2827,7 +2827,7 @@ 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.5.0a) | Added: Catznip-2.2.0a
// [SL:KB] - Patch: Appearance-SyncAttach | Checked: 2010-10-05 (Catznip-2.6.0a) | Added: Catznip-2.2.0a
uuid_vec_t::iterator itPendingAttachLink = std::find(mPendingAttachLinks.begin(), mPendingAttachLinks.end(), item_id);
if (itPendingAttachLink != mPendingAttachLinks.end())
{
@ -2845,7 +2845,7 @@ void LLAppearanceMgr::unregisterAttachment(const LLUUID& item_id)
}
}
// [SL:KB] - Patch: Appearance-SyncAttach | Checked: 2010-09-18 (Catznip-2.5.0a) | Modified: Catznip-2.2.0a
// [SL:KB] - Patch: Appearance-SyncAttach | Checked: 2010-09-18 (Catznip-2.6.0a) | Modified: Catznip-2.2.0a
void LLAppearanceMgr::linkPendingAttachments()
{
LLPointer<LLInventoryCallback> cb = NULL;

View File

@ -217,7 +217,7 @@ private:
std::auto_ptr<LLOutfitUnLockTimer> mUnlockOutfitTimer;
// [SL:KB] - Patch: Appearance-SyncAttach | Checked: 2010-09-18 (Catznip-2.5.0a) | Modified: Catznip-2.1.2e
// [SL:KB] - Patch: Appearance-SyncAttach | Checked: 2010-09-18 (Catznip-2.6.0a) | Modified: Catznip-2.1.2e
public:
void linkPendingAttachments();
void onRegisterAttachmentComplete(const LLUUID& idItem);
@ -251,7 +251,7 @@ private:
bool mUpdateBaseOrder;
};
// [SL:KB] - Patch: Appearance-SyncAttach | Checked: 2010-08-31 (Catznip-2.5.0a) | Added: Catznip-2.1.2a
// [SL:KB] - Patch: Appearance-SyncAttach | Checked: 2010-08-31 (Catznip-2.6.0a) | Added: Catznip-2.1.2a
class LLRegisterAttachmentCallback : public LLInventoryCallback
{
public:

View File

@ -2473,7 +2473,7 @@ void LLFolderBridge::folderOptionsMenu()
// 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.5.0a) | Added: Catznip-2.4.0e
// [SL:KB] - Patch: Appearance-Misc | Checked: 2010-11-24 (Catznip-2.6.0a) | Added: Catznip-2.4.0e
const bool is_outfit = (type == LLFolderType::FT_OUTFIT);
// [/SL:KB]
@ -2529,7 +2529,7 @@ void LLFolderBridge::folderOptionsMenu()
disabled_items.push_back(std::string("Remove From Outfit"));
}
// if (!LLAppearanceMgr::instance().getCanReplaceCOF(mUUID))
// [SL:KB] - Patch: Appearance-Misc | Checked: 2010-11-24 (Catznip-2.5.0a) | Added: Catznip-2.4.0e
// [SL:KB] - Patch: Appearance-Misc | Checked: 2010-11-24 (Catznip-2.6.0a) | Added: Catznip-2.4.0e
if ( ((is_outfit) && (!LLAppearanceMgr::instance().getCanReplaceCOF(mUUID))) ||
((!is_outfit) && (gAgentWearables.isCOFChangeInProgress())) )
// [/SL:KB]
@ -4505,14 +4505,12 @@ void remove_inventory_category_from_avatar_step2( BOOL proceed, LLUUID category_
continue;
if (get_is_item_worn(item->getUUID()))
{
/*
LLWearableList::instance().getAsset(item->getAssetUUID(),
item->getName(),
item->getType(),
LLWearableBridge::onRemoveFromAvatarArrived,
new OnRemoveStruct(item->getLinkedUUID()));
*/
// [SL:KB] - Patch: Appearance-RemoveWearableFromAvatar | Checked: 2010-08-13 (Catznip-2.5.0a) | Added: Catznip-2.1.1d
// LLWearableList::instance().getAsset(item->getAssetUUID(),
// item->getName(),
// item->getType(),
// LLWearableBridge::onRemoveFromAvatarArrived,
// new OnRemoveStruct(item->getLinkedUUID()));
// [SL:KB] - Patch: Appearance-RemoveWearableFromAvatar | Checked: 2010-08-13 (Catznip-2.6.0a) | Added: Catznip-2.1.1d
LLAppearanceMgr::instance().removeItemFromAvatar(item->getUUID());
// [/SL:KB]
}
@ -4753,60 +4751,56 @@ void LLWearableBridge::wearAddOnAvatar()
}
// static
/*
void LLWearableBridge::onWearOnAvatarArrived( LLWearable* 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
{
llinfos << "By the time wearable asset arrived, its inv item already pointed to a different asset." << llendl;
}
}
}
delete item_id;
}
*/
//void LLWearableBridge::onWearOnAvatarArrived( LLWearable* 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
// {
// llinfos << "By the time wearable asset arrived, its inv item already pointed to a different asset." << llendl;
// }
// }
// }
// delete item_id;
//}
// static
// BAP remove the "add" code path once everything is fully COF-ified.
/*
void LLWearableBridge::onWearAddOnAvatarArrived( LLWearable* 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
{
llinfos << "By the time wearable asset arrived, its inv item already pointed to a different asset." << llendl;
}
}
}
delete item_id;
}
*/
//void LLWearableBridge::onWearAddOnAvatarArrived( LLWearable* 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
// {
// llinfos << "By the time wearable asset arrived, its inv item already pointed to a different asset." << llendl;
// }
// }
// }
// delete item_id;
//}
// static
BOOL LLWearableBridge::canEditOnAvatar(void* user_data)
@ -4844,57 +4838,53 @@ BOOL LLWearableBridge::canRemoveFromAvatar(void* user_data)
}
// static
/*
void LLWearableBridge::onRemoveFromAvatar(void* user_data)
{
LLWearableBridge* self = (LLWearableBridge*)user_data;
if(!self) return;
if(get_is_item_worn(self->mUUID))
{
LLViewerInventoryItem* item = self->getItem();
if (item)
{
LLUUID parent_id = item->getParentUUID();
LLWearableList::instance().getAsset(item->getAssetUUID(),
item->getName(),
item->getType(),
onRemoveFromAvatarArrived,
new OnRemoveStruct(LLUUID(self->mUUID)));
}
}
}
*/
//void LLWearableBridge::onRemoveFromAvatar(void* user_data)
//{
// LLWearableBridge* self = (LLWearableBridge*)user_data;
// if(!self) return;
// if(get_is_item_worn(self->mUUID))
// {
// LLViewerInventoryItem* item = self->getItem();
// if (item)
// {
// LLUUID parent_id = item->getParentUUID();
// LLWearableList::instance().getAsset(item->getAssetUUID(),
// item->getName(),
// item->getType(),
// onRemoveFromAvatarArrived,
// new OnRemoveStruct(LLUUID(self->mUUID)));
// }
// }
//}
// static
/*
void LLWearableBridge::onRemoveFromAvatarArrived(LLWearable* wearable,
void* userdata)
{
OnRemoveStruct *on_remove_struct = (OnRemoveStruct*) userdata;
const LLUUID &item_id = gInventory.getLinkedItemID(on_remove_struct->mUUID);
if(wearable)
{
if( get_is_item_worn( item_id ) )
{
LLWearableType::EType type = wearable->getType();
if( !(type==LLWearableType::WT_SHAPE || type==LLWearableType::WT_SKIN || type==LLWearableType::WT_HAIR || type==LLWearableType::WT_EYES ) ) //&&
//!((!gAgent.isTeen()) && ( type==LLWearableType::WT_UNDERPANTS || type==LLWearableType::WT_UNDERSHIRT )) )
{
bool do_remove_all = false;
U32 index = gAgentWearables.getWearableIndex(wearable);
gAgentWearables.removeWearable( type, do_remove_all, index );
}
}
}
// Find and remove this item from the COF.
LLAppearanceMgr::instance().removeCOFItemLinks(item_id,false);
gInventory.notifyObservers();
delete on_remove_struct;
}
*/
//void LLWearableBridge::onRemoveFromAvatarArrived(LLWearable* wearable,
// void* userdata)
//{
// OnRemoveStruct *on_remove_struct = (OnRemoveStruct*) userdata;
// const LLUUID &item_id = gInventory.getLinkedItemID(on_remove_struct->mUUID);
// if(wearable)
// {
// if( get_is_item_worn( item_id ) )
// {
// LLWearableType::EType type = wearable->getType();
//
// if( !(type==LLWearableType::WT_SHAPE || type==LLWearableType::WT_SKIN || type==LLWearableType::WT_HAIR || type==LLWearableType::WT_EYES ) ) //&&
// //!((!gAgent.isTeen()) && ( type==LLWearableType::WT_UNDERPANTS || type==LLWearableType::WT_UNDERSHIRT )) )
// {
// bool do_remove_all = false;
// U32 index = gAgentWearables.getWearableIndex(wearable);
// gAgentWearables.removeWearable( type, do_remove_all, index );
// }
// }
// }
//
// // Find and remove this item from the COF.
// LLAppearanceMgr::instance().removeCOFItemLinks(item_id,false);
// gInventory.notifyObservers();
//
// delete on_remove_struct;
//}
// static
void LLWearableBridge::removeAllClothesFromAvatar()
@ -4906,7 +4896,7 @@ void LLWearableBridge::removeAllClothesFromAvatar()
continue;
// for (S32 index = gAgentWearables.getWearableCount(itype)-1; index >= 0 ; --index)
// [SL:KB] - Patch: Appearance-Misc | Checked: 2010-09-04 (Catznip-2.5.0a) | Added: Catznip-2.1.2a
// [SL:KB] - Patch: Appearance-Misc | Checked: 2010-09-04 (Catznip-2.6.0a) | Added: Catznip-2.1.2a
for (S32 index = gAgentWearables.getWearableCount((LLWearableType::EType)itype)-1; index >= 0 ; --index)
// [/SL:KB]
{
@ -4934,14 +4924,12 @@ void LLWearableBridge::removeItemFromAvatar(LLViewerInventoryItem *item)
{
if (item)
{
/*
LLWearableList::instance().getAsset(item->getAssetUUID(),
item->getName(),
item->getType(),
LLWearableBridge::onRemoveFromAvatarArrived,
new OnRemoveStruct(item->getUUID()));
*/
// [SL:KB] - Patch: Appearance-RemoveWearableFromAvatar | Checked: 2010-08-13 (Catznip-2.5.0a) | Added: Catznip-2.1.1d
// LLWearableList::instance().getAsset(item->getAssetUUID(),
// item->getName(),
// item->getType(),
// LLWearableBridge::onRemoveFromAvatarArrived,
// new OnRemoveStruct(item->getUUID()));
// [SL:KB] - Patch: Appearance-RemoveWearableFromAvatar | Checked: 2010-08-13 (Catznip-2.6.0a) | Added: Catznip-2.1.1d
LLAppearanceMgr::instance().removeItemFromAvatar(item->getUUID());
// [/SL:KB]
}

View File

@ -1623,7 +1623,7 @@ EAcceptance LLToolDragAndDrop::dad3dRezAttachmentFromInv(
if (mSource == SOURCE_LIBRARY)
{
// LLPointer<LLInventoryCallback> cb = new RezAttachmentCallback(0);
// [SL:KB] - Patch: Appearance-Misc | Checked: 2010-09-28 (Catznip-2.5.0a) | Added: Catznip-2.2.0a
// [SL:KB] - Patch: Appearance-Misc | Checked: 2010-09-28 (Catznip-2.6.0a) | Added: Catznip-2.2.0a
// Make this behave consistent with dad3dWearItem
LLPointer<LLInventoryCallback> cb = new RezAttachmentCallback(0, !(mask & MASK_CONTROL));
// [/SL:KB]
@ -1638,7 +1638,7 @@ EAcceptance LLToolDragAndDrop::dad3dRezAttachmentFromInv(
else
{
// rez_attachment(item, 0);
// [SL:KB] - Patch: Appearance-Misc | Checked: 2010-09-28 (Catznip-2.5.0a) | Added: Catznip-2.2.0a
// [SL:KB] - Patch: Appearance-Misc | Checked: 2010-09-28 (Catznip-2.6.0a) | Added: Catznip-2.2.0a
// Make this behave consistent with dad3dWearItem
rez_attachment(item, 0, !(mask & MASK_CONTROL));
// [/SL:KB]

View File

@ -948,7 +948,7 @@ void ModifiedCOFCallback::fire(const LLUUID& inv_item)
}
//RezAttachmentCallback::RezAttachmentCallback(LLViewerJointAttachment *attachmentp)
// [SL:KB] - Patch: Appearance-Misc | Checked: 2010-09-28 (Catznip-2.5.0a) | Added: Catznip-2.2.0a
// [SL:KB] - Patch: Appearance-Misc | Checked: 2010-09-28 (Catznip-2.6.0a) | Added: Catznip-2.2.0a
RezAttachmentCallback::RezAttachmentCallback(LLViewerJointAttachment *attachmentp, bool replace)
: mAttach(attachmentp), mReplace(replace)
// [/SL:KB]
@ -968,7 +968,7 @@ void RezAttachmentCallback::fire(const LLUUID& inv_item)
if (item)
{
// rez_attachment(item, mAttach);
// [SL:KB] - Patch: Appearance-Misc | Checked: 2010-09-28 (Catznip-2.5.0a) | Added: Catznip-2.2.0a
// [SL:KB] - Patch: Appearance-Misc | Checked: 2010-09-28 (Catznip-2.6.0a) | Added: Catznip-2.2.0a
rez_attachment(item, mAttach, mReplace);
// [/SL:KB]
}

View File

@ -264,7 +264,7 @@ class RezAttachmentCallback : public LLInventoryCallback
{
public:
// RezAttachmentCallback(LLViewerJointAttachment *attachmentp);
// [SL:KB] - Patch: Appearance-Misc | Checked: 2010-09-28 (Catznip-2.5.0a) | Added: Catznip-2.2.0a
// [SL:KB] - Patch: Appearance-Misc | Checked: 2010-09-28 (Catznip-2.6.0a) | Added: Catznip-2.2.0a
RezAttachmentCallback(LLViewerJointAttachment *attachmentp, bool replace = false);
// [/SL:KB]
void fire(const LLUUID& inv_item);
@ -274,7 +274,7 @@ protected:
private:
LLViewerJointAttachment* mAttach;
// [SL:KB] - Patch: Appearance-Misc | Checked: 2010-09-28 (Catznip-2.5.0a) | Added: Catznip-2.2.0a
// [SL:KB] - Patch: Appearance-Misc | Checked: 2010-09-28 (Catznip-2.6.0a) | Added: Catznip-2.2.0a
bool mReplace;
// [/SL:KB]
};

View File

@ -169,7 +169,7 @@ BOOL LLViewerJointAttachment::addObject(LLViewerObject* object)
// re-connect object to the joint correctly
}
// [SL:KB] - Patch: Appearance-Misc | Checked: Catznip-2.4.0h (2011-01-13) | Added: Catznip-2.4.0h
// [SL:KB] - Patch: Appearance-Misc | Checked: Catznip-2.6.0a (2011-01-13) | Added: Catznip-2.4.0h
// 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]

View File

@ -5666,7 +5666,7 @@ LLViewerJointAttachment* LLVOAvatar::getTargetAttachmentPoint(LLViewerObject* vi
{
llwarns << "Object attachment point invalid: " << attachmentID << llendl;
// attachment = get_if_there(mAttachmentPoints, 1, (LLViewerJointAttachment*)NULL); // Arbitrary using 1 (chest)
// [SL:KB] - Patch: Appearance-LegacyMultiAttachment | Checked: 2010-08-28 (Catznip-2.5.0a) | Added: Catznip-2.1.2a
// [SL:KB] - Patch: Appearance-LegacyMultiAttachment | Checked: 2010-08-28 (Catznip-2.6.0a) | Added: Catznip-2.1.2a
S32 idxAttachPt = 1;
if ( (!isSelf()) && (gSavedSettings.getBOOL("LegacyMultiAttachmentSupport")) && (attachmentID > 38) && (attachmentID <= 68) )
idxAttachPt = attachmentID - 38;
@ -6128,7 +6128,7 @@ BOOL LLVOAvatar::isFullyLoaded() const
// return TRUE;
// else
// return mFullyLoaded;
// [SL:KB] - Patch: Appearance-SyncAttach | Checked: 2010-09-22 (Catznip-2.5.0a) | Added: Catznip-2.2.0a
// [SL:KB] - Patch: Appearance-SyncAttach | Checked: 2010-09-22 (Catznip-2.6.0a) | Added: Catznip-2.2.0a
// Changes to LLAppearanceMgr::updateAppearanceFromCOF() expect this function to actually return mFullyLoaded for gAgentAvatarp
if ( (!isSelf()) && (gSavedSettings.getBOOL("RenderUnloadedAvatar")) )
return TRUE;

View File

@ -96,7 +96,7 @@ void LLWearableList::processGetAssetReply( const char* filename, const LLAssetID
BOOL isNewWearable = FALSE;
LLWearableArrivedData* data = (LLWearableArrivedData*) userdata;
// LLWearable* wearable = NULL; // NULL indicates failure
// [SL:KB] - Patch: Appearance-Misc | Checked: 2010-08-13 (Catznip-2.5.0a) | Added: Catznip-2.1.1d
// [SL:KB] - Patch: Appearance-Misc | Checked: 2010-08-13 (Catznip-2.6.0a) | Added: Catznip-2.1.1d
LLWearable* wearable = get_if_there(LLWearableList::instance().mList, uuid, (LLWearable*)NULL);
if (wearable)
{