diff options
| author | Vadim Savchuk <vsavchuk@productengine.com> | 2010-03-16 18:55:37 +0200 |
|---|---|---|
| committer | Vadim Savchuk <vsavchuk@productengine.com> | 2010-03-16 18:55:37 +0200 |
| commit | 9677026a038b8c99cd20b7ca4f4ac2dc5bf6bb05 (patch) | |
| tree | 94d69e820a5c128ffe141234c28b096967d029c0 /indra/newview/llwearable.cpp | |
| parent | ba52dc2fd1d4f7c2947fd7b8bdb2adb617d9376e (diff) | |
| parent | ba414d500ca8cb88da530c89ba373c95195ce633 (diff) | |
Manual merge from default branch.
Resolved conflicts in:
* merging indra/newview/llpanelpick.cpp
* merging indra/newview/llviewermessage.cpp
* merging indra/newview/skins/default/xui/en/strings.xml
--HG--
branch : product-engine
Diffstat (limited to 'indra/newview/llwearable.cpp')
| -rw-r--r-- | indra/newview/llwearable.cpp | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/indra/newview/llwearable.cpp b/indra/newview/llwearable.cpp index acfbc23f62..3334c17a8f 100644 --- a/indra/newview/llwearable.cpp +++ b/indra/newview/llwearable.cpp @@ -56,6 +56,35 @@ 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); + } + + ~LLOverrideBakedTextureUpdate() + { + U32 num_bakes = (U32)LLVOAvatarDefines::BAKED_NUM_INDICES; + for( U32 index = 0; index < num_bakes; ++index ) + { + mAvatar->setCompositeUpdatesEnabled(index, composite_enabled[index]); + } + } + +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 +245,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 ) |
