summaryrefslogtreecommitdiff
path: root/indra/llappearance/lltexlayer.cpp
diff options
context:
space:
mode:
authorDon Kjer <don@lindenlab.com>2012-09-28 23:56:55 +0000
committerDon Kjer <don@lindenlab.com>2012-09-28 23:56:55 +0000
commit0a94b5bb390675bb1746f24c8352e73240a8d670 (patch)
tree1af6208350561a5afab804caeeb7898bc85a40cf /indra/llappearance/lltexlayer.cpp
parent5c101330caf7eb4ee145c8b2f2921ff6b3a870ee (diff)
Exposing more tex layer information for hash id generation
Diffstat (limited to 'indra/llappearance/lltexlayer.cpp')
-rw-r--r--indra/llappearance/lltexlayer.cpp20
1 files changed, 17 insertions, 3 deletions
diff --git a/indra/llappearance/lltexlayer.cpp b/indra/llappearance/lltexlayer.cpp
index 79d870c61d..6f079b4abb 100644
--- a/indra/llappearance/lltexlayer.cpp
+++ b/indra/llappearance/lltexlayer.cpp
@@ -903,6 +903,21 @@ const std::string& LLTexLayerInterface::getName() const
return mInfo->mName;
}
+ETextureIndex LLTexLayerInterface::getLocalTextureIndex() const
+{
+ return (ETextureIndex) mInfo->mLocalTexture;
+}
+
+LLWearableType::EType LLTexLayerInterface::getWearableType() const
+{
+ ETextureIndex te = getLocalTextureIndex();
+ if (TEX_INVALID == te)
+ {
+ return LLWearableType::WT_INVALID;
+ }
+ return LLAvatarAppearanceDictionary::getTEWearableType(te);
+}
+
LLTexLayerInterface::ERenderPass LLTexLayerInterface::getRenderPass() const
{
return mInfo->mRenderPass;
@@ -1585,13 +1600,12 @@ U32 LLTexLayerTemplate::updateWearableCache() const
{
mWearableCache.clear();
- S32 te = mInfo->mLocalTexture;
- if (te == -1)
+ LLWearableType::EType wearable_type = getWearableType();
+ if (LLWearableType::WT_INVALID == wearable_type)
{
//this isn't a cloneable layer
return 0;
}
- LLWearableType::EType wearable_type = LLAvatarAppearanceDictionary::getTEWearableType((ETextureIndex)te);
U32 num_wearables = getAvatarAppearance()->getWearableData()->getWearableCount(wearable_type);
U32 added = 0;
for (U32 i = 0; i < num_wearables; i++)