diff options
| author | simon <none@none> | 2013-04-11 16:18:34 -0700 | 
|---|---|---|
| committer | simon <none@none> | 2013-04-11 16:18:34 -0700 | 
| commit | b42b7897233df17eb0f37af2ada9070dbb075eeb (patch) | |
| tree | 5d83e305bf3afac18dec414335fe248be3aaedef /indra/llcharacter/llvisualparam.cpp | |
| parent | c262cb15d38cdf344b6e1ca755e611b02d3db79d (diff) | |
| parent | c7bab8ab8b25249d1f8f87746b50fce4820f542a (diff) | |
Merge in downstream code (chui fixes, materials)
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; +	} +} + | 
