diff options
author | Geenz <geenz@geenzo.com> | 2013-05-13 22:22:51 -0400 |
---|---|---|
committer | Geenz <geenz@geenzo.com> | 2013-05-13 22:22:51 -0400 |
commit | 3779e51bfc2010877960d11b463c7316514bf991 (patch) | |
tree | ab528a6e7f78f136f9d0f0f7e939264897a44ae1 /indra/llcharacter/llvisualparam.cpp | |
parent | b27899ee0e035ebd4072a5e6162678f2afe81053 (diff) | |
parent | 4dd245055f3417d8f8fb611a198ed5671dbce292 (diff) |
Merged with https://bitbucket.org/lindenlab/viewer-beta
Diffstat (limited to 'indra/llcharacter/llvisualparam.cpp')
-rwxr-xr-x[-rw-r--r--] | indra/llcharacter/llvisualparam.cpp | 33 |
1 files changed, 32 insertions, 1 deletions
diff --git a/indra/llcharacter/llvisualparam.cpp b/indra/llcharacter/llvisualparam.cpp index 809b312abe..f7cb0f76b7 100644..100755 --- a/indra/llcharacter/llvisualparam.cpp +++ b/indra/llcharacter/llvisualparam.cpp @@ -168,7 +168,8 @@ LLVisualParam::LLVisualParam() mIsAnimating( FALSE ), mID( -1 ), mInfo( 0 ), - mIsDummy(FALSE) + mIsDummy(FALSE), + mParamLocation(LOC_UNKNOWN) { } @@ -250,6 +251,7 @@ void LLVisualParam::setAnimationTarget(F32 target_value, BOOL upload_bake) if (mIsDummy) { setWeight(target_value, upload_bake); + mTargetWeight = mCurWeight; return; } @@ -319,3 +321,32 @@ void LLVisualParam::resetDrivenParams() // nothing to do for non-driver parameters return; } + +const std::string param_location_name(const EParamLocation& loc) +{ + switch (loc) + { + case LOC_UNKNOWN: return "unknown"; + case LOC_AV_SELF: return "self"; + case LOC_AV_OTHER: return "other"; + case LOC_WEARABLE: return "wearable"; + default: return "error"; + } +} + +void LLVisualParam::setParamLocation(EParamLocation loc) +{ + if (mParamLocation == LOC_UNKNOWN || loc == LOC_UNKNOWN) + { + mParamLocation = loc; + } + else if (mParamLocation == loc) + { + // no action + } + else + { + lldebugs << "param location is already " << mParamLocation << ", not slamming to " << loc << llendl; + } +} + |