Merge up RLVa in llinventorybridge.cpp and remove old commented code

Just something I did to ease mergies.
Adds RLVaDebugDeprecateExplicitPoint

Ignore space changes
This commit is contained in:
Inusaito Sayori
2014-06-25 15:23:04 -04:00
parent 15e30604fc
commit 9eb338f417
2 changed files with 101 additions and 172 deletions

View File

@@ -90,6 +90,17 @@
<key>Value</key> <key>Value</key>
<string>+</string> <string>+</string>
</map> </map>
<key>RLVaDebugDeprecateExplicitPoint</key>
<map>
<key>Comment</key>
<string>Ignore attachment point names on inventory items and categories (incomplete)</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
<boolean>0</boolean>
</map>
<key>RLVaDebugHideUnsetDuplicate</key> <key>RLVaDebugHideUnsetDuplicate</key>
<map> <map>
<key>Comment</key> <key>Comment</key>

View File

@@ -85,7 +85,7 @@
#include "hippogridmanager.h" #include "hippogridmanager.h"
// [RLVa:KB] // [RLVa:KB] - Checked: 2011-05-22 (RLVa-1.3.1)
#include "rlvhandler.h" #include "rlvhandler.h"
#include "rlvlocks.h" #include "rlvlocks.h"
// [/RLVa:KB] // [/RLVa:KB]
@@ -114,21 +114,6 @@ struct LLMoveInv
using namespace LLOldEvents; using namespace LLOldEvents;
// Helpers
// bug in busy count inc/dec right now, logic is complex... do we really need it?
void inc_busy_count()
{
// gViewerWindow->getWindow()->incBusyCount();
// check balance of these calls if this code is changed to ever actually
// *do* something!
}
void dec_busy_count()
{
// gViewerWindow->getWindow()->decBusyCount();
// check balance of these calls if this code is changed to ever actually
// *do* something!
}
// Function declarations // Function declarations
void remove_inventory_category_from_avatar(LLInventoryCategory* category); void remove_inventory_category_from_avatar(LLInventoryCategory* category);
void remove_inventory_category_from_avatar_step2( BOOL proceed, LLUUID category_id); void remove_inventory_category_from_avatar_step2( BOOL proceed, LLUUID category_id);
@@ -181,7 +166,6 @@ public:
{ {
if (clear_observer) if (clear_observer)
{ {
dec_busy_count();
gInventory.removeObserver(this); gInventory.removeObserver(this);
delete this; delete this;
} }
@@ -242,9 +226,15 @@ LLFolderType::EType LLInvFVBridge::getPreferredType() const
// Folders don't have creation dates. // Folders don't have creation dates.
time_t LLInvFVBridge::getCreationDate() const time_t LLInvFVBridge::getCreationDate() const
{ {
return 0; /*LLInventoryObject* objectp = getInventoryObject();
if (objectp)
{
return objectp->getCreationDate();
}*/
return (time_t)0;
} }
// Can be destroyed (or moved to trash) // Can be destroyed (or moved to trash)
BOOL LLInvFVBridge::isItemRemovable() const BOOL LLInvFVBridge::isItemRemovable() const
{ {
@@ -459,6 +449,11 @@ void LLInvFVBridge::removeBatchNoCheck(LLDynamicArray<LLFolderViewEventListener*
for(; it != end; ++it) for(; it != end; ++it)
{ {
gInventory.moveObject((*it), trash_id); gInventory.moveObject((*it), trash_id);
LLViewerInventoryItem* item = gInventory.getItem(*it);
if (item)
{
model->updateItem(item);
}
} }
// notify inventory observers. // notify inventory observers.
@@ -1686,16 +1681,17 @@ BOOL LLItemBridge::isItemRenameable() const
return FALSE; return FALSE;
} }
if (isInboxFolder())
{
return FALSE;
}
// [RLVa:KB] - Checked: 2011-03-29 (RLVa-1.3.0g) | Modified: RLVa-1.3.0g // [RLVa:KB] - Checked: 2011-03-29 (RLVa-1.3.0g) | Modified: RLVa-1.3.0g
if ( (rlv_handler_t::isEnabled()) && (!RlvFolderLocks::instance().canRenameItem(mUUID)) ) if ( (rlv_handler_t::isEnabled()) && (!RlvFolderLocks::instance().canRenameItem(mUUID)) )
{ {
return FALSE; return FALSE;
} }
// [/RLVa:KB] // [/RLVa:KB]
if (isInboxFolder())
{
return FALSE;
}
return (item->getPermissions().allowModifyBy(gAgent.getID())); return (item->getPermissions().allowModifyBy(gAgent.getID()));
} }
@@ -1733,7 +1729,6 @@ BOOL LLItemBridge::removeItem()
return FALSE; return FALSE;
} }
// move it to the trash // move it to the trash
LLPreview::hide(mUUID, TRUE); LLPreview::hide(mUUID, TRUE);
LLInventoryModel* model = getInventoryModel(); LLInventoryModel* model = getInventoryModel();
@@ -1874,7 +1869,10 @@ BOOL LLFolderBridge::isItemMovable() const
LLInventoryObject* obj = getInventoryObject(); LLInventoryObject* obj = getInventoryObject();
if(obj) if(obj)
{ {
return (!LLFolderType::lookupIsProtectedType(((LLInventoryCategory*)obj)->getPreferredType())); // If it's a protected type folder, we can't move it
if (LLFolderType::lookupIsProtectedType(((LLInventoryCategory*)obj)->getPreferredType()))
return FALSE;
return TRUE;
} }
return FALSE; return FALSE;
} }
@@ -2591,7 +2589,6 @@ void LLRightClickInventoryFetchDescendentsObserver::execute(bool clear_observer)
llwarns << "LLRightClickInventoryFetchDescendentsObserver::done with empty mCompleteFolders" << llendl; llwarns << "LLRightClickInventoryFetchDescendentsObserver::done with empty mCompleteFolders" << llendl;
if (clear_observer) if (clear_observer)
{ {
dec_busy_count();
gInventory.removeObserver(this); gInventory.removeObserver(this);
delete this; delete this;
} }
@@ -2605,7 +2602,6 @@ void LLRightClickInventoryFetchDescendentsObserver::execute(bool clear_observer)
// could notify observers and throw us into an infinite loop. // could notify observers and throw us into an infinite loop.
if (clear_observer) if (clear_observer)
{ {
dec_busy_count();
gInventory.removeObserver(this); gInventory.removeObserver(this);
delete this; delete this;
} }
@@ -2667,7 +2663,6 @@ void LLRightClickInventoryFetchDescendentsObserver::execute(bool clear_observer)
{ {
// it's all on its way - add an observer, and the inventory // it's all on its way - add an observer, and the inventory
// will call done for us when everything is here. // will call done for us when everything is here.
inc_busy_count();
gInventory.addObserver(outfit); gInventory.addObserver(outfit);
} }
*/ */
@@ -2686,7 +2681,6 @@ void LLRightClickInventoryFetchDescendentsObserver::execute(bool clear_observer)
{ {
// it's all on its way - add an observer, and the inventory // it's all on its way - add an observer, and the inventory
// will call done for us when everything is here. // will call done for us when everything is here.
inc_busy_count();
gInventory.addObserver(categories); gInventory.addObserver(categories);
} }
} }
@@ -2806,6 +2800,17 @@ void LLFolderBridge::performAction(LLInventoryModel* model, std::string action)
modifyOutfit(FALSE); modifyOutfit(FALSE);
return; return;
} }
#if SUPPORT_ENSEMBLES
else if ("wearasensemble" == action)
{
LLInventoryModel* model = getInventoryModel();
if(!model) return;
LLViewerInventoryCategory* cat = getCategory();
if(!cat) return;
LLAppearanceMgr::instance().addEnsembleLink(cat,true);
return;
}
#endif
else if ("addtooutfit" == action) else if ("addtooutfit" == action)
{ {
modifyOutfit(TRUE); modifyOutfit(TRUE);
@@ -2956,9 +2961,6 @@ LLUIImagePtr LLFolderBridge::getIcon() const
LLUIImagePtr LLFolderBridge::getIcon(LLFolderType::EType preferred_type) LLUIImagePtr LLFolderBridge::getIcon(LLFolderType::EType preferred_type)
{ {
return LLUI::getUIImage(LLViewerFolderType::lookupIconName(preferred_type, FALSE)); return LLUI::getUIImage(LLViewerFolderType::lookupIconName(preferred_type, FALSE));
/*case LLAssetType::AT_MESH:
control = "inv_folder_mesh.tga";
break;*/
} }
LLUIImagePtr LLFolderBridge::getOpenIcon() const LLUIImagePtr LLFolderBridge::getOpenIcon() const
@@ -3319,7 +3321,16 @@ void LLFolderBridge::buildContextMenuBaseOptions(U32 flags)
mItems.push_back(std::string("New Clothes")); mItems.push_back(std::string("New Clothes"));
mItems.push_back(std::string("New Body Parts")); mItems.push_back(std::string("New Body Parts"));
} }
#if SUPPORT_ENSEMBLES
// Changing folder types is an unfinished unsupported feature
// and can lead to unexpected behavior if enabled.
mItems.push_back(std::string("Change Type"));
const LLViewerInventoryCategory *cat = getCategory();
if (cat && LLFolderType::lookupIsProtectedType(cat->getPreferredType()))
{
mDisabledItems.push_back(std::string("Change Type"));
}
#endif
getClipboardEntries(false, mItems, mDisabledItems, flags); getClipboardEntries(false, mItems, mDisabledItems, flags);
} }
else else
@@ -3387,7 +3398,7 @@ void LLFolderBridge::buildContextMenuFolderOptions(U32 flags)
LLFolderType::EType type = category->getPreferredType(); LLFolderType::EType type = category->getPreferredType();
const bool is_system_folder = LLFolderType::lookupIsProtectedType(type); const bool is_system_folder = LLFolderType::lookupIsProtectedType(type);
// calling card related functionality for folders. // calling card related functionality for folders.
// [SL:KB] - Patch: Appearance-Misc | Checked: 2010-11-24 (Catznip-3.0.0a) | Added: Catznip-2.4.0e // [SL:KB] - Patch: Appearance-Misc | Checked: 2010-11-24 (Catznip-2.4)
const bool is_outfit = (type == LLFolderType::FT_OUTFIT); const bool is_outfit = (type == LLFolderType::FT_OUTFIT);
// [/SL:KB] // [/SL:KB]
@@ -3449,7 +3460,7 @@ void LLFolderBridge::buildContextMenuFolderOptions(U32 flags)
mDisabledItems.push_back(std::string("Remove From Outfit")); mDisabledItems.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-3.0.0a) | Added: Catznip-2.4.0e // [SL:KB] - Patch: Appearance-Misc | Checked: 2010-11-24 (Catznip-2.4)
if ( ((is_outfit) && (!LLAppearanceMgr::instance().getCanReplaceCOF(mUUID))) || if ( ((is_outfit) && (!LLAppearanceMgr::instance().getCanReplaceCOF(mUUID))) ||
((!is_outfit) && (gAgentWearables.isCOFChangeInProgress())) ) ((!is_outfit) && (gAgentWearables.isCOFChangeInProgress())) )
// [/SL:KB] // [/SL:KB]
@@ -3495,7 +3506,6 @@ void LLFolderBridge::buildContextMenu(LLMenuGL& menu, U32 flags)
else else
{ {
// it's all on its way - add an observer, and the inventory will call done for us when everything is here. // it's all on its way - add an observer, and the inventory will call done for us when everything is here.
inc_busy_count();
gInventory.addObserver(fetch); gInventory.addObserver(fetch);
} }
} }
@@ -3849,7 +3859,7 @@ BOOL LLFolderBridge::dragItemIntoFolder(LLInventoryItem* inv_item,
const BOOL move_is_into_favorites = (mUUID == favorites_id); const BOOL move_is_into_favorites = (mUUID == favorites_id);
const BOOL move_is_into_outfit = (getCategory() && getCategory()->getPreferredType()==LLFolderType::FT_OUTFIT); const BOOL move_is_into_outfit = (getCategory() && getCategory()->getPreferredType()==LLFolderType::FT_OUTFIT);
const BOOL move_is_into_landmarks = (mUUID == landmarks_id) || model->isObjectDescendentOf(mUUID, landmarks_id); const BOOL move_is_into_landmarks = (mUUID == landmarks_id) || model->isObjectDescendentOf(mUUID, landmarks_id);
const BOOL move_is_into_outbox = model->isObjectDescendentOf(mUUID, outbox_id); //(mUUID == outbox_id); const BOOL move_is_into_outbox = model->isObjectDescendentOf(mUUID, outbox_id);
const BOOL move_is_from_outbox = model->isObjectDescendentOf(inv_item->getUUID(), outbox_id); const BOOL move_is_from_outbox = model->isObjectDescendentOf(inv_item->getUUID(), outbox_id);
LLToolDragAndDrop::ESource source = LLToolDragAndDrop::getInstance()->getSource(); LLToolDragAndDrop::ESource source = LLToolDragAndDrop::getInstance()->getSource();
@@ -3870,10 +3880,6 @@ BOOL LLFolderBridge::dragItemIntoFolder(LLInventoryItem* inv_item,
switch (inv_item->getActualType()) switch (inv_item->getActualType())
{ {
//case LLFolderType::FT_ROOT_CATEGORY:
// is_movable = FALSE;
// break;
case LLAssetType::AT_CATEGORY: case LLAssetType::AT_CATEGORY:
is_movable = !LLFolderType::lookupIsProtectedType(((LLInventoryCategory*)inv_item)->getPreferredType()); is_movable = !LLFolderType::lookupIsProtectedType(((LLInventoryCategory*)inv_item)->getPreferredType());
break; break;
@@ -3989,6 +3995,8 @@ BOOL LLFolderBridge::dragItemIntoFolder(LLInventoryItem* inv_item,
} }
// If an item is being dragged between windows, unselect everything in the active window // If an item is being dragged between windows, unselect everything in the active window
// so that we don't follow the selection to its new location (which is very annoying). // so that we don't follow the selection to its new location (which is very annoying).
// RN: a better solution would be to deselect automatically when an item is moved
// and then select any item that is dropped only in the panel that it is dropped in
if (active_panel && (destination_panel != active_panel)) if (active_panel && (destination_panel != active_panel))
{ {
active_panel->unSelectAll(); active_panel->unSelectAll();
@@ -4215,15 +4223,6 @@ BOOL LLFolderBridge::dragItemIntoFolder(LLInventoryItem* inv_item,
return accept; return accept;
} }
// +=================================================+
// | LLTextureBridge |
// +=================================================+
LLUIImagePtr LLTextureBridge::getIcon() const
{
return LLInventoryIcon::getIcon(LLAssetType::AT_TEXTURE, mInvType);
}
void open_texture(const LLUUID& item_id, void open_texture(const LLUUID& item_id,
const std::string& title, const std::string& title,
BOOL show_keep_discard, BOOL show_keep_discard,
@@ -4261,6 +4260,15 @@ void open_texture(const LLUUID& item_id,
} }
} }
// +=================================================+
// | LLTextureBridge |
// +=================================================+
LLUIImagePtr LLTextureBridge::getIcon() const
{
return LLInventoryIcon::getIcon(LLAssetType::AT_TEXTURE, mInvType);
}
void LLTextureBridge::openItem() void LLTextureBridge::openItem()
{ {
LLViewerInventoryItem* item = getItem(); LLViewerInventoryItem* item = getItem();
@@ -4865,26 +4873,6 @@ void open_notecard(LLViewerInventoryItem* inv_item,
if(take_focus) preview->setFocus(TRUE); if(take_focus) preview->setFocus(TRUE);
// Force to be entirely onscreen. // Force to be entirely onscreen.
gFloaterView->adjustToFitScreen(preview, FALSE); gFloaterView->adjustToFitScreen(preview, FALSE);
//if (source_id.notNull())
//{
// // look for existing tabbed view for content from same source
// LLPreview* existing_preview = LLPreview::getPreviewForSource(source_id);
// if (existing_preview)
// {
// // found existing preview from this source
// // is it already hosted in a multi-preview window?
// LLMultiPreview* preview_hostp = (LLMultiPreview*)existing_preview->getHost();
// if (!preview_hostp)
// {
// // create new multipreview if it doesn't exist
// LLMultiPreview* preview_hostp = new LLMultiPreview(existing_preview->getRect());
// preview_hostp->addFloater(existing_preview);
// }
// // add this preview to existing host
// preview_hostp->addFloater(preview);
// }
//}
} }
} }
@@ -5261,7 +5249,7 @@ std::string LLObjectBridge::getLabelSuffix() const
LLStringUtil::format_map_t args; LLStringUtil::format_map_t args;
args["[ATTACHMENT_POINT]"] = LLTrans::getString(attachment_point_name); args["[ATTACHMENT_POINT]"] = LLTrans::getString(attachment_point_name);
if(gRlvAttachmentLocks.canDetach(getItem())) if (gRlvAttachmentLocks.canDetach(getItem()))
return LLItemBridge::getLabelSuffix() + LLTrans::getString("WornOnAttachmentPoint", args); return LLItemBridge::getLabelSuffix() + LLTrans::getString("WornOnAttachmentPoint", args);
else else
return LLItemBridge::getLabelSuffix() + LLTrans::getString("LockedOnAttachmentPoint", args); return LLItemBridge::getLabelSuffix() + LLTrans::getString("LockedOnAttachmentPoint", args);
@@ -5271,9 +5259,11 @@ std::string LLObjectBridge::getLabelSuffix() const
void rez_attachment(LLViewerInventoryItem* item, LLViewerJointAttachment* attachment, bool replace) void rez_attachment(LLViewerInventoryItem* item, LLViewerJointAttachment* attachment, bool replace)
{ {
// [RLVa:KB] - Checked: 2010-08-25 (RLVa-1.2.1a) | Added: RLVa-1.2.1a // [RLVa:KB] - Checked: 2010-08-25 (RLVa-1.2.1)
// If no attachment point was specified, try looking it up from the item name // If no attachment point was specified, try looking it up from the item name
if ( (rlv_handler_t::isEnabled()) && (!attachment) && (gRlvAttachmentLocks.hasLockedAttachmentPoint(RLV_LOCK_ANY)) ) static LLCachedControl<bool> fRlvDeprecateAttachPt(gSavedSettings, "RLVaDebugDeprecateExplicitPoint", false);
if ( (rlv_handler_t::isEnabled()) && (!fRlvDeprecateAttachPt) &&
(!attachment) && (gRlvAttachmentLocks.hasLockedAttachmentPoint(RLV_LOCK_ANY)) )
{ {
attachment = RlvAttachPtLookup::getAttachPoint(item); attachment = RlvAttachPtLookup::getAttachPoint(item);
} }
@@ -5313,19 +5303,23 @@ void rez_attachment(LLViewerInventoryItem* item, LLViewerJointAttachment* attach
if (replace && if (replace &&
(attachment && attachment->getNumObjects() > 0)) (attachment && attachment->getNumObjects() > 0))
{ {
// [RLVa:KB] - Checked: 2010-08-25 (RLVa-1.2.1a) | Modified: RLVa-1.2.1a // [RLVa:KB] - Checked: 2010-08-25 (RLVa-1.2.1)
// Block if we can't "replace wear" what's currently there // Block if we can't "replace wear" what's currently there
if ( (rlv_handler_t::isEnabled()) && ((gRlvAttachmentLocks.canAttach(attachment) & RLV_WEAR_REPLACE) == 0) ) if ( (rlv_handler_t::isEnabled()) && ((gRlvAttachmentLocks.canAttach(attachment) & RLV_WEAR_REPLACE) == 0) )
{
return; return;
}
// [/RLVa:KB] // [/RLVa:KB]
LLNotificationsUtil::add("ReplaceAttachment", LLSD(), payload, confirm_attachment_rez); LLNotificationsUtil::add("ReplaceAttachment", LLSD(), payload, confirm_attachment_rez);
} }
else else
{ {
// [RLVa:KB] - Checked: 2010-08-07 (RLVa-1.2.0i) | Modified: RLVa-1.2.0i // [RLVa:KB] - Checked: 2010-08-07 (RLVa-1.2.0)
// Block wearing anything on a non-attachable attachment point // Block wearing anything on a non-attachable attachment point
if ( (rlv_handler_t::isEnabled()) && (gRlvAttachmentLocks.isLockedAttachmentPoint(attach_pt, RLV_LOCK_ADD)) ) if ( (rlv_handler_t::isEnabled()) && (gRlvAttachmentLocks.isLockedAttachmentPoint(attach_pt, RLV_LOCK_ADD)) )
{
return; return;
}
// [/RLVa:KB] // [/RLVa:KB]
LLNotifications::instance().forceResponse(LLNotification::Params("ReplaceAttachment").payload(payload), 0/*YES*/); LLNotifications::instance().forceResponse(LLNotification::Params("ReplaceAttachment").payload(payload), 0/*YES*/);
} }
@@ -5576,15 +5570,6 @@ void remove_inventory_category_from_avatar( LLInventoryCategory* category )
remove_inventory_category_from_avatar_step2(TRUE, category->getUUID() ); remove_inventory_category_from_avatar_step2(TRUE, category->getUUID() );
} }
//struct OnRemoveStruct
//{
// LLUUID mUUID;
// OnRemoveStruct(const LLUUID& uuid):
// mUUID(uuid)
// {
// }
//};
void remove_inventory_category_from_avatar_step2( BOOL proceed, LLUUID category_id) void remove_inventory_category_from_avatar_step2( BOOL proceed, LLUUID category_id)
{ {
@@ -5840,13 +5825,6 @@ void LLWearableBridge::buildContextMenu(LLMenuGL& menu, U32 flags)
items.push_back(std::string("Wearable And Object Separator")); items.push_back(std::string("Wearable And Object Separator"));
items.push_back(std::string("Wearable Edit")); items.push_back(std::string("Wearable Edit"));
/*// [RLVa:KB] - Checked: 2011-09-16 (RLVa-1.1.4a) | Added: RLVa-1.1.4a
if ( (rlv_handler_t::isEnabled()) && (!gRlvWearableLocks.canRemove(item)) )
{
disabled_items.push_back(std::string("Wearable And Object Wear"));
disabled_items.push_back(std::string("Wearable Edit"));
}
// [/RLVa:KB]*/
bool not_modifiable = !item || !gAgentWearables.isWearableModifiable(item->getUUID()); bool not_modifiable = !item || !gAgentWearables.isWearableModifiable(item->getUUID());
if (((flags & FIRST_SELECTED_ITEM) == 0) || not_modifiable) if (((flags & FIRST_SELECTED_ITEM) == 0) || not_modifiable)
@@ -5868,10 +5846,6 @@ void LLWearableBridge::buildContextMenu(LLMenuGL& menu, U32 flags)
{ {
case LLAssetType::AT_CLOTHING: case LLAssetType::AT_CLOTHING:
items.push_back(std::string("Take Off")); items.push_back(std::string("Take Off"));
/*// [RLVa:KB] - Checked: 2011-09-16 (RLVa-1.1.4a) | Added: RLVa-1.1.4a
if ( (rlv_handler_t::isEnabled()) && (!gRlvWearableLocks.canRemove(item)) )
disabled_items.push_back(std::string("Take Off"));
// [/RLVa:KB]*/
// Fallthrough since clothing and bodypart share wear options // Fallthrough since clothing and bodypart share wear options
case LLAssetType::AT_BODYPART: case LLAssetType::AT_BODYPART:
if (get_is_item_worn(item->getUUID())) if (get_is_item_worn(item->getUUID()))
@@ -6101,62 +6075,6 @@ BOOL LLWearableBridge::canRemoveFromAvatar(void* user_data)
return FALSE; return FALSE;
} }
// 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)));
// }
// }
//}
// static
//void LLWearableBridge::onRemoveFromAvatarArrived(LLViewerWearable* wearable,
// void* userdata)
//{
// OnRemoveStruct *on_remove_struct = (OnRemoveStruct*) userdata;
// const LLUUID &item_id = gInventory.getLinkedItemID(on_remove_struct->mUUID);
// [RLVa:KB] - Checked: 2010-03-20 (RLVa-1.2.0c) | Modified: RLVa-1.2.0a
// if ( (rlv_handler_t::isEnabled()) && ((!wearable) || (!gRlvWearableLocks.canRemove(gInventory.getItem(item_id)))) )
// {
// delete on_remove_struct;
// return;
// }
// [/RLVa:KB]
// 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::removeFromAvatar() void LLWearableBridge::removeFromAvatar()
{ {
if (get_is_item_worn(mUUID)) if (get_is_item_worn(mUUID))