diff options
author | Erik Kundiman <erik@megapahit.org> | 2025-05-29 12:14:38 +0800 |
---|---|---|
committer | Erik Kundiman <erik@megapahit.org> | 2025-05-29 12:14:38 +0800 |
commit | 6641e36082f27faa282a0af6f88f381ffc97e179 (patch) | |
tree | 3c316421d1ad30c9061094bf7dd814522b28bc1c /indra/llcommon/llassettype.cpp | |
parent | 481b6bb4c4dfd57a509bd73e51ca57338ad4d860 (diff) | |
parent | b9ab6c3644da02bed6941dc8df433fb1c626f8c7 (diff) |
Merge tag 'Second_Life_Project#b9ab6c36-2025.05' into 2025.05
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; +} |