diff options
author | Tofu Linden <tofu.linden@lindenlab.com> | 2010-06-24 22:50:36 +0100 |
---|---|---|
committer | Tofu Linden <tofu.linden@lindenlab.com> | 2010-06-24 22:50:36 +0100 |
commit | 995d6b9a858ef7d020efbf68440540c046a0c1d5 (patch) | |
tree | e48addabfb4d7a62171db83e16dfd4e498722723 /indra/llcharacter | |
parent | 46ca04e939a13bb4d73777aa66e609a7c0d56e40 (diff) | |
parent | bdede955c3ccffb163fa010e01eb4eca71c36b11 (diff) |
merge
Diffstat (limited to 'indra/llcharacter')
-rw-r--r-- | indra/llcharacter/llcharacter.cpp | 2 | ||||
-rw-r--r-- | indra/llcharacter/llvisualparam.cpp | 4 | ||||
-rw-r--r-- | indra/llcharacter/llvisualparam.h | 2 |
3 files changed, 5 insertions, 3 deletions
diff --git a/indra/llcharacter/llcharacter.cpp b/indra/llcharacter/llcharacter.cpp index 27c0c0b640..11665aff76 100644 --- a/indra/llcharacter/llcharacter.cpp +++ b/indra/llcharacter/llcharacter.cpp @@ -381,7 +381,7 @@ void LLCharacter::clearVisualParamWeights() param; param = getNextVisualParam()) { - if (param->getGroup() == VISUAL_PARAM_GROUP_TWEAKABLE) + if (param->isTweakable()) { param->setWeight( param->getDefaultWeight(), FALSE ); } diff --git a/indra/llcharacter/llvisualparam.cpp b/indra/llcharacter/llvisualparam.cpp index 703fe2f9cc..122406e20b 100644 --- a/indra/llcharacter/llvisualparam.cpp +++ b/indra/llcharacter/llvisualparam.cpp @@ -261,7 +261,7 @@ void LLVisualParam::setAnimationTarget(F32 target_value, BOOL upload_bake) if (mInfo) { - if (getGroup() == VISUAL_PARAM_GROUP_TWEAKABLE) + if (isTweakable()) { mTargetWeight = llclamp(target_value, mInfo->mMinWeight, mInfo->mMaxWeight); } @@ -305,7 +305,7 @@ void LLVisualParam::animate( F32 delta, BOOL upload_bake ) //----------------------------------------------------------------------------- void LLVisualParam::stopAnimating(BOOL upload_bake) { - if (mIsAnimating && getGroup() == VISUAL_PARAM_GROUP_TWEAKABLE) + if (mIsAnimating && isTweakable()) { mIsAnimating = FALSE; setWeight(mTargetWeight, upload_bake); diff --git a/indra/llcharacter/llvisualparam.h b/indra/llcharacter/llvisualparam.h index 12b45e6ebe..20ee5fd7ec 100644 --- a/indra/llcharacter/llvisualparam.h +++ b/indra/llcharacter/llvisualparam.h @@ -52,6 +52,7 @@ enum EVisualParamGroup { VISUAL_PARAM_GROUP_TWEAKABLE, VISUAL_PARAM_GROUP_ANIMATABLE, + VISUAL_PARAM_GROUP_TWEAKABLE_NO_TRANSMIT, NUM_VISUAL_PARAM_GROUPS }; @@ -144,6 +145,7 @@ public: F32 getCurrentWeight() const { return mCurWeight; } F32 getLastWeight() const { return mLastWeight; } BOOL isAnimating() const { return mIsAnimating; } + BOOL isTweakable() const { return (getGroup() == VISUAL_PARAM_GROUP_TWEAKABLE) || (getGroup() == VISUAL_PARAM_GROUP_TWEAKABLE_NO_TRANSMIT); } LLVisualParam* getNextParam() { return mNext; } void setNextParam( LLVisualParam *next ); |