diff options
author | Melanie | 2011-12-19 21:30:57 +0000 |
---|---|---|
committer | Melanie | 2011-12-19 21:30:57 +0000 |
commit | efa4284391d6098172c6b57fe8fa5e1d881a31ab (patch) | |
tree | ad5ecc940b428f93e977f096218c85f1d1e146bc | |
parent | Merge branch 'master' into careminster (diff) | |
parent | Stop sending the viewer its own AvatarAppearance packet. (diff) | |
download | opensim-SC-efa4284391d6098172c6b57fe8fa5e1d881a31ab.zip opensim-SC-efa4284391d6098172c6b57fe8fa5e1d881a31ab.tar.gz opensim-SC-efa4284391d6098172c6b57fe8fa5e1d881a31ab.tar.bz2 opensim-SC-efa4284391d6098172c6b57fe8fa5e1d881a31ab.tar.xz |
Merge branch 'master' into careminster
8 files changed, 108 insertions, 62 deletions
diff --git a/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs b/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs index 2930753..d26a1bd 100644 --- a/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs +++ b/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs | |||
@@ -1545,7 +1545,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController | |||
1545 | options["profile"] = (string)requestData["profile"]; | 1545 | options["profile"] = (string)requestData["profile"]; |
1546 | } | 1546 | } |
1547 | 1547 | ||
1548 | if (requestData["noassets"].ToString() == "true") | 1548 | if ((string)requestData["noassets"] == "true") |
1549 | { | 1549 | { |
1550 | options["noassets"] = (string)requestData["noassets"] ; | 1550 | options["noassets"] = (string)requestData["noassets"] ; |
1551 | } | 1551 | } |
diff --git a/OpenSim/Capabilities/Handlers/UploadBakedTexture/UploadBakedTextureHandler.cs b/OpenSim/Capabilities/Handlers/UploadBakedTexture/UploadBakedTextureHandler.cs index c637ccf..594ce9d 100644 --- a/OpenSim/Capabilities/Handlers/UploadBakedTexture/UploadBakedTextureHandler.cs +++ b/OpenSim/Capabilities/Handlers/UploadBakedTexture/UploadBakedTextureHandler.cs | |||
@@ -104,7 +104,7 @@ namespace OpenSim.Capabilities.Handlers | |||
104 | } | 104 | } |
105 | catch (Exception e) | 105 | catch (Exception e) |
106 | { | 106 | { |
107 | m_log.Error("[UPLOAD BAKED TEXTURE HANDLER]: " + e.ToString()); | 107 | m_log.ErrorFormat("[UPLOAD BAKED TEXTURE HANDLER]: {0}{1}", e.Message, e.StackTrace); |
108 | } | 108 | } |
109 | 109 | ||
110 | return null; | 110 | return null; |
@@ -117,7 +117,7 @@ namespace OpenSim.Capabilities.Handlers | |||
117 | /// <param name="data"></param> | 117 | /// <param name="data"></param> |
118 | private void BakedTextureUploaded(UUID assetID, byte[] data) | 118 | private void BakedTextureUploaded(UUID assetID, byte[] data) |
119 | { | 119 | { |
120 | // m_log.WarnFormat("[CAPS]: Received baked texture {0}", assetID.ToString()); | 120 | // m_log.DebugFormat("[UPLOAD BAKED TEXTURE HANDLER]: Received baked texture {0}", assetID.ToString()); |
121 | 121 | ||
122 | AssetBase asset; | 122 | AssetBase asset; |
123 | asset = new AssetBase(assetID, "Baked Texture", (sbyte)AssetType.Texture, m_HostCapsObj.AgentID.ToString()); | 123 | asset = new AssetBase(assetID, "Baked Texture", (sbyte)AssetType.Texture, m_HostCapsObj.AgentID.ToString()); |
diff --git a/OpenSim/Framework/AvatarAppearance.cs b/OpenSim/Framework/AvatarAppearance.cs index f0580df..3a0b861 100644 --- a/OpenSim/Framework/AvatarAppearance.cs +++ b/OpenSim/Framework/AvatarAppearance.cs | |||
@@ -264,10 +264,12 @@ namespace OpenSim.Framework | |||
264 | } | 264 | } |
265 | 265 | ||
266 | /// <summary> | 266 | /// <summary> |
267 | /// Set up appearance textures. | 267 | /// Set up appearance texture ids. |
268 | /// Returns boolean that indicates whether the new entries actually change the | ||
269 | /// existing values. | ||
270 | /// </summary> | 268 | /// </summary> |
269 | /// <returns> | ||
270 | /// True if any existing texture id was changed by the new data. | ||
271 | /// False if there were no changes or no existing texture ids. | ||
272 | /// </returns> | ||
271 | public virtual bool SetTextureEntries(Primitive.TextureEntry textureEntry) | 273 | public virtual bool SetTextureEntries(Primitive.TextureEntry textureEntry) |
272 | { | 274 | { |
273 | if (textureEntry == null) | 275 | if (textureEntry == null) |
@@ -284,25 +286,30 @@ namespace OpenSim.Framework | |||
284 | 286 | ||
285 | if (newface == null) | 287 | if (newface == null) |
286 | { | 288 | { |
287 | if (oldface == null) continue; | 289 | if (oldface == null) |
290 | continue; | ||
288 | } | 291 | } |
289 | else | 292 | else |
290 | { | 293 | { |
291 | if (oldface != null && oldface.TextureID == newface.TextureID) continue; | 294 | if (oldface != null && oldface.TextureID == newface.TextureID) |
295 | continue; | ||
292 | } | 296 | } |
293 | 297 | ||
294 | changed = true; | 298 | changed = true; |
295 | } | 299 | } |
296 | 300 | ||
297 | m_texture = textureEntry; | 301 | m_texture = textureEntry; |
302 | |||
298 | return changed; | 303 | return changed; |
299 | } | 304 | } |
300 | 305 | ||
301 | /// <summary> | 306 | /// <summary> |
302 | /// Set up visual parameters for the avatar and refresh the avatar height | 307 | /// Set up visual parameters for the avatar and refresh the avatar height |
303 | /// Returns boolean that indicates whether the new entries actually change the | ||
304 | /// existing values. | ||
305 | /// </summary> | 308 | /// </summary> |
309 | /// <returns> | ||
310 | /// True if any existing visual parameter was changed by the new data. | ||
311 | /// False if there were no changes or no existing visual parameters. | ||
312 | /// </returns> | ||
306 | public virtual bool SetVisualParams(byte[] visualParams) | 313 | public virtual bool SetVisualParams(byte[] visualParams) |
307 | { | 314 | { |
308 | if (visualParams == null) | 315 | if (visualParams == null) |
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs index 6648a60..083dcc0 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs | |||
@@ -452,6 +452,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
452 | public LLClientView(EndPoint remoteEP, Scene scene, LLUDPServer udpServer, LLUDPClient udpClient, AuthenticateResponse sessionInfo, | 452 | public LLClientView(EndPoint remoteEP, Scene scene, LLUDPServer udpServer, LLUDPClient udpClient, AuthenticateResponse sessionInfo, |
453 | UUID agentId, UUID sessionId, uint circuitCode) | 453 | UUID agentId, UUID sessionId, uint circuitCode) |
454 | { | 454 | { |
455 | // DebugPacketLevel = 1; | ||
456 | |||
455 | RegisterInterface<IClientIM>(this); | 457 | RegisterInterface<IClientIM>(this); |
456 | RegisterInterface<IClientChat>(this); | 458 | RegisterInterface<IClientChat>(this); |
457 | RegisterInterface<IClientIPEndpoint>(this); | 459 | RegisterInterface<IClientIPEndpoint>(this); |
@@ -4951,8 +4953,14 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
4951 | update.Scale = new Vector3(0.45f, 0.6f, 1.9f); | 4953 | update.Scale = new Vector3(0.45f, 0.6f, 1.9f); |
4952 | update.Text = Utils.EmptyBytes; | 4954 | update.Text = Utils.EmptyBytes; |
4953 | update.TextColor = new byte[4]; | 4955 | update.TextColor = new byte[4]; |
4956 | |||
4957 | // Don't send texture anim for avatars - this has no meaning for them. | ||
4954 | update.TextureAnim = Utils.EmptyBytes; | 4958 | update.TextureAnim = Utils.EmptyBytes; |
4955 | update.TextureEntry = (data.Appearance.Texture != null) ? data.Appearance.Texture.GetBytes() : Utils.EmptyBytes; | 4959 | |
4960 | // Don't send texture entry for avatars here - this is accomplished via the AvatarAppearance packet | ||
4961 | update.TextureEntry = Utils.EmptyBytes; | ||
4962 | // update.TextureEntry = (data.Appearance.Texture != null) ? data.Appearance.Texture.GetBytes() : Utils.EmptyBytes; | ||
4963 | |||
4956 | update.UpdateFlags = (uint)( | 4964 | update.UpdateFlags = (uint)( |
4957 | PrimFlags.Physics | PrimFlags.ObjectModify | PrimFlags.ObjectCopy | PrimFlags.ObjectAnyOwner | | 4965 | PrimFlags.Physics | PrimFlags.ObjectModify | PrimFlags.ObjectCopy | PrimFlags.ObjectAnyOwner | |
4958 | PrimFlags.ObjectYouOwner | PrimFlags.ObjectMove | PrimFlags.InventoryEmpty | PrimFlags.ObjectTransfer | | 4966 | PrimFlags.ObjectYouOwner | PrimFlags.ObjectMove | PrimFlags.InventoryEmpty | PrimFlags.ObjectTransfer | |
@@ -6062,7 +6070,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
6062 | // for the client session anyway, in order to protect ourselves against bad code in plugins | 6070 | // for the client session anyway, in order to protect ourselves against bad code in plugins |
6063 | try | 6071 | try |
6064 | { | 6072 | { |
6065 | |||
6066 | byte[] visualparams = new byte[appear.VisualParam.Length]; | 6073 | byte[] visualparams = new byte[appear.VisualParam.Length]; |
6067 | for (int i = 0; i < appear.VisualParam.Length; i++) | 6074 | for (int i = 0; i < appear.VisualParam.Length; i++) |
6068 | visualparams[i] = appear.VisualParam[i].ParamValue; | 6075 | visualparams[i] = appear.VisualParam[i].ParamValue; |
@@ -11344,9 +11351,10 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
11344 | /// <summary> | 11351 | /// <summary> |
11345 | /// Send a response back to a client when it asks the asset server (via the region server) if it has | 11352 | /// Send a response back to a client when it asks the asset server (via the region server) if it has |
11346 | /// its appearance texture cached. | 11353 | /// its appearance texture cached. |
11347 | /// | ||
11348 | /// At the moment, we always reply that there is no cached texture. | ||
11349 | /// </summary> | 11354 | /// </summary> |
11355 | /// <remarks> | ||
11356 | /// At the moment, we always reply that there is no cached texture. | ||
11357 | /// </remarks> | ||
11350 | /// <param name="simclient"></param> | 11358 | /// <param name="simclient"></param> |
11351 | /// <param name="packet"></param> | 11359 | /// <param name="packet"></param> |
11352 | /// <returns></returns> | 11360 | /// <returns></returns> |
@@ -11356,7 +11364,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
11356 | AgentCachedTexturePacket cachedtex = (AgentCachedTexturePacket)packet; | 11364 | AgentCachedTexturePacket cachedtex = (AgentCachedTexturePacket)packet; |
11357 | AgentCachedTextureResponsePacket cachedresp = (AgentCachedTextureResponsePacket)PacketPool.Instance.GetPacket(PacketType.AgentCachedTextureResponse); | 11365 | AgentCachedTextureResponsePacket cachedresp = (AgentCachedTextureResponsePacket)PacketPool.Instance.GetPacket(PacketType.AgentCachedTextureResponse); |
11358 | 11366 | ||
11359 | if (cachedtex.AgentData.SessionID != SessionId) return false; | 11367 | if (cachedtex.AgentData.SessionID != SessionId) |
11368 | return false; | ||
11360 | 11369 | ||
11361 | // TODO: don't create new blocks if recycling an old packet | 11370 | // TODO: don't create new blocks if recycling an old packet |
11362 | cachedresp.AgentData.AgentID = AgentId; | 11371 | cachedresp.AgentData.AgentID = AgentId; |
@@ -11754,6 +11763,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
11754 | if (DebugPacketLevel <= 50 && packet.Type == PacketType.ImprovedTerseObjectUpdate) | 11763 | if (DebugPacketLevel <= 50 && packet.Type == PacketType.ImprovedTerseObjectUpdate) |
11755 | logPacket = false; | 11764 | logPacket = false; |
11756 | 11765 | ||
11766 | if (DebugPacketLevel <= 25 && packet.Type == PacketType.ObjectPropertiesFamily) | ||
11767 | logPacket = false; | ||
11768 | |||
11757 | if (logPacket) | 11769 | if (logPacket) |
11758 | m_log.DebugFormat( | 11770 | m_log.DebugFormat( |
11759 | "[CLIENT]: PACKET OUT to {0} ({1}) in {2} - {3}", | 11771 | "[CLIENT]: PACKET OUT to {0} ({1}) in {2} - {3}", |
@@ -11811,6 +11823,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
11811 | if (DebugPacketLevel <= 100 && (packet.Type == PacketType.ViewerEffect || packet.Type == PacketType.AgentAnimation)) | 11823 | if (DebugPacketLevel <= 100 && (packet.Type == PacketType.ViewerEffect || packet.Type == PacketType.AgentAnimation)) |
11812 | logPacket = false; | 11824 | logPacket = false; |
11813 | 11825 | ||
11826 | if (DebugPacketLevel <= 25 && packet.Type == PacketType.RequestObjectPropertiesFamily) | ||
11827 | logPacket = false; | ||
11828 | |||
11814 | if (logPacket) | 11829 | if (logPacket) |
11815 | m_log.DebugFormat( | 11830 | m_log.DebugFormat( |
11816 | "[CLIENT]: PACKET IN from {0} ({1}) in {2} - {3}", | 11831 | "[CLIENT]: PACKET IN from {0} ({1}) in {2} - {3}", |
diff --git a/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs b/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs index acf36df..bc7bf66 100644 --- a/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs | |||
@@ -26,16 +26,15 @@ | |||
26 | */ | 26 | */ |
27 | 27 | ||
28 | using System; | 28 | using System; |
29 | using System.Collections.Generic; | ||
29 | using System.Reflection; | 30 | using System.Reflection; |
31 | using System.Threading; | ||
32 | using System.Text; | ||
33 | using System.Timers; | ||
30 | using log4net; | 34 | using log4net; |
31 | using Nini.Config; | 35 | using Nini.Config; |
32 | using OpenMetaverse; | 36 | using OpenMetaverse; |
33 | using OpenSim.Framework; | 37 | using OpenSim.Framework; |
34 | |||
35 | using System.Threading; | ||
36 | using System.Timers; | ||
37 | using System.Collections.Generic; | ||
38 | |||
39 | using OpenSim.Region.Framework.Interfaces; | 38 | using OpenSim.Region.Framework.Interfaces; |
40 | using OpenSim.Region.Framework.Scenes; | 39 | using OpenSim.Region.Framework.Scenes; |
41 | using OpenSim.Services.Interfaces; | 40 | using OpenSim.Services.Interfaces; |
@@ -45,6 +44,9 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory | |||
45 | public class AvatarFactoryModule : IAvatarFactoryModule, IRegionModule | 44 | public class AvatarFactoryModule : IAvatarFactoryModule, IRegionModule |
46 | { | 45 | { |
47 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 46 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
47 | |||
48 | public const string BAKED_TEXTURES_REPORT_FORMAT = "{0,-9} {1}"; | ||
49 | |||
48 | private Scene m_scene = null; | 50 | private Scene m_scene = null; |
49 | 51 | ||
50 | private int m_savetime = 5; // seconds to wait before saving changed appearance | 52 | private int m_savetime = 5; // seconds to wait before saving changed appearance |
@@ -147,9 +149,13 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory | |||
147 | // Process the baked texture array | 149 | // Process the baked texture array |
148 | if (textureEntry != null) | 150 | if (textureEntry != null) |
149 | { | 151 | { |
152 | m_log.InfoFormat("[AVFACTORY]: received texture update for {0}", sp.UUID); | ||
153 | |||
154 | // WriteBakedTexturesReport(sp, m_log.DebugFormat); | ||
155 | |||
150 | changed = sp.Appearance.SetTextureEntries(textureEntry) || changed; | 156 | changed = sp.Appearance.SetTextureEntries(textureEntry) || changed; |
151 | 157 | ||
152 | m_log.InfoFormat("[AVFACTORY]: received texture update for {0}", sp.UUID); | 158 | // WriteBakedTexturesReport(sp, m_log.DebugFormat); |
153 | ValidateBakedTextureCache(sp, false); | 159 | ValidateBakedTextureCache(sp, false); |
154 | 160 | ||
155 | // This appears to be set only in the final stage of the appearance | 161 | // This appears to be set only in the final stage of the appearance |
@@ -254,9 +260,12 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory | |||
254 | } | 260 | } |
255 | 261 | ||
256 | /// <summary> | 262 | /// <summary> |
257 | /// Queue up a request to send appearance, makes it possible to | 263 | /// Queue up a request to send appearance. |
258 | /// accumulate changes without sending out each one separately. | ||
259 | /// </summary> | 264 | /// </summary> |
265 | /// <remarks> | ||
266 | /// Makes it possible to accumulate changes without sending out each one separately. | ||
267 | /// </remarks> | ||
268 | /// <param name="agentId"></param> | ||
260 | public void QueueAppearanceSend(UUID agentid) | 269 | public void QueueAppearanceSend(UUID agentid) |
261 | { | 270 | { |
262 | // m_log.DebugFormat("[AVFACTORY]: Queue appearance send for {0}", agentid); | 271 | // m_log.DebugFormat("[AVFACTORY]: Queue appearance send for {0}", agentid); |
@@ -404,10 +413,13 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory | |||
404 | m_savequeue.Remove(avatarID); | 413 | m_savequeue.Remove(avatarID); |
405 | } | 414 | } |
406 | } | 415 | } |
407 | } | ||
408 | 416 | ||
409 | if (m_savequeue.Count == 0 && m_sendqueue.Count == 0) | 417 | // We must lock both queues here so that QueueAppearanceSave() or *Send() don't m_updateTimer.Start() on |
410 | m_updateTimer.Stop(); | 418 | // another thread inbetween the first count calls and m_updateTimer.Stop() on this thread. |
419 | lock (m_sendqueue) | ||
420 | if (m_savequeue.Count == 0 && m_sendqueue.Count == 0) | ||
421 | m_updateTimer.Stop(); | ||
422 | } | ||
411 | } | 423 | } |
412 | 424 | ||
413 | private void SaveAppearance(UUID agentid) | 425 | private void SaveAppearance(UUID agentid) |
@@ -553,5 +565,37 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory | |||
553 | } | 565 | } |
554 | } | 566 | } |
555 | #endregion | 567 | #endregion |
568 | |||
569 | public void WriteBakedTexturesReport(IScenePresence sp, ReportOutputAction outputAction) | ||
570 | { | ||
571 | outputAction("For {0} in {1}", sp.Name, m_scene.RegionInfo.RegionName); | ||
572 | outputAction(BAKED_TEXTURES_REPORT_FORMAT, "Bake Type", "UUID"); | ||
573 | |||
574 | Dictionary<BakeType, Primitive.TextureEntryFace> bakedTextures = GetBakedTextureFaces(sp.UUID); | ||
575 | |||
576 | foreach (BakeType bt in bakedTextures.Keys) | ||
577 | { | ||
578 | string rawTextureID; | ||
579 | |||
580 | if (bakedTextures[bt] == null) | ||
581 | { | ||
582 | rawTextureID = "not set"; | ||
583 | } | ||
584 | else | ||
585 | { | ||
586 | rawTextureID = bakedTextures[bt].TextureID.ToString(); | ||
587 | |||
588 | if (m_scene.AssetService.Get(rawTextureID) == null) | ||
589 | rawTextureID += " (not found)"; | ||
590 | else | ||
591 | rawTextureID += " (uploaded)"; | ||
592 | } | ||
593 | |||
594 | outputAction(BAKED_TEXTURES_REPORT_FORMAT, bt, rawTextureID); | ||
595 | } | ||
596 | |||
597 | bool bakedTextureValid = m_scene.AvatarFactory.ValidateBakedTextureCache(sp); | ||
598 | outputAction("{0} baked appearance texture is {1}", sp.Name, bakedTextureValid ? "OK" : "corrupt"); | ||
599 | } | ||
556 | } | 600 | } |
557 | } | 601 | } |
diff --git a/OpenSim/Region/Framework/Interfaces/IAvatarFactoryModule.cs b/OpenSim/Region/Framework/Interfaces/IAvatarFactoryModule.cs index 26bc922..8670229 100644 --- a/OpenSim/Region/Framework/Interfaces/IAvatarFactoryModule.cs +++ b/OpenSim/Region/Framework/Interfaces/IAvatarFactoryModule.cs | |||
@@ -31,9 +31,10 @@ using OpenSim.Framework; | |||
31 | 31 | ||
32 | namespace OpenSim.Region.Framework.Interfaces | 32 | namespace OpenSim.Region.Framework.Interfaces |
33 | { | 33 | { |
34 | public delegate void ReportOutputAction(string format, params object[] args); | ||
35 | |||
34 | public interface IAvatarFactoryModule | 36 | public interface IAvatarFactoryModule |
35 | { | 37 | { |
36 | |||
37 | void SetAppearance(IScenePresence sp, Primitive.TextureEntry textureEntry, byte[] visualParams); | 38 | void SetAppearance(IScenePresence sp, Primitive.TextureEntry textureEntry, byte[] visualParams); |
38 | 39 | ||
39 | /// <summary> | 40 | /// <summary> |
@@ -63,5 +64,13 @@ namespace OpenSim.Region.Framework.Interfaces | |||
63 | bool ValidateBakedTextureCache(IScenePresence sp); | 64 | bool ValidateBakedTextureCache(IScenePresence sp); |
64 | void QueueAppearanceSend(UUID agentid); | 65 | void QueueAppearanceSend(UUID agentid); |
65 | void QueueAppearanceSave(UUID agentid); | 66 | void QueueAppearanceSave(UUID agentid); |
67 | |||
68 | /// <summary> | ||
69 | /// Get a report about the current state of a scene presence's baked appearance textures. | ||
70 | /// </summary> | ||
71 | /// <param name="sp"></param> | ||
72 | /// <param name="reportOutputAction"></param> | ||
73 | /// <returns></returns> | ||
74 | void WriteBakedTexturesReport(IScenePresence sp, ReportOutputAction reportOutputAction); | ||
66 | } | 75 | } |
67 | } \ No newline at end of file | 76 | } \ No newline at end of file |
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index 0eecf77..f5b37d3 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs | |||
@@ -2554,7 +2554,10 @@ namespace OpenSim.Region.Framework.Scenes | |||
2554 | // again here... this comes after the cached appearance check because the avatars | 2554 | // again here... this comes after the cached appearance check because the avatars |
2555 | // appearance goes into the avatar update packet | 2555 | // appearance goes into the avatar update packet |
2556 | SendAvatarDataToAllAgents(); | 2556 | SendAvatarDataToAllAgents(); |
2557 | SendAppearanceToAgent(this); | 2557 | |
2558 | // Sending us our own appearance does not seem to be necessary, and the viewer warns in the log if you do | ||
2559 | // this. | ||
2560 | // SendAppearanceToAgent(this); | ||
2558 | 2561 | ||
2559 | // If we are using the the cached appearance then send it out to everyone | 2562 | // If we are using the the cached appearance then send it out to everyone |
2560 | if (cachedappearance) | 2563 | if (cachedappearance) |
@@ -2689,7 +2692,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
2689 | public void SendAppearanceToAgent(ScenePresence avatar) | 2692 | public void SendAppearanceToAgent(ScenePresence avatar) |
2690 | { | 2693 | { |
2691 | // m_log.DebugFormat( | 2694 | // m_log.DebugFormat( |
2692 | // "[SCENE PRESENCE] Send appearance from {0} {1} to {2} {3}", Name, m_uuid, avatar.Name, avatar.UUID); | 2695 | // "[SCENE PRESENCE]: Sending appearance data from {0} {1} to {2} {3}", Name, m_uuid, avatar.Name, avatar.UUID); |
2693 | 2696 | ||
2694 | avatar.ControllingClient.SendAppearance( | 2697 | avatar.ControllingClient.SendAppearance( |
2695 | UUID, Appearance.VisualParams, Appearance.Texture.GetBytes()); | 2698 | UUID, Appearance.VisualParams, Appearance.Texture.GetBytes()); |
diff --git a/OpenSim/Region/OptionalModules/Avatar/Appearance/AppearanceInfoModule.cs b/OpenSim/Region/OptionalModules/Avatar/Appearance/AppearanceInfoModule.cs index 40cbc60..1ce24f1 100644 --- a/OpenSim/Region/OptionalModules/Avatar/Appearance/AppearanceInfoModule.cs +++ b/OpenSim/Region/OptionalModules/Avatar/Appearance/AppearanceInfoModule.cs | |||
@@ -50,8 +50,6 @@ namespace OpenSim.Region.OptionalModules.Avatar.Appearance | |||
50 | { | 50 | { |
51 | // private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 51 | // private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
52 | 52 | ||
53 | public const string SHOW_APPEARANCE_FORMAT = "{0,-9} {1}"; | ||
54 | |||
55 | private Dictionary<UUID, Scene> m_scenes = new Dictionary<UUID, Scene>(); | 53 | private Dictionary<UUID, Scene> m_scenes = new Dictionary<UUID, Scene>(); |
56 | // private IAvatarFactoryModule m_avatarFactory; | 54 | // private IAvatarFactoryModule m_avatarFactory; |
57 | 55 | ||
@@ -197,37 +195,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Appearance | |||
197 | { | 195 | { |
198 | ScenePresence sp = scene.GetScenePresence(optionalTargetFirstName, optionalTargetLastName); | 196 | ScenePresence sp = scene.GetScenePresence(optionalTargetFirstName, optionalTargetLastName); |
199 | if (sp != null && !sp.IsChildAgent) | 197 | if (sp != null && !sp.IsChildAgent) |
200 | { | 198 | scene.AvatarFactory.WriteBakedTexturesReport(sp, MainConsole.Instance.OutputFormat); |
201 | MainConsole.Instance.OutputFormat("For {0} in {1}", sp.Name, scene.RegionInfo.RegionName); | ||
202 | MainConsole.Instance.OutputFormat(SHOW_APPEARANCE_FORMAT, "Bake Type", "UUID"); | ||
203 | |||
204 | Dictionary<BakeType, Primitive.TextureEntryFace> bakedTextures | ||
205 | = scene.AvatarFactory.GetBakedTextureFaces(sp.UUID); | ||
206 | foreach (BakeType bt in bakedTextures.Keys) | ||
207 | { | ||
208 | string rawTextureID; | ||
209 | |||
210 | if (bakedTextures[bt] == null) | ||
211 | { | ||
212 | rawTextureID = "not set"; | ||
213 | } | ||
214 | else | ||
215 | { | ||
216 | rawTextureID = bakedTextures[bt].TextureID.ToString(); | ||
217 | |||
218 | if (scene.AssetService.Get(rawTextureID) == null) | ||
219 | rawTextureID += " (not found)"; | ||
220 | else | ||
221 | rawTextureID += " (uploaded)"; | ||
222 | } | ||
223 | |||
224 | MainConsole.Instance.OutputFormat(SHOW_APPEARANCE_FORMAT, bt, rawTextureID); | ||
225 | } | ||
226 | |||
227 | bool bakedTextureValid = scene.AvatarFactory.ValidateBakedTextureCache(sp); | ||
228 | MainConsole.Instance.OutputFormat( | ||
229 | "{0} baked appearance texture is {1}", sp.Name, bakedTextureValid ? "OK" : "corrupt"); | ||
230 | } | ||
231 | } | 199 | } |
232 | else | 200 | else |
233 | { | 201 | { |