diff options
author | Mnikolenko Productengine <mnikolenko@productengine.com> | 2024-08-20 23:09:14 +0300 |
---|---|---|
committer | Mnikolenko Productengine <mnikolenko@productengine.com> | 2024-08-20 23:09:14 +0300 |
commit | 3cef79d979f2d21c29d17d123d6c166b9f7e7e0e (patch) | |
tree | 8f3ff9a120f590bfa4fb90904eae7cb4232f4342 /indra/llcommon/llassettype.cpp | |
parent | ab0f7ff14cd80b89524ba95eb5a39e2d6df55b26 (diff) |
Add collectDescendentsIf api for Lua
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 3e46bde954..1c0893b1bf 100644 --- a/indra/llcommon/llassettype.cpp +++ b/indra/llcommon/llassettype.cpp @@ -30,6 +30,7 @@ #include "lldictionary.h" #include "llmemory.h" #include "llsingleton.h" +#include "llsd.h" ///---------------------------------------------------------------------------- /// Class LLAssetType @@ -244,3 +245,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; +} |