diff options
author | Maxim Nikolenko <maximnproductengine@lindenlab.com> | 2025-05-20 20:40:04 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-05-20 20:40:04 +0300 |
commit | 2cbff073edad0bb31d2a025b888a9fb2e90fe2cf (patch) | |
tree | a9627a2cc78621d37a74c29bdf3fcb0d9efe5ea1 /indra/llcommon/llassettype.cpp | |
parent | 3de223aecf53ee6f69de8fba29aaa6593484d7e8 (diff) |
#4000 Cherry pick inventory LEAP functions from develop branch
Diffstat (limited to 'indra/llcommon/llassettype.cpp')
-rw-r--r-- | indra/llcommon/llassettype.cpp | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/indra/llcommon/llassettype.cpp b/indra/llcommon/llassettype.cpp index c09cf7abd2..9672a3262b 100644 --- a/indra/llcommon/llassettype.cpp +++ b/indra/llcommon/llassettype.cpp @@ -29,6 +29,7 @@ #include "llassettype.h" #include "lldictionary.h" #include "llmemory.h" +#include "llsd.h" #include "llsingleton.h" ///---------------------------------------------------------------------------- @@ -246,3 +247,19 @@ bool LLAssetType::lookupIsAssetIDKnowable(EType asset_type) } return false; } + +LLSD LLAssetType::getTypeNames() +{ + LLSD type_names; + const LLAssetDictionary *dict = LLAssetDictionary::getInstance(); + for (S32 type = AT_TEXTURE; type < AT_COUNT; ++type) + { + const AssetEntry *entry = dict->lookup((LLAssetType::EType) type); + // skip llassettype_bad_lookup + if (entry) + { + type_names.append(entry->mTypeName); + } + } + return type_names; +} |