summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
Diffstat (limited to 'indra')
-rw-r--r--indra/newview/llscrollingpanelparam.cpp4
-rw-r--r--indra/newview/lltoolmorph.cpp8
-rw-r--r--indra/newview/lltoolmorph.h2
3 files changed, 10 insertions, 4 deletions
diff --git a/indra/newview/llscrollingpanelparam.cpp b/indra/newview/llscrollingpanelparam.cpp
index a5518d87d4..242af6981c 100644
--- a/indra/newview/llscrollingpanelparam.cpp
+++ b/indra/newview/llscrollingpanelparam.cpp
@@ -73,9 +73,9 @@ LLScrollingPanelParam::LLScrollingPanelParam( const LLPanel::Params& panel_param
F32 min_weight = param->getMinWeight();
F32 max_weight = param->getMaxWeight();
- mHintMin = new LLVisualParamHint( pos_x, pos_y, PARAM_HINT_WIDTH, PARAM_HINT_HEIGHT, mesh, (LLViewerVisualParam*) wearable->getVisualParam(param->getID()), min_weight);
+ mHintMin = new LLVisualParamHint( pos_x, pos_y, PARAM_HINT_WIDTH, PARAM_HINT_HEIGHT, mesh, (LLViewerVisualParam*) wearable->getVisualParam(param->getID()), wearable, min_weight);
pos_x = getChild<LLViewBorder>("right_border")->getRect().mLeft + left_border->getBorderWidth();
- mHintMax = new LLVisualParamHint( pos_x, pos_y, PARAM_HINT_WIDTH, PARAM_HINT_HEIGHT, mesh, (LLViewerVisualParam*) wearable->getVisualParam(param->getID()), max_weight );
+ mHintMax = new LLVisualParamHint( pos_x, pos_y, PARAM_HINT_WIDTH, PARAM_HINT_HEIGHT, mesh, (LLViewerVisualParam*) wearable->getVisualParam(param->getID()), wearable, max_weight );
mHintMin->setAllowsUpdates( FALSE );
mHintMax->setAllowsUpdates( FALSE );
diff --git a/indra/newview/lltoolmorph.cpp b/indra/newview/lltoolmorph.cpp
index 22176c037f..22e15dcff2 100644
--- a/indra/newview/lltoolmorph.cpp
+++ b/indra/newview/lltoolmorph.cpp
@@ -79,6 +79,7 @@ LLVisualParamHint::LLVisualParamHint(
S32 width, S32 height,
LLViewerJointMesh *mesh,
LLViewerVisualParam *param,
+ LLWearable *wearable,
F32 param_weight)
:
LLViewerDynamicTexture(width, height, 3, LLViewerDynamicTexture::ORDER_MIDDLE, TRUE ),
@@ -86,6 +87,7 @@ LLVisualParamHint::LLVisualParamHint(
mIsVisible( FALSE ),
mJointMesh( mesh ),
mVisualParam( param ),
+ mWearablePtr( wearable ),
mVisualParamWeight( param_weight ),
mAllowsUpdates( TRUE ),
mDelayFrames( 0 ),
@@ -151,7 +153,7 @@ BOOL LLVisualParamHint::needsRender()
void LLVisualParamHint::preRender(BOOL clear_depth)
{
mLastParamWeight = mVisualParam->getWeight();
- mVisualParam->setWeight(mVisualParamWeight, FALSE);
+ mWearablePtr->setVisualParamWeight(mVisualParam->getID(), mVisualParamWeight, FALSE);
gAgentAvatarp->setVisualParamWeight(mVisualParam->getID(), mVisualParamWeight, FALSE);
gAgentAvatarp->setVisualParamWeight("Blink_Left", 0.f);
gAgentAvatarp->setVisualParamWeight("Blink_Right", 0.f);
@@ -250,10 +252,12 @@ BOOL LLVisualParamHint::render()
gGL.setAlphaRejectSettings(LLRender::CF_DEFAULT);
}
gAgentAvatarp->setVisualParamWeight(mVisualParam->getID(), mLastParamWeight);
- mVisualParam->setWeight(mLastParamWeight, FALSE);
+ mWearablePtr->setVisualParamWeight(mVisualParam->getID(), mLastParamWeight, FALSE);
+ gAgentAvatarp->updateVisualParams();
gGL.color4f(1,1,1,1);
mGLTexturep->setGLTextureCreated(true);
gGL.popUIMatrix();
+
return TRUE;
}
diff --git a/indra/newview/lltoolmorph.h b/indra/newview/lltoolmorph.h
index c332c296bd..3bffefaa55 100644
--- a/indra/newview/lltoolmorph.h
+++ b/indra/newview/lltoolmorph.h
@@ -62,6 +62,7 @@ public:
S32 width, S32 height,
LLViewerJointMesh *mesh,
LLViewerVisualParam *param,
+ LLWearable *wearable,
F32 param_weight);
/*virtual*/ S8 getType() const ;
@@ -89,6 +90,7 @@ protected:
BOOL mIsVisible; // is this distortion hint visible?
LLViewerJointMesh* mJointMesh; // mesh that this distortion applies to
LLViewerVisualParam* mVisualParam; // visual param applied by this hint
+ LLWearable* mWearablePtr; // wearable we're editing
F32 mVisualParamWeight; // weight for this visual parameter
BOOL mAllowsUpdates; // updates are blocked unless this is true
S32 mDelayFrames; // updates are blocked for this many frames