[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
- 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
- added : InitialWearablesLoadedSignal signal which is emitted *once* when the initial wearables are loaded
- fixed : attachments sometimes detach only to instantly get reattached after logon
- added : LegacyMultiAttachmentSupport debug setting to route "secondary attachment points" to the primary attachment point
-> maps secondary attachment point range [39,68] onto [1,30]
-> only dislays "secondary attachment points" correctly for *other* avatars (by design)
--HG--
branch : Appearance-Misc
meow-7.2.2
parent
894f649da7
commit
baa6794d0c
|
|
@ -0,0 +1,11 @@
|
|||
[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
|
||||
- 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
|
||||
- added : InitialWearablesLoadedSignal signal which is emitted *once* when the initial wearables are loaded
|
||||
- fixed : attachments sometimes detach only to instantly get reattached after logon
|
||||
- added : LegacyMultiAttachmentSupport debug setting to route "secondary attachment points" to the primary attachment point
|
||||
-> maps secondary attachment point range [39,68] onto [1,30]
|
||||
-> only dislays "secondary attachment points" correctly for *other* avatars (by design)
|
||||
|
|
@ -4394,6 +4394,17 @@
|
|||
<key>Value</key>
|
||||
<integer>0</integer>
|
||||
</map>
|
||||
<key>LegacyMultiAttachmentSupport</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Converts legacy "secondary attachment points" to multi-attachments for other avatars</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>Boolean</string>
|
||||
<key>Value</key>
|
||||
<integer>0</integer>
|
||||
</map>
|
||||
<key>LimitDragDistance</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
|
|
|
|||
|
|
@ -55,6 +55,9 @@
|
|||
LLAgentWearables gAgentWearables;
|
||||
|
||||
BOOL LLAgentWearables::mInitialWearablesUpdateReceived = FALSE;
|
||||
// [SL:KB] - Patch: Appearance-InitialWearablesLoadedCallback | Checked: 2010-08-14 (Catznip-2.1.2a) | Added: Catznip-2.1.1d
|
||||
bool LLAgentWearables::mInitialWearablesLoaded = false;
|
||||
// [/SL:KB]
|
||||
|
||||
using namespace LLVOAvatarDefines;
|
||||
|
||||
|
|
@ -2097,9 +2100,23 @@ boost::signals2::connection LLAgentWearables::addLoadedCallback(loaded_callback_
|
|||
return mLoadedSignal.connect(cb);
|
||||
}
|
||||
|
||||
// [SL:KB] - Patch: Appearance-InitialWearablesLoadedCallback | Checked: 2010-08-14 (Catznip-2.1.2a) | Added: Catznip-2.1.1d
|
||||
boost::signals2::connection LLAgentWearables::addInitialWearablesLoadedCallback(loaded_callback_t cb)
|
||||
{
|
||||
return mInitialWearablesLoadedSignal.connect(cb);
|
||||
}
|
||||
// [/SL:KB]
|
||||
|
||||
void LLAgentWearables::notifyLoadingStarted()
|
||||
{
|
||||
mCOFChangeInProgress = true;
|
||||
// [SL:KB] - Patch: Appearance-InitialWearablesLoadedCallback | Checked: 2010-08-14 (Catznip-2.1.2a) | Added: Catznip-2.1.1d
|
||||
if (!mInitialWearablesLoaded)
|
||||
{
|
||||
mInitialWearablesLoaded = true;
|
||||
mInitialWearablesLoadedSignal();
|
||||
}
|
||||
// [/SL:KB]
|
||||
mLoadingStartedSignal();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -76,6 +76,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.2a) | Added: Catznip-2.1.1d
|
||||
bool areInitalWearablesLoaded() const { return mInitialWearablesLoaded; }
|
||||
// [/SL:KB]
|
||||
bool isCOFChangeInProgress() const { return mCOFChangeInProgress; }
|
||||
void updateWearablesLoaded();
|
||||
void checkWearablesLoaded() const;
|
||||
|
|
@ -234,6 +237,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.2a) | Added: Catznip-2.1.1d
|
||||
boost::signals2::connection addInitialWearablesLoadedCallback(loaded_callback_t cb);
|
||||
// [/SL:KB]
|
||||
|
||||
void notifyLoadingStarted();
|
||||
void notifyLoadingFinished();
|
||||
|
|
@ -241,6 +247,9 @@ 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.2a) | Added: Catznip-2.1.1d
|
||||
loaded_signal_t mInitialWearablesLoadedSignal; // emitted once when the initial wearables are loaded
|
||||
// [/SL:KB]
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
// Member variables
|
||||
|
|
@ -251,6 +260,9 @@ private:
|
|||
wearableentry_map_t mWearableDatas;
|
||||
|
||||
static BOOL mInitialWearablesUpdateReceived;
|
||||
// [SL:KB] - Patch: Appearance-InitialWearablesLoadedCallback | Checked: 2010-08-14 (Catznip-2.1.2a) | Added: Catznip-2.1.1d
|
||||
static bool mInitialWearablesLoaded;
|
||||
// [/SL:KB]
|
||||
BOOL mWearablesLoaded;
|
||||
std::set<LLUUID> mItemsAwaitingWearableUpdate;
|
||||
|
||||
|
|
|
|||
|
|
@ -458,7 +458,11 @@ void LLWearableHoldingPattern::onAllComplete()
|
|||
LLAppearanceMgr::instance().updateAgentWearables(this, false);
|
||||
|
||||
// Update attachments to match those requested.
|
||||
if (isAgentAvatarValid())
|
||||
// if (isAgentAvatarValid())
|
||||
// [SL:KB] - Patch: Appearance-Misc | Checked: 2010-08-14 (Catznip-2.1.2a) | Modified: Catznip-2.1.1d
|
||||
// Don't update attachments until initial wearables have loaded (should reduce random attaching/detaching/reattaching at log-on)
|
||||
if ( (isAgentAvatarValid()) && (gAgentWearables.areInitalWearablesLoaded()) )
|
||||
// [/SL:KB]
|
||||
{
|
||||
llinfos << "Updating " << mObjItems.count() << " attachments" << llendl;
|
||||
LLAgentWearables::userUpdateAttachments(mObjItems);
|
||||
|
|
@ -1359,7 +1363,11 @@ 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.1.2a) | 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[
|
||||
for (S32 j = start_index; j<size; j++)
|
||||
{
|
||||
items.push_back(items_by_type[i][j]);
|
||||
|
|
@ -2501,11 +2509,27 @@ void LLAppearanceMgr::removeItemFromAvatar(const LLUUID& id_to_remove)
|
|||
switch (item_to_remove->getType())
|
||||
{
|
||||
case LLAssetType::AT_CLOTHING:
|
||||
if (get_is_item_worn(id_to_remove))
|
||||
// if (get_is_item_worn(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.1.2a) | Added: Catznip-2.1.1d
|
||||
{
|
||||
//*TODO move here the exact removing code from LLWearableBridge::removeItemFromAvatar in the future
|
||||
LLWearableBridge::removeItemFromAvatar(item_to_remove);
|
||||
/*const*/ LLWearable* pWearable = gAgentWearables.getWearableFromItemID(item_to_remove->getLinkedUUID());
|
||||
if ( (pWearable) && (LLAssetType::AT_BODYPART != pWearable->getAssetType()) )
|
||||
{
|
||||
U32 idxWearable = gAgentWearables.getWearableIndex(pWearable);
|
||||
if (idxWearable < LLAgentWearables::MAX_CLOTHING_PER_TYPE)
|
||||
{
|
||||
gAgentWearables.removeWearable(pWearable->getType(), false, idxWearable);
|
||||
|
||||
LLAppearanceMgr::instance().removeCOFItemLinks(item_to_remove->getLinkedUUID(), false);
|
||||
gInventory.notifyObservers();
|
||||
}
|
||||
}
|
||||
}
|
||||
// [/SL:KB]
|
||||
break;
|
||||
case LLAssetType::AT_OBJECT:
|
||||
LLVOAvatarSelf::detachAttachmentIntoInventory(item_to_remove->getLinkedUUID());
|
||||
|
|
|
|||
|
|
@ -4316,11 +4316,16 @@ 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.1.2a) | Added: Catznip-2.1.1d
|
||||
LLAppearanceMgr::instance().removeItemFromAvatar(item->getUUID());
|
||||
// [/SL:KB]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -4551,6 +4556,7 @@ void LLWearableBridge::wearAddOnAvatar()
|
|||
}
|
||||
|
||||
// static
|
||||
/*
|
||||
void LLWearableBridge::onWearOnAvatarArrived( LLWearable* wearable, void* userdata )
|
||||
{
|
||||
LLUUID* item_id = (LLUUID*) userdata;
|
||||
|
|
@ -4574,9 +4580,11 @@ void LLWearableBridge::onWearOnAvatarArrived( LLWearable* wearable, void* userda
|
|||
}
|
||||
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;
|
||||
|
|
@ -4601,6 +4609,7 @@ void LLWearableBridge::onWearAddOnAvatarArrived( LLWearable* wearable, void* use
|
|||
}
|
||||
delete item_id;
|
||||
}
|
||||
*/
|
||||
|
||||
// static
|
||||
BOOL LLWearableBridge::canEditOnAvatar(void* user_data)
|
||||
|
|
@ -4638,6 +4647,7 @@ BOOL LLWearableBridge::canRemoveFromAvatar(void* user_data)
|
|||
}
|
||||
|
||||
// static
|
||||
/*
|
||||
void LLWearableBridge::onRemoveFromAvatar(void* user_data)
|
||||
{
|
||||
LLWearableBridge* self = (LLWearableBridge*)user_data;
|
||||
|
|
@ -4656,8 +4666,10 @@ void LLWearableBridge::onRemoveFromAvatar(void* user_data)
|
|||
}
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
// static
|
||||
/*
|
||||
void LLWearableBridge::onRemoveFromAvatarArrived(LLWearable* wearable,
|
||||
void* userdata)
|
||||
{
|
||||
|
|
@ -4685,6 +4697,7 @@ void LLWearableBridge::onRemoveFromAvatarArrived(LLWearable* wearable,
|
|||
|
||||
delete on_remove_struct;
|
||||
}
|
||||
*/
|
||||
|
||||
// static
|
||||
void LLWearableBridge::removeAllClothesFromAvatar()
|
||||
|
|
@ -4721,11 +4734,16 @@ 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-Misc | Checked: 2010-08-13 (Catznip-2.1.2a) | Added: Catznip-2.1.1d
|
||||
LLAppearanceMgr::instance().removeItemFromAvatar(item->getUUID());
|
||||
// [/SL:KB]
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -470,10 +470,10 @@ public:
|
|||
|
||||
static void onWearOnAvatar( void* userdata ); // Access to wearOnAvatar() from menu
|
||||
static BOOL canWearOnAvatar( void* userdata );
|
||||
static void onWearOnAvatarArrived( LLWearable* wearable, void* userdata );
|
||||
// static void onWearOnAvatarArrived( LLWearable* wearable, void* userdata );
|
||||
void wearOnAvatar();
|
||||
|
||||
static void onWearAddOnAvatarArrived( LLWearable* wearable, void* userdata );
|
||||
// static void onWearAddOnAvatarArrived( LLWearable* wearable, void* userdata );
|
||||
void wearAddOnAvatar();
|
||||
|
||||
static BOOL canEditOnAvatar( void* userdata ); // Access to editOnAvatar() from menu
|
||||
|
|
@ -481,8 +481,8 @@ public:
|
|||
void editOnAvatar();
|
||||
|
||||
static BOOL canRemoveFromAvatar( void* userdata );
|
||||
static void onRemoveFromAvatar( void* userdata );
|
||||
static void onRemoveFromAvatarArrived( LLWearable* wearable, void* userdata );
|
||||
// static void onRemoveFromAvatar( void* userdata );
|
||||
// static void onRemoveFromAvatarArrived( LLWearable* wearable, void* userdata );
|
||||
static void removeItemFromAvatar(LLViewerInventoryItem *item);
|
||||
static void removeAllClothesFromAvatar();
|
||||
void removeFromAvatar();
|
||||
|
|
|
|||
|
|
@ -5585,7 +5585,13 @@ LLViewerJointAttachment* LLVOAvatar::getTargetAttachmentPoint(LLViewerObject* vi
|
|||
if (!attachment)
|
||||
{
|
||||
llwarns << "Object attachment point invalid: " << attachmentID << llendl;
|
||||
attachment = get_if_there(mAttachmentPoints, 1, (LLViewerJointAttachment*)NULL); // Arbitrary using 1 (chest)
|
||||
// attachment = get_if_there(mAttachmentPoints, 1, (LLViewerJointAttachment*)NULL); // Arbitrary using 1 (chest)
|
||||
// [SL:KB] - Patch: Appearance-LegacyMultiAttachment | Checked: 2010-08-28 (Catznip-2.1.2a) | Added: Catznip2.1.2a
|
||||
S32 idxAttachPt = 1;
|
||||
if ( (!isSelf()) && (gSavedSettings.getBOOL("LegacyMultiAttachmentSupport")) && (attachmentID > 38) && (attachmentID <= 68) )
|
||||
idxAttachPt = attachmentID - 38;
|
||||
attachment = get_if_there(mAttachmentPoints, idxAttachPt, (LLViewerJointAttachment*)NULL); // Arbitrary using 1 (chest)
|
||||
// [/SL:KB]
|
||||
}
|
||||
|
||||
return attachment;
|
||||
|
|
|
|||
|
|
@ -95,8 +95,18 @@ void LLWearableList::processGetAssetReply( const char* filename, const LLAssetID
|
|||
{
|
||||
BOOL isNewWearable = FALSE;
|
||||
LLWearableArrivedData* data = (LLWearableArrivedData*) userdata;
|
||||
LLWearable* wearable = NULL; // NULL indicates failure
|
||||
|
||||
// LLWearable* wearable = NULL; // NULL indicates failure
|
||||
// [SL:KB] - Patch: Appearance-Misc | Checked: 2010-08-13 (Catznip-2.1.2a) | Added: Catznip-2.1.1d
|
||||
LLWearable* wearable = get_if_there(LLWearableList::instance().mList, uuid, (LLWearable*)NULL);
|
||||
if (wearable)
|
||||
{
|
||||
if(data->mCallback)
|
||||
data->mCallback(wearable, data->mUserdata);
|
||||
delete data;
|
||||
return;
|
||||
}
|
||||
// [/SL:KB]
|
||||
|
||||
if( !filename )
|
||||
{
|
||||
LL_WARNS("Wearable") << "Bad Wearable Asset: missing file." << LL_ENDL;
|
||||
|
|
|
|||
Loading…
Reference in New Issue