diff options
author | Armin Weatherwax | 2011-01-29 15:50:28 +0100 |
---|---|---|
committer | Armin Weatherwax | 2011-01-29 17:31:32 +0100 |
commit | 76c8494525b8e2b17bbe61f0bde61645b825bb66 (patch) | |
tree | c19042985edbe2f7d278fe6e8787d61adfbfcf2f /linden/indra/llcharacter | |
parent | Add an UI for Display name settings to prefs general, make the setting more i... (diff) | |
download | meta-impy-76c8494525b8e2b17bbe61f0bde61645b825bb66.zip meta-impy-76c8494525b8e2b17bbe61f0bde61645b825bb66.tar.gz meta-impy-76c8494525b8e2b17bbe61f0bde61645b825bb66.tar.bz2 meta-impy-76c8494525b8e2b17bbe61f0bde61645b825bb66.tar.xz |
Update: Henri Beauchamp: Port of SG-2.0 alpha and tattoo layers v6->v9
issue tattoo tinting does not work
Diffstat (limited to 'linden/indra/llcharacter')
-rw-r--r-- | linden/indra/llcharacter/llcharacter.cpp | 4 | ||||
-rw-r--r-- | linden/indra/llcharacter/llcharacter.h | 14 | ||||
-rw-r--r-- | linden/indra/llcharacter/llvisualparam.cpp | 4 | ||||
-rw-r--r-- | linden/indra/llcharacter/llvisualparam.h | 2 |
4 files changed, 20 insertions, 4 deletions
diff --git a/linden/indra/llcharacter/llcharacter.cpp b/linden/indra/llcharacter/llcharacter.cpp index 46ac326..72cef83 100644 --- a/linden/indra/llcharacter/llcharacter.cpp +++ b/linden/indra/llcharacter/llcharacter.cpp | |||
@@ -379,7 +379,7 @@ void LLCharacter::clearVisualParamWeights() | |||
379 | param; | 379 | param; |
380 | param = getNextVisualParam()) | 380 | param = getNextVisualParam()) |
381 | { | 381 | { |
382 | if (param->getGroup() == VISUAL_PARAM_GROUP_TWEAKABLE) | 382 | if (param->isTweakable()) |
383 | { | 383 | { |
384 | param->setWeight( param->getDefaultWeight(), FALSE ); | 384 | param->setWeight( param->getDefaultWeight(), FALSE ); |
385 | } | 385 | } |
@@ -395,7 +395,7 @@ BOOL LLCharacter::visualParamWeightsAreDefault() | |||
395 | param; | 395 | param; |
396 | param = getNextVisualParam()) | 396 | param = getNextVisualParam()) |
397 | { | 397 | { |
398 | if (param->getGroup() == VISUAL_PARAM_GROUP_TWEAKABLE) | 398 | if (param->isTweakable()) |
399 | { | 399 | { |
400 | if (param->getWeight() != param->getDefaultWeight()) | 400 | if (param->getWeight() != param->getDefaultWeight()) |
401 | return false; | 401 | return false; |
diff --git a/linden/indra/llcharacter/llcharacter.h b/linden/indra/llcharacter/llcharacter.h index d91124b..7630760 100644 --- a/linden/indra/llcharacter/llcharacter.h +++ b/linden/indra/llcharacter/llcharacter.h | |||
@@ -231,6 +231,20 @@ public: | |||
231 | return (mCurIterator++)->second; | 231 | return (mCurIterator++)->second; |
232 | } | 232 | } |
233 | 233 | ||
234 | S32 getVisualParamCountInGroup(EVisualParamGroup group) | ||
235 | { | ||
236 | S32 rtn = 0; | ||
237 | VisualParamIndexMap_t::iterator iter; | ||
238 | for (iter = mVisualParamIndexMap.begin(); iter != mVisualParamIndexMap.end(); iter++) | ||
239 | { | ||
240 | if (iter->second->getGroup() == group) | ||
241 | { | ||
242 | rtn++; | ||
243 | } | ||
244 | } | ||
245 | return rtn; | ||
246 | } | ||
247 | |||
234 | LLVisualParam* getVisualParam(S32 id) | 248 | LLVisualParam* getVisualParam(S32 id) |
235 | { | 249 | { |
236 | VisualParamIndexMap_t::iterator iter = mVisualParamIndexMap.find(id); | 250 | VisualParamIndexMap_t::iterator iter = mVisualParamIndexMap.find(id); |
diff --git a/linden/indra/llcharacter/llvisualparam.cpp b/linden/indra/llcharacter/llvisualparam.cpp index d7a144e..9579ff8 100644 --- a/linden/indra/llcharacter/llvisualparam.cpp +++ b/linden/indra/llcharacter/llvisualparam.cpp | |||
@@ -238,7 +238,7 @@ void LLVisualParam::setAnimationTarget(F32 target_value, BOOL set_by_user) | |||
238 | { | 238 | { |
239 | if (mInfo) | 239 | if (mInfo) |
240 | { | 240 | { |
241 | if (getGroup() == VISUAL_PARAM_GROUP_TWEAKABLE) | 241 | if (isTweakable()) |
242 | { | 242 | { |
243 | mTargetWeight = llclamp(target_value, mInfo->mMinWeight, mInfo->mMaxWeight); | 243 | mTargetWeight = llclamp(target_value, mInfo->mMinWeight, mInfo->mMaxWeight); |
244 | } | 244 | } |
@@ -282,7 +282,7 @@ void LLVisualParam::animate( F32 delta, BOOL set_by_user ) | |||
282 | //----------------------------------------------------------------------------- | 282 | //----------------------------------------------------------------------------- |
283 | void LLVisualParam::stopAnimating(BOOL set_by_user) | 283 | void LLVisualParam::stopAnimating(BOOL set_by_user) |
284 | { | 284 | { |
285 | if (mIsAnimating && getGroup() == VISUAL_PARAM_GROUP_TWEAKABLE) | 285 | if (mIsAnimating && isTweakable()) |
286 | { | 286 | { |
287 | mIsAnimating = FALSE; | 287 | mIsAnimating = FALSE; |
288 | setWeight(mTargetWeight, set_by_user); | 288 | setWeight(mTargetWeight, set_by_user); |
diff --git a/linden/indra/llcharacter/llvisualparam.h b/linden/indra/llcharacter/llvisualparam.h index 3a0c1bb..8ec5497 100644 --- a/linden/indra/llcharacter/llvisualparam.h +++ b/linden/indra/llcharacter/llvisualparam.h | |||
@@ -51,6 +51,7 @@ enum EVisualParamGroup | |||
51 | { | 51 | { |
52 | VISUAL_PARAM_GROUP_TWEAKABLE, | 52 | VISUAL_PARAM_GROUP_TWEAKABLE, |
53 | VISUAL_PARAM_GROUP_ANIMATABLE, | 53 | VISUAL_PARAM_GROUP_ANIMATABLE, |
54 | VISUAL_PARAM_GROUP_TWEAKABLE_NO_TRANSMIT, | ||
54 | NUM_VISUAL_PARAM_GROUPS | 55 | NUM_VISUAL_PARAM_GROUPS |
55 | }; | 56 | }; |
56 | 57 | ||
@@ -140,6 +141,7 @@ public: | |||
140 | 141 | ||
141 | virtual void setAnimating(BOOL is_animating) { mIsAnimating = is_animating; } | 142 | virtual void setAnimating(BOOL is_animating) { mIsAnimating = is_animating; } |
142 | BOOL getAnimating() { return mIsAnimating; } | 143 | BOOL getAnimating() { return mIsAnimating; } |
144 | BOOL isTweakable() { return (getGroup() == VISUAL_PARAM_GROUP_TWEAKABLE) || (getGroup() == VISUAL_PARAM_GROUP_TWEAKABLE_NO_TRANSMIT); } | ||
143 | 145 | ||
144 | protected: | 146 | protected: |
145 | F32 mCurWeight; // current weight | 147 | F32 mCurWeight; // current weight |