Various bug fixes for appearance handling

This commit is contained in:
Mic Bowman
2010-11-29 16:24:16 -08:00
committed by Melanie
parent 0218845c2e
commit ab2adaf341
4 changed files with 114 additions and 58 deletions

View File

@@ -238,11 +238,27 @@ namespace OpenSim.Framework
// }
}
/// <summary>
/// Invalidate all of the baked textures in the appearance, useful
/// if you know that none are valid
/// </summary>
public virtual void ResetBakedTextures()
{
SetDefaultTexture();
//for (int i = 0; i < BAKE_INDICES.Length; i++)
// {
// int idx = BAKE_INDICES[i];
// m_texture.FaceTextures[idx].TextureID = UUID.Zero;
// }
}
protected virtual void SetDefaultTexture()
{
m_texture = new Primitive.TextureEntry(new UUID("C228D1CF-4B5D-4BA8-84F4-899A0796AA97"));
for (uint i = 0; i < TEXTURE_COUNT; i++)
m_texture.CreateFace(i).TextureID = new UUID(AppearanceManager.DEFAULT_AVATAR_TEXTURE);
// for (uint i = 0; i < TEXTURE_COUNT; i++)
// m_texture.CreateFace(i).TextureID = new UUID(AppearanceManager.DEFAULT_AVATAR_TEXTURE);
}
/// <summary>
@@ -274,9 +290,6 @@ namespace OpenSim.Framework
}
changed = true;
// if (newface != null)
// m_log.WarnFormat("[AVATAR APPEARANCE]: index {0}, new texture id {1}",i,newface.TextureID);
}
m_texture = textureEntry;

View File

@@ -990,6 +990,7 @@ namespace OpenSim.Framework.Capabilities
public void BakedTextureUploaded(UUID assetID, byte[] data)
{
// m_log.WarnFormat("[CAPS]: Received baked texture {0}", assetID.ToString());
AssetBase asset;
asset = new AssetBase(assetID, "Baked Texture", (sbyte)AssetType.Texture, m_agentID.ToString());
asset.Data = data;
@@ -1331,6 +1332,7 @@ namespace OpenSim.Framework.Capabilities
newAssetID = UUID.Random();
uploaderPath = path;
httpListener = httpServer;
// m_log.WarnFormat("[CAPS] baked texture upload starting for {0}",newAssetID);
}
/// <summary>
@@ -1342,6 +1344,8 @@ namespace OpenSim.Framework.Capabilities
/// <returns></returns>
public string uploaderCaps(byte[] data, string path, string param)
{
m_log.WarnFormat("[CAPS] baked texture upload completed for {0}",newAssetID);
string res = String.Empty;
LLSDAssetUploadComplete uploadComplete = new LLSDAssetUploadComplete();
uploadComplete.new_asset = newAssetID.ToString();