From b95b20a1be56ff7baa3ad20e8d0571ec9f07ab12 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Tue, 8 Apr 2025 20:28:50 +0300 Subject: #3757 Allow subfolders in "My Outfits" --- indra/newview/llinventoryfunctions.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'indra/newview/llinventoryfunctions.cpp') diff --git a/indra/newview/llinventoryfunctions.cpp b/indra/newview/llinventoryfunctions.cpp index 1ccefa3212..b4299972d9 100644 --- a/indra/newview/llinventoryfunctions.cpp +++ b/indra/newview/llinventoryfunctions.cpp @@ -2621,6 +2621,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) -- cgit v1.2.3 From 2371994a88ffeefd07891d00aed18ac226b954a7 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Wed, 9 Apr 2025 21:35:40 +0300 Subject: #3757 Menu for subfodlers in outfits p2 --- indra/newview/llinventoryfunctions.cpp | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) (limited to 'indra/newview/llinventoryfunctions.cpp') 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 ///---------------------------------------------------------------------------- -- cgit v1.2.3 From 7dce74fcfb9ca9e6c152eaf33392ff79412ff555 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Thu, 10 Apr 2025 22:39:04 +0300 Subject: #3757 Move for subfodlers --- indra/newview/llinventoryfunctions.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'indra/newview/llinventoryfunctions.cpp') diff --git a/indra/newview/llinventoryfunctions.cpp b/indra/newview/llinventoryfunctions.cpp index dc69e0c92e..7fff88fba7 100644 --- a/indra/newview/llinventoryfunctions.cpp +++ b/indra/newview/llinventoryfunctions.cpp @@ -2502,11 +2502,15 @@ EMyOutfitsSubfolderType myoutfit_object_subfolder_type( 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_OUTFIT; + return MY_OUTFITS_SUBOUTFIT; } const LLUUID& parent_id = test_cat->getParentUUID(); -- cgit v1.2.3