summaryrefslogtreecommitdiff
path: root/indra/newview/llvoavatarself.cpp
diff options
context:
space:
mode:
authorNyx (Neal Orman) <nyx@lindenlab.com>2010-03-15 12:08:57 -0400
committerNyx (Neal Orman) <nyx@lindenlab.com>2010-03-15 12:08:57 -0400
commit8112ba5bafe404a43a22a57eb0aa96d884fab365 (patch)
tree6230a1e2f204e59d86f4d45baebabe386dcae5b5 /indra/newview/llvoavatarself.cpp
parenta618a3913af506878adf59a2c5b5fb12e665e35b (diff)
EXT-6010 Appearance reverts to an old outfit while attempting to wear new outfit
Added code to suppress local composite updates while wearables are loaded. This makes sure that we don't update your appearance until all your wearables are added to gAgentWearables. Hackish for 2.0, but will be inherently better for 2.1 code reviewed by vir.
Diffstat (limited to 'indra/newview/llvoavatarself.cpp')
-rw-r--r--indra/newview/llvoavatarself.cpp26
1 files changed, 21 insertions, 5 deletions
diff --git a/indra/newview/llvoavatarself.cpp b/indra/newview/llvoavatarself.cpp
index 7dc8772753..32c24b3ebd 100644
--- a/indra/newview/llvoavatarself.cpp
+++ b/indra/newview/llvoavatarself.cpp
@@ -765,6 +765,7 @@ void LLVOAvatarSelf::removeMissingBakedTextures()
{
for (U32 i = 0; i < mBakedTextureDatas.size(); i++)
{
+ mBakedTextureDatas[i].mTexLayerSet->setUpdatesEnabled(TRUE);
invalidateComposite(mBakedTextureDatas[i].mTexLayerSet, FALSE);
}
updateMeshTextures();
@@ -952,6 +953,7 @@ void LLVOAvatarSelf::wearableUpdated( EWearableType type, BOOL upload_result )
{
if (mBakedTextureDatas[index].mTexLayerSet)
{
+ mBakedTextureDatas[index].mTexLayerSet->setUpdatesEnabled(true);
invalidateComposite(mBakedTextureDatas[index].mTexLayerSet, upload_result);
}
break;
@@ -1364,17 +1366,31 @@ void LLVOAvatarSelf::invalidateAll()
//-----------------------------------------------------------------------------
// setCompositeUpdatesEnabled()
//-----------------------------------------------------------------------------
-void LLVOAvatarSelf::setCompositeUpdatesEnabled( BOOL b )
+void LLVOAvatarSelf::setCompositeUpdatesEnabled( bool b )
{
for (U32 i = 0; i < mBakedTextureDatas.size(); i++)
{
- if (mBakedTextureDatas[i].mTexLayerSet )
- {
- mBakedTextureDatas[i].mTexLayerSet->setUpdatesEnabled( b );
- }
+ setCompositeUpdatesEnabled(i, b);
+ }
+}
+
+void LLVOAvatarSelf::setCompositeUpdatesEnabled(U32 index, bool b)
+{
+ if (mBakedTextureDatas[index].mTexLayerSet )
+ {
+ mBakedTextureDatas[index].mTexLayerSet->setUpdatesEnabled( b );
}
}
+bool LLVOAvatarSelf::isCompositeUpdateEnabled(U32 index)
+{
+ if (mBakedTextureDatas[index].mTexLayerSet)
+ {
+ return mBakedTextureDatas[index].mTexLayerSet->getUpdatesEnabled();
+ }
+ return false;
+}
+
void LLVOAvatarSelf::setupComposites()
{
for (U32 i = 0; i < mBakedTextureDatas.size(); i++)