summaryrefslogtreecommitdiff
path: root/indra/newview/llinventoryfunctions.cpp
diff options
context:
space:
mode:
authorAndrey Kleshchev <andreykproductengine@lindenlab.com>2025-04-09 21:35:40 +0300
committerAndrey Kleshchev <117672381+akleshchev@users.noreply.github.com>2025-04-11 12:36:48 +0300
commit2371994a88ffeefd07891d00aed18ac226b954a7 (patch)
treeda5baccbb9cd5ec47cacc4a8ce88477db849d2d3 /indra/newview/llinventoryfunctions.cpp
parent1c90421b8873a2228a845ea2f7f4a80758500aa6 (diff)
#3757 Menu for subfodlers in outfits p2
Diffstat (limited to 'indra/newview/llinventoryfunctions.cpp')
-rw-r--r--indra/newview/llinventoryfunctions.cpp30
1 files changed, 30 insertions, 0 deletions
diff --git a/indra/newview/llinventoryfunctions.cpp b/indra/newview/llinventoryfunctions.cpp
index b4299972d9..dc69e0c92e 100644
--- a/indra/newview/llinventoryfunctions.cpp
+++ b/indra/newview/llinventoryfunctions.cpp
@@ -2493,6 +2493,36 @@ 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);
+ while (test_cat)
+ {
+ if (test_cat->getPreferredType() == LLFolderType::FT_OUTFIT)
+ {
+ return MY_OUTFITS_OUTFIT;
+ }
+
+ 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
///----------------------------------------------------------------------------