diff options
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; +}  | 
