diff options
author | Mic Bowman | 2010-12-03 16:17:50 -0800 |
---|---|---|
committer | Melanie | 2010-12-03 23:45:00 +0000 |
commit | df860516bf4fa4e4196be4d5fc26db71d98334f4 (patch) | |
tree | cc941c190fe2647835b9453fdbaaccb85611986d /OpenSim/Framework | |
parent | minor: change OpenSimBase log messages associated with newer module loader to... (diff) | |
download | opensim-SC_OLD-df860516bf4fa4e4196be4d5fc26db71d98334f4.zip opensim-SC_OLD-df860516bf4fa4e4196be4d5fc26db71d98334f4.tar.gz opensim-SC_OLD-df860516bf4fa4e4196be4d5fc26db71d98334f4.tar.bz2 opensim-SC_OLD-df860516bf4fa4e4196be4d5fc26db71d98334f4.tar.xz |
Various bug fixes for appearance handling: more aggressive reset of textures and vparams when appearance is not cached and when wearables change. Send appearance to the viewer with initial data.
Cleaned up (and added) debugging.
Diffstat (limited to 'OpenSim/Framework')
-rw-r--r-- | OpenSim/Framework/AvatarAppearance.cs | 36 | ||||
-rw-r--r-- | OpenSim/Framework/Capabilities/Caps.cs | 4 |
2 files changed, 30 insertions, 10 deletions
diff --git a/OpenSim/Framework/AvatarAppearance.cs b/OpenSim/Framework/AvatarAppearance.cs index 2906af8..18a5733 100644 --- a/OpenSim/Framework/AvatarAppearance.cs +++ b/OpenSim/Framework/AvatarAppearance.cs | |||
@@ -48,7 +48,7 @@ namespace OpenSim.Framework | |||
48 | public readonly static byte[] BAKE_INDICES = new byte[] { 8, 9, 10, 11, 19, 20 }; | 48 | public readonly static byte[] BAKE_INDICES = new byte[] { 8, 9, 10, 11, 19, 20 }; |
49 | 49 | ||
50 | protected UUID m_owner; | 50 | protected UUID m_owner; |
51 | protected int m_serial = 1; | 51 | protected int m_serial = 0; |
52 | protected byte[] m_visualparams; | 52 | protected byte[] m_visualparams; |
53 | protected Primitive.TextureEntry m_texture; | 53 | protected Primitive.TextureEntry m_texture; |
54 | protected AvatarWearable[] m_wearables; | 54 | protected AvatarWearable[] m_wearables; |
@@ -103,7 +103,7 @@ namespace OpenSim.Framework | |||
103 | { | 103 | { |
104 | // m_log.WarnFormat("[AVATAR APPEARANCE]: create empty appearance for {0}",owner); | 104 | // m_log.WarnFormat("[AVATAR APPEARANCE]: create empty appearance for {0}",owner); |
105 | 105 | ||
106 | m_serial = 1; | 106 | m_serial = 0; |
107 | m_owner = owner; | 107 | m_owner = owner; |
108 | 108 | ||
109 | SetDefaultWearables(); | 109 | SetDefaultWearables(); |
@@ -127,7 +127,7 @@ namespace OpenSim.Framework | |||
127 | { | 127 | { |
128 | // m_log.WarnFormat("[AVATAR APPEARANCE] create initialized appearance for {0}",avatarID); | 128 | // m_log.WarnFormat("[AVATAR APPEARANCE] create initialized appearance for {0}",avatarID); |
129 | 129 | ||
130 | m_serial = 1; | 130 | m_serial = 0; |
131 | m_owner = avatarID; | 131 | m_owner = avatarID; |
132 | 132 | ||
133 | if (wearables != null) | 133 | if (wearables != null) |
@@ -160,7 +160,7 @@ namespace OpenSim.Framework | |||
160 | 160 | ||
161 | if (appearance == null) | 161 | if (appearance == null) |
162 | { | 162 | { |
163 | m_serial = 1; | 163 | m_serial = 0; |
164 | m_owner = UUID.Zero; | 164 | m_owner = UUID.Zero; |
165 | 165 | ||
166 | SetDefaultWearables(); | 166 | SetDefaultWearables(); |
@@ -229,6 +229,24 @@ namespace OpenSim.Framework | |||
229 | m_wearables = AvatarWearable.DefaultWearables; | 229 | m_wearables = AvatarWearable.DefaultWearables; |
230 | } | 230 | } |
231 | 231 | ||
232 | /// <summary> | ||
233 | /// Invalidate all of the baked textures in the appearance, useful | ||
234 | /// if you know that none are valid | ||
235 | /// </summary> | ||
236 | public virtual void ResetAppearance() | ||
237 | { | ||
238 | m_serial = 0; | ||
239 | |||
240 | SetDefaultParams(); | ||
241 | SetDefaultTexture(); | ||
242 | |||
243 | //for (int i = 0; i < BAKE_INDICES.Length; i++) | ||
244 | // { | ||
245 | // int idx = BAKE_INDICES[i]; | ||
246 | // m_texture.FaceTextures[idx].TextureID = UUID.Zero; | ||
247 | // } | ||
248 | } | ||
249 | |||
232 | protected virtual void SetDefaultParams() | 250 | protected virtual void SetDefaultParams() |
233 | { | 251 | { |
234 | m_visualparams = new byte[] { 33,61,85,23,58,127,63,85,63,42,0,85,63,36,85,95,153,63,34,0,63,109,88,132,63,136,81,85,103,136,127,0,150,150,150,127,0,0,0,0,0,127,0,0,255,127,114,127,99,63,127,140,127,127,0,0,0,191,0,104,0,0,0,0,0,0,0,0,0,145,216,133,0,127,0,127,170,0,0,127,127,109,85,127,127,63,85,42,150,150,150,150,150,150,150,25,150,150,150,0,127,0,0,144,85,127,132,127,85,0,127,127,127,127,127,127,59,127,85,127,127,106,47,79,127,127,204,2,141,66,0,0,127,127,0,0,0,0,127,0,159,0,0,178,127,36,85,131,127,127,127,153,95,0,140,75,27,127,127,0,150,150,198,0,0,63,30,127,165,209,198,127,127,153,204,51,51,255,255,255,204,0,255,150,150,150,150,150,150,150,150,150,150,0,150,150,150,150,150,0,127,127,150,150,150,150,150,150,150,150,0,0,150,51,132,150,150,150 }; | 252 | m_visualparams = new byte[] { 33,61,85,23,58,127,63,85,63,42,0,85,63,36,85,95,153,63,34,0,63,109,88,132,63,136,81,85,103,136,127,0,150,150,150,127,0,0,0,0,0,127,0,0,255,127,114,127,99,63,127,140,127,127,0,0,0,191,0,104,0,0,0,0,0,0,0,0,0,145,216,133,0,127,0,127,170,0,0,127,127,109,85,127,127,63,85,42,150,150,150,150,150,150,150,25,150,150,150,0,127,0,0,144,85,127,132,127,85,0,127,127,127,127,127,127,59,127,85,127,127,106,47,79,127,127,204,2,141,66,0,0,127,127,0,0,0,0,127,0,159,0,0,178,127,36,85,131,127,127,127,153,95,0,140,75,27,127,127,0,150,150,198,0,0,63,30,127,165,209,198,127,127,153,204,51,51,255,255,255,204,0,255,150,150,150,150,150,150,150,150,150,150,0,150,150,150,150,150,0,127,127,150,150,150,150,150,150,150,150,0,0,150,51,132,150,150,150 }; |
@@ -240,9 +258,10 @@ namespace OpenSim.Framework | |||
240 | 258 | ||
241 | protected virtual void SetDefaultTexture() | 259 | protected virtual void SetDefaultTexture() |
242 | { | 260 | { |
243 | m_texture = new Primitive.TextureEntry(new UUID("C228D1CF-4B5D-4BA8-84F4-899A0796AA97")); | 261 | m_texture = new Primitive.TextureEntry(new UUID(AppearanceManager.DEFAULT_AVATAR_TEXTURE)); |
244 | for (uint i = 0; i < TEXTURE_COUNT; i++) | 262 | |
245 | m_texture.CreateFace(i).TextureID = new UUID(AppearanceManager.DEFAULT_AVATAR_TEXTURE); | 263 | // for (uint i = 0; i < TEXTURE_COUNT; i++) |
264 | // m_texture.CreateFace(i).TextureID = new UUID(AppearanceManager.DEFAULT_AVATAR_TEXTURE); | ||
246 | } | 265 | } |
247 | 266 | ||
248 | /// <summary> | 267 | /// <summary> |
@@ -274,9 +293,6 @@ namespace OpenSim.Framework | |||
274 | } | 293 | } |
275 | 294 | ||
276 | changed = true; | 295 | changed = true; |
277 | |||
278 | // if (newface != null) | ||
279 | // m_log.WarnFormat("[AVATAR APPEARANCE]: index {0}, new texture id {1}",i,newface.TextureID); | ||
280 | } | 296 | } |
281 | 297 | ||
282 | m_texture = textureEntry; | 298 | m_texture = textureEntry; |
diff --git a/OpenSim/Framework/Capabilities/Caps.cs b/OpenSim/Framework/Capabilities/Caps.cs index e7f2e13..63e1e34 100644 --- a/OpenSim/Framework/Capabilities/Caps.cs +++ b/OpenSim/Framework/Capabilities/Caps.cs | |||
@@ -990,6 +990,7 @@ namespace OpenSim.Framework.Capabilities | |||
990 | public void BakedTextureUploaded(UUID assetID, byte[] data) | 990 | public void BakedTextureUploaded(UUID assetID, byte[] data) |
991 | { | 991 | { |
992 | // m_log.WarnFormat("[CAPS]: Received baked texture {0}", assetID.ToString()); | 992 | // m_log.WarnFormat("[CAPS]: Received baked texture {0}", assetID.ToString()); |
993 | |||
993 | AssetBase asset; | 994 | AssetBase asset; |
994 | asset = new AssetBase(assetID, "Baked Texture", (sbyte)AssetType.Texture, m_agentID.ToString()); | 995 | asset = new AssetBase(assetID, "Baked Texture", (sbyte)AssetType.Texture, m_agentID.ToString()); |
995 | asset.Data = data; | 996 | asset.Data = data; |
@@ -1331,6 +1332,7 @@ namespace OpenSim.Framework.Capabilities | |||
1331 | newAssetID = UUID.Random(); | 1332 | newAssetID = UUID.Random(); |
1332 | uploaderPath = path; | 1333 | uploaderPath = path; |
1333 | httpListener = httpServer; | 1334 | httpListener = httpServer; |
1335 | m_log.InfoFormat("[CAPS] baked texture upload starting for {0}",newAssetID); | ||
1334 | } | 1336 | } |
1335 | 1337 | ||
1336 | /// <summary> | 1338 | /// <summary> |
@@ -1358,6 +1360,8 @@ namespace OpenSim.Framework.Capabilities | |||
1358 | handlerUpLoad(newAssetID, data); | 1360 | handlerUpLoad(newAssetID, data); |
1359 | } | 1361 | } |
1360 | 1362 | ||
1363 | m_log.InfoFormat("[CAPS] baked texture upload completed for {0}",newAssetID); | ||
1364 | |||
1361 | return res; | 1365 | return res; |
1362 | } | 1366 | } |
1363 | } | 1367 | } |