summaryrefslogtreecommitdiff
path: root/indra/newview/llviewerinventory.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llviewerinventory.cpp')
-rwxr-xr-xindra/newview/llviewerinventory.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/indra/newview/llviewerinventory.cpp b/indra/newview/llviewerinventory.cpp
index b6a5534815..2d9fb7d773 100755
--- a/indra/newview/llviewerinventory.cpp
+++ b/indra/newview/llviewerinventory.cpp
@@ -701,6 +701,19 @@ bool LLViewerInventoryCategory::fetch()
return false;
}
+S32 LLViewerInventoryCategory::getViewerDescendentCount() const
+{
+ LLInventoryModel::cat_array_t* cats;
+ LLInventoryModel::item_array_t* items;
+ gInventory.getDirectDescendentsOf(getUUID(), cats, items);
+ S32 descendents_actual = 0;
+ if(cats && items)
+ {
+ descendents_actual = cats->count() + items->count();
+ }
+ return descendents_actual;
+}
+
bool LLViewerInventoryCategory::importFileLocal(LLFILE* fp)
{
// *NOTE: This buffer size is hard coded into scanf() below.