summaryrefslogtreecommitdiff
path: root/indra/llappearance/llavatarappearancedefines.cpp
diff options
context:
space:
mode:
authorDon Kjer <don@lindenlab.com>2012-10-02 01:02:34 +0000
committerDon Kjer <don@lindenlab.com>2012-10-02 01:02:34 +0000
commit5483bc28ae6b33bf5b2371d46648ad20975daf8c (patch)
tree37f0334ac9e84304db8c6ee4063e56d61696cbbd /indra/llappearance/llavatarappearancedefines.cpp
parent5010cf72d345e60d0a367ea213dafe8727414612 (diff)
Moved gatherMorphMaskAlpha into llappearance.
Diffstat (limited to 'indra/llappearance/llavatarappearancedefines.cpp')
-rw-r--r--indra/llappearance/llavatarappearancedefines.cpp24
1 files changed, 23 insertions, 1 deletions
diff --git a/indra/llappearance/llavatarappearancedefines.cpp b/indra/llappearance/llavatarappearancedefines.cpp
index 0416309fc7..f1c78946a1 100644
--- a/indra/llappearance/llavatarappearancedefines.cpp
+++ b/indra/llappearance/llavatarappearancedefines.cpp
@@ -220,7 +220,7 @@ ETextureIndex LLAvatarAppearanceDictionary::bakedToLocalTextureIndex(EBakedTextu
return LLAvatarAppearanceDictionary::getInstance()->getBakedTexture(index)->mTextureIndex;
}
-//static
+// static
EBakedTextureIndex LLAvatarAppearanceDictionary::findBakedByRegionName(std::string name)
{
U8 index = 0;
@@ -238,6 +238,28 @@ EBakedTextureIndex LLAvatarAppearanceDictionary::findBakedByRegionName(std::stri
return BAKED_NUM_INDICES;
}
+// static
+EBakedTextureIndex LLAvatarAppearanceDictionary::findBakedByImageName(std::string name)
+{
+ U8 index = 0;
+ while (index < BAKED_NUM_INDICES)
+ {
+ const BakedEntry *be = LLAvatarAppearanceDictionary::getInstance()->getBakedTexture((EBakedTextureIndex) index);
+ if (be)
+ {
+ const TextureEntry *te = LLAvatarAppearanceDictionary::getInstance()->getTexture(be->mTextureIndex);
+ if (te && te->mDefaultImageName.compare(name) == 0)
+ {
+ // baked texture found
+ return (EBakedTextureIndex) index;
+ }
+ }
+ index++;
+ }
+ // baked texture could not be found
+ return BAKED_NUM_INDICES;
+}
+
// static
LLWearableType::EType LLAvatarAppearanceDictionary::getTEWearableType(ETextureIndex index )
{