summaryrefslogtreecommitdiff
path: root/indra/newview/llinventoryfunctions.cpp
diff options
context:
space:
mode:
authorJonathan "Geenz" Goodman <geenz@geenzo.com>2025-05-06 15:34:16 -0400
committerJonathan "Geenz" Goodman <geenz@geenzo.com>2025-05-06 15:34:16 -0400
commitd679e7f3bacd7bba5493257f0e6c1c2366bf960a (patch)
treeb351be1516815a9ebd49bf57e86d7f7125537bec /indra/newview/llinventoryfunctions.cpp
parent47a5c7a41340a18d90a5a8724762ff32f9ac8afd (diff)
parent9180a110bd5b0e41f182c32017b5dccd2eb265be (diff)
Merge branch 'release/2025.04' into geenz/gltf-mesh-import
Diffstat (limited to 'indra/newview/llinventoryfunctions.cpp')
-rw-r--r--indra/newview/llinventoryfunctions.cpp39
1 files changed, 39 insertions, 0 deletions
diff --git a/indra/newview/llinventoryfunctions.cpp b/indra/newview/llinventoryfunctions.cpp
index 1ccefa3212..7fff88fba7 100644
--- a/indra/newview/llinventoryfunctions.cpp
+++ b/indra/newview/llinventoryfunctions.cpp
@@ -2493,6 +2493,40 @@ bool can_share_item(const LLUUID& item_id)
return can_share;
}
+
+EMyOutfitsSubfolderType myoutfit_object_subfolder_type(
+ LLInventoryModel* model,
+ const LLUUID& obj_id,
+ const LLUUID& my_outfits_id)
+{
+ if (obj_id == my_outfits_id) return MY_OUTFITS_NO;
+
+ const LLViewerInventoryCategory* test_cat = model->getCategory(obj_id);
+ if (test_cat->getPreferredType() == LLFolderType::FT_OUTFIT)
+ {
+ return MY_OUTFITS_OUTFIT;
+ }
+ while (test_cat)
+ {
+ if (test_cat->getPreferredType() == LLFolderType::FT_OUTFIT)
+ {
+ return MY_OUTFITS_SUBOUTFIT;
+ }
+
+ const LLUUID& parent_id = test_cat->getParentUUID();
+ if (parent_id.isNull())
+ {
+ return MY_OUTFITS_NO;
+ }
+ if (parent_id == my_outfits_id)
+ {
+ return MY_OUTFITS_SUBFOLDER;
+ }
+ test_cat = model->getCategory(parent_id);
+ }
+
+ return MY_OUTFITS_NO;
+}
///----------------------------------------------------------------------------
/// LLMarketplaceValidator implementations
///----------------------------------------------------------------------------
@@ -2621,6 +2655,11 @@ bool LLInventoryCollectFunctor::itemTransferCommonlyAllowed(const LLInventoryIte
return false;
}
+bool LLIsFolderType::operator()(LLInventoryCategory* cat, LLInventoryItem* item)
+{
+ return cat && cat->getPreferredType() == mType;
+}
+
bool LLIsType::operator()(LLInventoryCategory* cat, LLInventoryItem* item)
{
if(mType == LLAssetType::AT_CATEGORY)