summaryrefslogtreecommitdiff
path: root/indra/newview/llvoavatar.cpp
diff options
context:
space:
mode:
authorNyx (Neal Orman) <nyx@lindenlab.com>2009-11-11 16:37:59 -0500
committerNyx (Neal Orman) <nyx@lindenlab.com>2009-11-11 16:37:59 -0500
commitf6406b7174fc6751ee60a6263360d82f382c6175 (patch)
treee468d6f7572cda96127c38099e2c6188b6c8d586 /indra/newview/llvoavatar.cpp
parentb7740ee0c540c884170ffacf88132af3f93a3f96 (diff)
EXT-2173 use of visual param animation inconsistent at best
removed ambiguous parameter "set_by_user" from many places in codebase, renaming it to be upload_bake, which is a more accurate descriptor. This allowed me to see several inconsistencies in how this variable was being set - these errors were also fixed. User-visible result should be that baked textures are not reuploaded on changing avatar sex until the save button is pressed. primary win here is code clarity. Code reviewed by Bigpapi.
Diffstat (limited to 'indra/newview/llvoavatar.cpp')
-rw-r--r--indra/newview/llvoavatar.cpp40
1 files changed, 19 insertions, 21 deletions
diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp
index 16bd74f798..52023b2139 100644
--- a/indra/newview/llvoavatar.cpp
+++ b/indra/newview/llvoavatar.cpp
@@ -647,7 +647,6 @@ LLVOAvatar::LLVOAvatar(const LLUUID& id,
mWindFreq(0.f),
mRipplePhase( 0.f ),
mBelowWater(FALSE),
- mAppearanceAnimSetByUser(FALSE),
mLastAppearanceBlendTime(0.f),
mAppearanceAnimating(FALSE),
mNameString(),
@@ -2436,7 +2435,7 @@ void LLVOAvatar::idleUpdateAppearanceAnimation()
{
if (param->getGroup() == VISUAL_PARAM_GROUP_TWEAKABLE)
{
- param->stopAnimating(mAppearanceAnimSetByUser);
+ param->stopAnimating(FALSE);
}
}
updateVisualParams();
@@ -2459,7 +2458,7 @@ void LLVOAvatar::idleUpdateAppearanceAnimation()
{
if (param->getGroup() == VISUAL_PARAM_GROUP_TWEAKABLE)
{
- param->animate(morph_amt, mAppearanceAnimSetByUser);
+ param->animate(morph_amt, FALSE);
}
}
}
@@ -5372,11 +5371,11 @@ void LLVOAvatar::updateShadowFaces()
//-----------------------------------------------------------------------------
// updateSexDependentLayerSets()
//-----------------------------------------------------------------------------
-void LLVOAvatar::updateSexDependentLayerSets( BOOL set_by_user )
+void LLVOAvatar::updateSexDependentLayerSets( BOOL upload_bake )
{
- invalidateComposite( mBakedTextureDatas[BAKED_HEAD].mTexLayerSet, set_by_user );
- invalidateComposite( mBakedTextureDatas[BAKED_UPPER].mTexLayerSet, set_by_user );
- invalidateComposite( mBakedTextureDatas[BAKED_LOWER].mTexLayerSet, set_by_user );
+ invalidateComposite( mBakedTextureDatas[BAKED_HEAD].mTexLayerSet, upload_bake );
+ invalidateComposite( mBakedTextureDatas[BAKED_UPPER].mTexLayerSet, upload_bake );
+ invalidateComposite( mBakedTextureDatas[BAKED_LOWER].mTexLayerSet, upload_bake );
}
//-----------------------------------------------------------------------------
@@ -5741,7 +5740,7 @@ LLColor4 LLVOAvatar::getGlobalColor( const std::string& color_name ) const
}
// virtual
-void LLVOAvatar::invalidateComposite( LLTexLayerSet* layerset, BOOL set_by_user )
+void LLVOAvatar::invalidateComposite( LLTexLayerSet* layerset, BOOL upload_result )
{
}
@@ -5754,18 +5753,18 @@ void LLVOAvatar::setCompositeUpdatesEnabled( BOOL b )
{
}
-void LLVOAvatar::onGlobalColorChanged(const LLTexGlobalColor* global_color, BOOL set_by_user )
+void LLVOAvatar::onGlobalColorChanged(const LLTexGlobalColor* global_color, BOOL upload_bake )
{
if (global_color == mTexSkinColor)
{
- invalidateComposite( mBakedTextureDatas[BAKED_HEAD].mTexLayerSet, set_by_user );
- invalidateComposite( mBakedTextureDatas[BAKED_UPPER].mTexLayerSet, set_by_user );
- invalidateComposite( mBakedTextureDatas[BAKED_LOWER].mTexLayerSet, set_by_user );
+ invalidateComposite( mBakedTextureDatas[BAKED_HEAD].mTexLayerSet, upload_bake );
+ invalidateComposite( mBakedTextureDatas[BAKED_UPPER].mTexLayerSet, upload_bake );
+ invalidateComposite( mBakedTextureDatas[BAKED_LOWER].mTexLayerSet, upload_bake );
}
else if (global_color == mTexHairColor)
{
- invalidateComposite( mBakedTextureDatas[BAKED_HEAD].mTexLayerSet, set_by_user );
- invalidateComposite( mBakedTextureDatas[BAKED_HAIR].mTexLayerSet, set_by_user );
+ invalidateComposite( mBakedTextureDatas[BAKED_HEAD].mTexLayerSet, upload_bake );
+ invalidateComposite( mBakedTextureDatas[BAKED_HAIR].mTexLayerSet, upload_bake );
// ! BACKWARDS COMPATIBILITY !
// Fix for dealing with avatars from viewers that don't bake hair.
@@ -5781,7 +5780,7 @@ void LLVOAvatar::onGlobalColorChanged(const LLTexGlobalColor* global_color, BOOL
else if (global_color == mTexEyeColor)
{
// llinfos << "invalidateComposite cause: onGlobalColorChanged( eyecolor )" << llendl;
- invalidateComposite( mBakedTextureDatas[BAKED_EYES].mTexLayerSet, set_by_user );
+ invalidateComposite( mBakedTextureDatas[BAKED_EYES].mTexLayerSet, upload_bake );
}
updateMeshTextures();
}
@@ -6239,14 +6238,14 @@ BOOL LLVOAvatar::teToColorParams( ETextureIndex te, U32 *param_name )
return TRUE;
}
-void LLVOAvatar::setClothesColor( ETextureIndex te, const LLColor4& new_color, BOOL set_by_user )
+void LLVOAvatar::setClothesColor( ETextureIndex te, const LLColor4& new_color, BOOL upload_bake )
{
U32 param_name[3];
if( teToColorParams( te, param_name ) )
{
- setVisualParamWeight( param_name[0], new_color.mV[VX], set_by_user );
- setVisualParamWeight( param_name[1], new_color.mV[VY], set_by_user );
- setVisualParamWeight( param_name[2], new_color.mV[VZ], set_by_user );
+ setVisualParamWeight( param_name[0], new_color.mV[VX], upload_bake );
+ setVisualParamWeight( param_name[1], new_color.mV[VY], upload_bake );
+ setVisualParamWeight( param_name[2], new_color.mV[VZ], upload_bake );
}
}
@@ -6977,11 +6976,10 @@ void LLVOAvatar::cullAvatarsByPixelArea()
}
}
-void LLVOAvatar::startAppearanceAnimation(BOOL set_by_user, BOOL play_sound)
+void LLVOAvatar::startAppearanceAnimation()
{
if(!mAppearanceAnimating)
{
- mAppearanceAnimSetByUser = set_by_user;
mAppearanceAnimating = TRUE;
mAppearanceMorphTimer.reset();
mLastAppearanceBlendTime = 0.f;