summaryrefslogtreecommitdiff
path: root/indra/newview/llwearable.cpp
diff options
context:
space:
mode:
authorNyx (Neal Orman) <nyx@lindenlab.com>2010-03-15 12:09:09 -0400
committerNyx (Neal Orman) <nyx@lindenlab.com>2010-03-15 12:09:09 -0400
commit8fa640cfe2967f0a5be5ea09d954a012f0924f62 (patch)
treead2ed126dc020078d2f6649fa9c4ec8f772f8ca4 /indra/newview/llwearable.cpp
parent42d1aaee2e3a9c5df3e7b4ace3bf6b5972a74847 (diff)
parent8112ba5bafe404a43a22a57eb0aa96d884fab365 (diff)
Automated merge with ssh://hg.lindenlab.com/viewer/viewer-2-0/
Diffstat (limited to 'indra/newview/llwearable.cpp')
-rw-r--r--indra/newview/llwearable.cpp35
1 files changed, 35 insertions, 0 deletions
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 )