From 8112ba5bafe404a43a22a57eb0aa96d884fab365 Mon Sep 17 00:00:00 2001 From: "Nyx (Neal Orman)" Date: Mon, 15 Mar 2010 12:08:57 -0400 Subject: 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. --- indra/newview/llagentwearables.cpp | 1 + indra/newview/llvoavatar.cpp | 5 ----- indra/newview/llvoavatar.h | 4 +++- indra/newview/llvoavatarself.cpp | 26 +++++++++++++++++++++----- indra/newview/llvoavatarself.h | 4 +++- indra/newview/llwearable.cpp | 35 +++++++++++++++++++++++++++++++++++ 6 files changed, 63 insertions(+), 12 deletions(-) diff --git a/indra/newview/llagentwearables.cpp b/indra/newview/llagentwearables.cpp index 7b55282ee5..ea10917901 100644 --- a/indra/newview/llagentwearables.cpp +++ b/indra/newview/llagentwearables.cpp @@ -1759,6 +1759,7 @@ void LLAgentWearables::setWearableOutfit(const LLInventoryItem::item_array_t& it if (mAvatarObject) { + mAvatarObject->setCompositeUpdatesEnabled(TRUE); mAvatarObject->updateVisualParams(); mAvatarObject->invalidateAll(); } diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index 72b9c6df98..f5e83ed025 100644 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -5785,11 +5785,6 @@ void LLVOAvatar::invalidateAll() { } -// virtual -void LLVOAvatar::setCompositeUpdatesEnabled( BOOL b ) -{ -} - void LLVOAvatar::onGlobalColorChanged(const LLTexGlobalColor* global_color, BOOL upload_bake ) { if (global_color == mTexSkinColor) diff --git a/indra/newview/llvoavatar.h b/indra/newview/llvoavatar.h index b5f0ec7176..d5485413f4 100644 --- a/indra/newview/llvoavatar.h +++ b/indra/newview/llvoavatar.h @@ -526,7 +526,9 @@ protected: public: virtual void invalidateComposite(LLTexLayerSet* layerset, BOOL upload_result); virtual void invalidateAll(); - virtual void setCompositeUpdatesEnabled(BOOL b); + virtual void setCompositeUpdatesEnabled(bool b) {} + virtual void setCompositeUpdatesEnabled(U32 index, bool b) {} + virtual bool isCompositeUpdateEnabled(U32 index) { return false; } //-------------------------------------------------------------------- // Static texture/mesh/baked dictionary 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++) diff --git a/indra/newview/llvoavatarself.h b/indra/newview/llvoavatarself.h index df3493c434..9514abc5bc 100644 --- a/indra/newview/llvoavatarself.h +++ b/indra/newview/llvoavatarself.h @@ -232,7 +232,9 @@ public: public: /* virtual */ void invalidateComposite(LLTexLayerSet* layerset, BOOL upload_result); /* virtual */ void invalidateAll(); - /* virtual */ void setCompositeUpdatesEnabled(BOOL b); // only works for self + /* virtual */ void setCompositeUpdatesEnabled(bool b); // only works for self + /* virtual */ void setCompositeUpdatesEnabled(U32 index, bool b); + /* virtual */ bool isCompositeUpdateEnabled(U32 index); void setupComposites(); void updateComposites(); diff --git a/indra/newview/llwearable.cpp b/indra/newview/llwearable.cpp index acfbc23f62..e7eda76433 100644 --- a/indra/newview/llwearable.cpp +++ b/indra/newview/llwearable.cpp @@ -56,6 +56,37 @@ using namespace LLVOAvatarDefines; // static S32 LLWearable::sCurrentDefinitionVersion = 1; +// support class - remove for 2.1 (hackity hack hack) +class LLOverrideBakedTextureUpdate +{ +public: + LLOverrideBakedTextureUpdate(bool temp_state) + { + mAvatar = gAgent.getAvatarObject(); + U32 num_bakes = (U32) LLVOAvatarDefines::BAKED_NUM_INDICES; + for( U32 index = 0; index < num_bakes; ++index ) + { + composite_enabled[index] = mAvatar->isCompositeUpdateEnabled(index); + } + mAvatar->setCompositeUpdatesEnabled(temp_state); + llinfos << "suprress baked texture update initialized to " << temp_state << llendl; + } + + ~LLOverrideBakedTextureUpdate() + { + U32 num_bakes = (U32)LLVOAvatarDefines::BAKED_NUM_INDICES; + for( U32 index = 0; index < num_bakes; ++index ) + { + mAvatar->setCompositeUpdatesEnabled(index, composite_enabled[index]); + } + llinfos << "suppress baked texture update reverted " << llendl; + } + +private: + bool composite_enabled[LLVOAvatarDefines::BAKED_NUM_INDICES]; + LLVOAvatarSelf *mAvatar; +}; + // Private local functions static std::string terse_F32_to_string(F32 f); static std::string asset_id_to_filename(const LLUUID &asset_id); @@ -216,6 +247,10 @@ BOOL LLWearable::importFile( LLFILE* file ) char text_buffer[2048]; /* Flawfinder: ignore */ S32 fields_read = 0; + // suppress texlayerset updates while wearables are being imported. Layersets will be updated + // when the wearables are "worn", not loaded. Note state will be restored when this object is destroyed. + LLOverrideBakedTextureUpdate stop_bakes(false); + // read header and version fields_read = fscanf( file, "LLWearable version %d\n", &mDefinitionVersion ); if( fields_read != 1 ) -- cgit v1.2.3 From 00f278568230c9cf3a438e9026dc3c387d8ac134 Mon Sep 17 00:00:00 2001 From: "Nyx (Neal Orman)" Date: Mon, 15 Mar 2010 14:11:25 -0400 Subject: EXT-6010 apperance reverts to an old outfit while attempting to wear new outfit Removing log spam before pushing to main branch. change is de minimis. -Nyx --- indra/newview/llwearable.cpp | 2 -- 1 file changed, 2 deletions(-) diff --git a/indra/newview/llwearable.cpp b/indra/newview/llwearable.cpp index e7eda76433..3334c17a8f 100644 --- a/indra/newview/llwearable.cpp +++ b/indra/newview/llwearable.cpp @@ -69,7 +69,6 @@ public: composite_enabled[index] = mAvatar->isCompositeUpdateEnabled(index); } mAvatar->setCompositeUpdatesEnabled(temp_state); - llinfos << "suprress baked texture update initialized to " << temp_state << llendl; } ~LLOverrideBakedTextureUpdate() @@ -79,7 +78,6 @@ public: { mAvatar->setCompositeUpdatesEnabled(index, composite_enabled[index]); } - llinfos << "suppress baked texture update reverted " << llendl; } private: -- cgit v1.2.3 From 73ebb9efc90a966e0c034b956abb5b6f3a331851 Mon Sep 17 00:00:00 2001 From: Eli Linden Date: Mon, 15 Mar 2010 11:41:41 -0700 Subject: ES linguistic; PT adding 4 missing strings from set4 --- indra/newview/skins/default/xui/es/menu_viewer.xml | 2 +- indra/newview/skins/default/xui/pt/panel_login.xml | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/indra/newview/skins/default/xui/es/menu_viewer.xml b/indra/newview/skins/default/xui/es/menu_viewer.xml index 9c08fbb2c8..a0886b3e00 100644 --- a/indra/newview/skins/default/xui/es/menu_viewer.xml +++ b/indra/newview/skins/default/xui/es/menu_viewer.xml @@ -11,7 +11,7 @@ - + diff --git a/indra/newview/skins/default/xui/pt/panel_login.xml b/indra/newview/skins/default/xui/pt/panel_login.xml index 415451b49f..61cdbaef13 100644 --- a/indra/newview/skins/default/xui/pt/panel_login.xml +++ b/indra/newview/skins/default/xui/pt/panel_login.xml @@ -12,12 +12,19 @@ Primeiro nome: + + Sobrenome: + + + Senha: + Começar em: +