diff options
author | Nyx Linden <nyx@lindenlab.com> | 2013-02-06 18:38:17 -0500 |
---|---|---|
committer | Nyx Linden <nyx@lindenlab.com> | 2013-02-06 18:38:17 -0500 |
commit | 1cf611b0592b1f91979bfbac7870b64f3623eef9 (patch) | |
tree | 6031f13bf2053b34c57a65603053ac47619299cf /indra | |
parent | 12f5f0669c1195ca7d76f3112e1409b6a06bc496 (diff) |
SH-3651 FIX Beard edits not applying on server bakes
Despite incrementing the COF version, beard edits were not updating the head hash.
We were not applying layers/parameters to the baked texture hashes for
layers that did not contain a user-defined image. However, many layers have standard
morph masks, etc that are affected by wearable parameters.
Edited the LLTexLayerInterface::getWearable() method to return the proper wearable type
if there is no associated local texture index, and all parameters in the wearable
refer to a particular wearable type. Should be safe even if some (but not all) params
have no wearable type defined.
Diffstat (limited to 'indra')
-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); } |