diff options
author | Tofu Linden <tofu.linden@lindenlab.com> | 2010-06-01 22:30:14 +0100 |
---|---|---|
committer | Tofu Linden <tofu.linden@lindenlab.com> | 2010-06-01 22:30:14 +0100 |
commit | 08ee190ec83d617bc21c92eb127af9616d062963 (patch) | |
tree | f657a29bc094f37b194a4df90a3cde5c7552a092 /indra/llcharacter | |
parent | 4cc5c7d2a4511ffc65bf3b6b0b2e29beb5b0fed4 (diff) |
EXT-7499 WIP Prevent other avatars from remaining with a ruth shape
to be reviewed by nyx.
Diffstat (limited to 'indra/llcharacter')
-rw-r--r-- | indra/llcharacter/llcharacter.cpp | 21 | ||||
-rw-r--r-- | indra/llcharacter/llcharacter.h | 20 | ||||
-rw-r--r-- | indra/llcharacter/llvisualparam.cpp | 2 |
3 files changed, 17 insertions, 26 deletions
diff --git a/indra/llcharacter/llcharacter.cpp b/indra/llcharacter/llcharacter.cpp index 40a9752268..27c0c0b640 100644 --- a/indra/llcharacter/llcharacter.cpp +++ b/indra/llcharacter/llcharacter.cpp @@ -389,27 +389,6 @@ void LLCharacter::clearVisualParamWeights() } //----------------------------------------------------------------------------- -// BOOL visualParamWeightsAreDefault() -//----------------------------------------------------------------------------- -BOOL LLCharacter::visualParamWeightsAreDefault() -{ - for (LLVisualParam *param = getFirstVisualParam(); - param; - param = getNextVisualParam()) - { - if (param->getGroup() == VISUAL_PARAM_GROUP_TWEAKABLE) - { - if (param->getWeight() != param->getDefaultWeight()) - return false; - } - } - - return true; -} - - - -//----------------------------------------------------------------------------- // getVisualParam() //----------------------------------------------------------------------------- LLVisualParam* LLCharacter::getVisualParam(const char *param_name) diff --git a/indra/llcharacter/llcharacter.h b/indra/llcharacter/llcharacter.h index 27e2a51c62..cac73c01b9 100644 --- a/indra/llcharacter/llcharacter.h +++ b/indra/llcharacter/llcharacter.h @@ -212,12 +212,9 @@ public: F32 getVisualParamWeight(const char* param_name); F32 getVisualParamWeight(S32 index); - // set all morph weights to 0 + // set all morph weights to defaults void clearVisualParamWeights(); - // see if all the weights are default - BOOL visualParamWeightsAreDefault(); - // visual parameter accessors LLVisualParam* getFirstVisualParam() { @@ -231,6 +228,21 @@ public: return (mCurIterator++)->second; } + S32 getVisualParamCountInGroup(const EVisualParamGroup group) const + { + S32 rtn = 0; + for (visual_param_index_map_t::const_iterator iter = mVisualParamIndexMap.begin(); + iter != mVisualParamIndexMap.end(); + /**/ ) + { + if ((iter++)->second->getGroup() == group) + { + ++rtn; + } + } + return rtn; + } + LLVisualParam* getVisualParam(S32 id) const { visual_param_index_map_t::const_iterator iter = mVisualParamIndexMap.find(id); diff --git a/indra/llcharacter/llvisualparam.cpp b/indra/llcharacter/llvisualparam.cpp index 297322fe58..703fe2f9cc 100644 --- a/indra/llcharacter/llvisualparam.cpp +++ b/indra/llcharacter/llvisualparam.cpp @@ -284,7 +284,7 @@ void LLVisualParam::setAnimationTarget(F32 target_value, BOOL upload_bake) void LLVisualParam::setNextParam( LLVisualParam *next ) { llassert(!mNext); - + llassert(getWeight() == getDefaultWeight()); // need to establish mNext before we start changing values on this, else initial value won't get mirrored (we can fix that, but better to forbid this pattern) mNext = next; } |