diff options
author | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2010-06-21 15:54:02 -0400 |
---|---|---|
committer | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2010-06-21 15:54:02 -0400 |
commit | 4eab82d5e2d71f9b0d53f5a92bc65ecc3320fee7 (patch) | |
tree | 0298f612d60eef5a3bea57e625b2582f50d37c44 /indra/newview/llinventoryfunctions.cpp | |
parent | c838c6b64563545c15006ac20fd88afe66e5bbfc (diff) | |
parent | 17f98b36d3e3bebdcb331f91fc0f542f618be71d (diff) |
merge
Diffstat (limited to 'indra/newview/llinventoryfunctions.cpp')
-rw-r--r-- | indra/newview/llinventoryfunctions.cpp | 35 |
1 files changed, 30 insertions, 5 deletions
diff --git a/indra/newview/llinventoryfunctions.cpp b/indra/newview/llinventoryfunctions.cpp index de24bd92d0..37088064c6 100644 --- a/indra/newview/llinventoryfunctions.cpp +++ b/indra/newview/llinventoryfunctions.cpp @@ -327,6 +327,11 @@ BOOL get_is_category_renameable(const LLInventoryModel* model, const LLUUID& id) return FALSE; } +void show_task_item_profile(const LLUUID& item_uuid, const LLUUID& object_id) +{ + LLSideTray::getInstance()->showPanel("sidepanel_inventory", LLSD().with("id", item_uuid).with("object", object_id)); +} + void show_item_profile(const LLUUID& item_uuid) { LLUUID linked_uuid = gInventory.getLinkedItemID(item_uuid); @@ -573,6 +578,31 @@ bool LLFindWearables::operator()(LLInventoryCategory* cat, return FALSE; } +LLFindWearablesEx::LLFindWearablesEx(bool is_worn, bool include_body_parts) +: mIsWorn(is_worn) +, mIncludeBodyParts(include_body_parts) +{} + +bool LLFindWearablesEx::operator()(LLInventoryCategory* cat, LLInventoryItem* item) +{ + LLViewerInventoryItem *vitem = dynamic_cast<LLViewerInventoryItem*>(item); + if (!vitem) return false; + + // Skip non-wearables. + if (!vitem->isWearableType() && vitem->getType() != LLAssetType::AT_OBJECT) + { + return false; + } + + // Skip body parts if requested. + if (!mIncludeBodyParts && vitem->getType() == LLAssetType::AT_BODYPART) + { + return false; + } + + return (bool) get_is_item_worn(item->getUUID()) == mIsWorn; +} + bool LLFindWearablesOfType::operator()(LLInventoryCategory* cat, LLInventoryItem* item) { if (!item) return false; @@ -593,11 +623,6 @@ void LLFindWearablesOfType::setType(LLWearableType::EType type) mWearableType = type; } -bool LLFindWorn::operator()(LLInventoryCategory* cat, LLInventoryItem* item) -{ - return item && get_is_item_worn(item->getUUID()); -} - bool LLFindNonRemovableObjects::operator()(LLInventoryCategory* cat, LLInventoryItem* item) { if (item) |