diff options
author | Nyx (Neal Orman) <nyx@lindenlab.com> | 2009-11-13 18:20:01 -0500 |
---|---|---|
committer | Nyx (Neal Orman) <nyx@lindenlab.com> | 2009-11-13 18:20:01 -0500 |
commit | 4bb5cd169b297efbcf1bdb58a45be24932cf8241 (patch) | |
tree | d416c0e99aef55b6053d3b0ba56eeec3eb5c3e81 | |
parent | 0ce8ce50d8ec1d7575209a1de15527f060c8c0f6 (diff) | |
parent | be429a3ae9bdb45b1fe4bbc185814604167ab18c (diff) |
Automated merge with ssh://hg.lindenlab.com/tulla/avatar-pipeline-2-0/
--HG--
branch : avatar-pipeline
-rw-r--r-- | indra/newview/llwearable.cpp | 31 |
1 files changed, 30 insertions, 1 deletions
diff --git a/indra/newview/llwearable.cpp b/indra/newview/llwearable.cpp index c5c97e7649..e37dffd526 100644 --- a/indra/newview/llwearable.cpp +++ b/indra/newview/llwearable.cpp @@ -831,6 +831,7 @@ void LLWearable::addVisualParam(LLVisualParam *param) } param->setIsDummy(FALSE); mVisualParamIndexMap[param->getID()] = param; + mSavedVisualParamMap[param->getID()] = param->getDefaultWeight(); } void LLWearable::setVisualParams() @@ -933,11 +934,39 @@ void LLWearable::setClothesColor( S32 te, const LLColor4& new_color, BOOL upload void LLWearable::revertValues() { //update saved settings so wearable is no longer dirty + // non-driver params first for (param_map_t::const_iterator iter = mSavedVisualParamMap.begin(); iter != mSavedVisualParamMap.end(); iter++) { S32 id = iter->first; F32 value = iter->second; - setVisualParamWeight(id, value, TRUE); + LLVisualParam *param = getVisualParam(id); + if(param && !dynamic_cast<LLDriverParam*>(param) ) + { + setVisualParamWeight(id, value, TRUE); + } + } + + //then driver params + for (param_map_t::const_iterator iter = mSavedVisualParamMap.begin(); iter != mSavedVisualParamMap.end(); iter++) + { + S32 id = iter->first; + F32 value = iter->second; + LLVisualParam *param = getVisualParam(id); + if(param && dynamic_cast<LLDriverParam*>(param) ) + { + setVisualParamWeight(id, value, TRUE); + } + } + + // make sure that saved values are sane + for (param_map_t::const_iterator iter = mSavedVisualParamMap.begin(); iter != mSavedVisualParamMap.end(); iter++) + { + S32 id = iter->first; + LLVisualParam *param = getVisualParam(id); + if( param ) + { + mSavedVisualParamMap[id] = param->getWeight(); + } } syncImages(mSavedTEMap, mTEMap); |