diff options
author | Don Kjer <don@lindenlab.com> | 2013-02-09 00:44:41 +0000 |
---|---|---|
committer | Don Kjer <don@lindenlab.com> | 2013-02-09 00:44:41 +0000 |
commit | d501a6e29194e6b8faa04221090c14288d099b41 (patch) | |
tree | ad2526670c247a61b82bf153572aea66d3486669 /indra/llappearance/lltexlayer.cpp | |
parent | b342b96b3a80757f8772e921442f68c23dea592f (diff) | |
parent | 20b2e23e7d5a45f2f8efcdcc1bbf0b865cd3f89a (diff) |
Automated merge
Diffstat (limited to 'indra/llappearance/lltexlayer.cpp')
-rw-r--r-- | indra/llappearance/lltexlayer.cpp | 40 |
1 files changed, 39 insertions, 1 deletions
diff --git a/indra/llappearance/lltexlayer.cpp b/indra/llappearance/lltexlayer.cpp index 15d531259f..3c23f5f293 100644 --- a/indra/llappearance/lltexlayer.cpp +++ b/indra/llappearance/lltexlayer.cpp @@ -932,7 +932,45 @@ LLWearableType::EType LLTexLayerInterface::getWearableType() const ETextureIndex te = getLocalTextureIndex(); if (TEX_INVALID == te) { - return LLWearableType::WT_INVALID; + LLWearableType::EType type = LLWearableType::WT_INVALID; + param_color_list_t::const_iterator color_iter = mParamColorList.begin(); + param_alpha_list_t::const_iterator alpha_iter = mParamAlphaList.begin(); + + for (; color_iter != mParamColorList.end(); color_iter++) + { + LLTexLayerParamColor* param = *color_iter; + if (param) + { + LLWearableType::EType new_type = (LLWearableType::EType)param->getWearableType(); + if (new_type != LLWearableType::WT_INVALID && new_type != type) + { + if (type != LLWearableType::WT_INVALID) + { + return LLWearableType::WT_INVALID; + } + type = new_type; + } + } + } + + for (; alpha_iter != mParamAlphaList.end(); alpha_iter++) + { + LLTexLayerParamAlpha* param = *alpha_iter; + if (param) + { + LLWearableType::EType new_type = (LLWearableType::EType)param->getWearableType(); + if (new_type != LLWearableType::WT_INVALID && new_type != type) + { + if (type != LLWearableType::WT_INVALID) + { + return LLWearableType::WT_INVALID; + } + type = new_type; + } + } + } + + return type; } return LLAvatarAppearanceDictionary::getTEWearableType(te); } |