diff options
Diffstat (limited to 'indra/newview/scripts/lua/require')
-rw-r--r-- | indra/newview/scripts/lua/require/LLInventory.lua | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/indra/newview/scripts/lua/require/LLInventory.lua b/indra/newview/scripts/lua/require/LLInventory.lua index 880a2516f1..e6a347532b 100644 --- a/indra/newview/scripts/lua/require/LLInventory.lua +++ b/indra/newview/scripts/lua/require/LLInventory.lua @@ -19,10 +19,29 @@ function LLInventory.getBasicFolderID(ft_name) return leap.request('LLInventory', {op = 'getBasicFolderID', ft_name=ft_name}).id end +-- Get the table of asset type names, which can be later used to get the specific items via LLInventory.collectDescendentsIf(...) +function LLInventory.getAssetTypeNames() + return leap.request('LLInventory', {op = 'getAssetTypeNames'}).type_names +end + -- Get the direct descendents of the 'folder_id' provided, -- reply will contain "items" and "categories" tables accordingly function LLInventory.getDirectDescendents(folder_id) return leap.request('LLInventory', {op = 'getDirectDescendents', folder_id=folder_id}) end +-- Get the descendents of the 'folder_id' provided, which pass specified filters +-- reply will contain "items" and "categories" tables accordingly +-- LLInventory.collectDescendentsIf{ folder_id -- parent folder ID +-- [, name] -- name (substring) +-- [, desc] -- description (substring) +-- [, type] -- asset type +-- [, filter_links]} -- EXCLUDE_LINKS - don't show links, ONLY_LINKS - only show links, INCLUDE_LINKS - show links too (default) +function LLInventory.collectDescendentsIf(...) + local args = mapargs('folder_id,name,desc,type,filter_links', ...) + args.op = 'collectDescendentsIf' + return leap.request('LLInventory', args) +end + + return LLInventory |