summaryrefslogtreecommitdiff
path: root/indra/llcharacter/llvisualparam.cpp
diff options
context:
space:
mode:
authorprep <prep@lindenlab.com>2013-03-11 15:17:13 -0400
committerprep <prep@lindenlab.com>2013-03-11 15:17:13 -0400
commit8e3b190e919fde84a2189d974208f9d199d4bea6 (patch)
tree7ab1db96d291260cbad356533607e1bce36ed0a7 /indra/llcharacter/llvisualparam.cpp
parent2ea750ebcad8335aeb0ec77a483831b62d05f643 (diff)
parente0c9174609e2457fab7fe6d7291c6ebbd030397c (diff)
merge
Diffstat (limited to 'indra/llcharacter/llvisualparam.cpp')
-rw-r--r--indra/llcharacter/llvisualparam.cpp33
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;
+ }
+}
+