diff options
author | simon <none@none> | 2013-04-11 16:23:36 -0700 |
---|---|---|
committer | simon <none@none> | 2013-04-11 16:23:36 -0700 |
commit | 066f2acadf6f1624fcdfc22263a890c370473887 (patch) | |
tree | a4e52b29d8074cdc8782ff28b9b0500b32dada50 /indra/llcharacter/llvisualparam.cpp | |
parent | 98a82c50d539451e1931826ca75fbc01d611806d (diff) | |
parent | 460c81070e5fa1c51ce7e186a9ecb8c5f1c995e1 (diff) |
Forgot to commit @#! merge
Diffstat (limited to 'indra/llcharacter/llvisualparam.cpp')
-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 --- 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; + } +} + |