summaryrefslogtreecommitdiff
path: root/indra/newview/llinventorymodel.cpp
diff options
context:
space:
mode:
authorKitty Barnett <develop@catznip.com>2022-12-29 19:51:33 +0100
committerakleshchev <117672381+akleshchev@users.noreply.github.com>2023-02-01 16:38:47 +0200
commit1140ae3489a9e260a0abb808b4152f2d57384d67 (patch)
tree497ccdf9e635f8662ca6a298c448762d0af5e453 /indra/newview/llinventorymodel.cpp
parent3375e1a7b518eb40eb1814ced745266ce3a54ce7 (diff)
Add a texture inspector and show it when hovering over an inventory textory (or folder containing - among others - exactly one texture) and when hovering over notecard embedded textures
Diffstat (limited to 'indra/newview/llinventorymodel.cpp')
-rw-r--r--indra/newview/llinventorymodel.cpp25
1 files changed, 25 insertions, 0 deletions
diff --git a/indra/newview/llinventorymodel.cpp b/indra/newview/llinventorymodel.cpp
index 8b2a1a14f0..edd489f021 100644
--- a/indra/newview/llinventorymodel.cpp
+++ b/indra/newview/llinventorymodel.cpp
@@ -451,6 +451,31 @@ void LLInventoryModel::getDirectDescendentsOf(const LLUUID& cat_id,
items = get_ptr_in_map(mParentChildItemTree, cat_id);
}
+void LLInventoryModel::getDirectDescendentsOf(const LLUUID& cat_id, cat_array_t& categories, item_array_t& items, LLInventoryCollectFunctor& f) const
+{
+ if (cat_array_t* categoriesp = get_ptr_in_map(mParentChildCategoryTree, cat_id))
+ {
+ for (LLViewerInventoryCategory* pFolder : *categoriesp)
+ {
+ if (f(pFolder, nullptr))
+ {
+ categories.push_back(pFolder);
+ }
+ }
+ }
+
+ if (item_array_t* itemsp = get_ptr_in_map(mParentChildItemTree, cat_id))
+ {
+ for (LLViewerInventoryItem* pItem : *itemsp)
+ {
+ if (f(nullptr, pItem))
+ {
+ items.push_back(pItem);
+ }
+ }
+ }
+}
+
LLMD5 LLInventoryModel::hashDirectDescendentNames(const LLUUID& cat_id) const
{
LLInventoryModel::cat_array_t* cat_array;