Merge
commit
9bdf262d85
|
|
@ -1759,6 +1759,7 @@ void LLAgentWearables::setWearableOutfit(const LLInventoryItem::item_array_t& it
|
|||
|
||||
if (mAvatarObject)
|
||||
{
|
||||
mAvatarObject->setCompositeUpdatesEnabled(TRUE);
|
||||
mAvatarObject->updateVisualParams();
|
||||
mAvatarObject->invalidateAll();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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++)
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
|
||||
|
|
|
|||
|
|
@ -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 )
|
||||
|
|
|
|||
Loading…
Reference in New Issue