diff options
| author | Vadim Savchuk <vsavchuk@productengine.com> | 2010-02-05 15:12:54 +0200 |
|---|---|---|
| committer | Vadim Savchuk <vsavchuk@productengine.com> | 2010-02-05 15:12:54 +0200 |
| commit | 312f5553aea988a3a795ee45d00be861c1fc3aa9 (patch) | |
| tree | 8676bad1bd1e68e90dfba505da5d2fcf4f3d7d2a /indra/newview/llwearable.cpp | |
| parent | b80c6d68874a11292e7dff59b03b1d0f46fad232 (diff) | |
| parent | 456bbdfa2f3471896f6981e70a9daa56dae51d18 (diff) | |
Merge from default branch
--HG--
branch : product-engine
Diffstat (limited to 'indra/newview/llwearable.cpp')
| -rw-r--r-- | indra/newview/llwearable.cpp | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/indra/newview/llwearable.cpp b/indra/newview/llwearable.cpp index d093031bea..acfbc23f62 100644 --- a/indra/newview/llwearable.cpp +++ b/indra/newview/llwearable.cpp @@ -625,7 +625,9 @@ void LLWearable::writeToAvatar() // Pull params for( LLVisualParam* param = avatar->getFirstVisualParam(); param; param = avatar->getNextVisualParam() ) { - if( (((LLViewerVisualParam*)param)->getWearableType() == mType) ) + // cross-wearable parameters are not authoritative, as they are driven by a different wearable. So don't copy the values to the + // avatar object if cross wearable. Cross wearable params get their values from the avatar, they shouldn't write the other way. + if( (((LLViewerVisualParam*)param)->getWearableType() == mType) && (!((LLViewerVisualParam*)param)->getCrossWearable()) ) { S32 param_id = param->getID(); F32 weight = getVisualParamWeight(param_id); @@ -1085,6 +1087,26 @@ void LLWearable::destroyTextures() mSavedTEMap.clear(); } +void LLWearable::pullCrossWearableValues() +{ + // scan through all of the avatar's visual parameters + LLVOAvatar* avatar = gAgent.getAvatarObject(); + for (LLViewerVisualParam* param = (LLViewerVisualParam*) avatar->getFirstVisualParam(); + param; + param = (LLViewerVisualParam*) avatar->getNextVisualParam()) + { + if( param ) + { + LLDriverParam *driver_param = dynamic_cast<LLDriverParam*>(param); + if(driver_param) + { + // parameter is a driver parameter, have it update its + driver_param->updateCrossDrivenParams(getType()); + } + } + } +} + void LLWearable::setLabelUpdated() const { |
