Browse Source

* Centralize references to the well known blank texture 5748decc-f629-461c-9a36-a35a221fe21f to a constant in OpenSim.Framework.Util

Justin Clarke Casey 15 years ago
parent
commit
e7ac639f3a

+ 2 - 4
OpenSim/Framework/AvatarAppearance.cs

@@ -298,8 +298,8 @@ namespace OpenSim.Framework
         {
             Primitive.TextureEntry textu = new Primitive.TextureEntry(new UUID("C228D1CF-4B5D-4BA8-84F4-899A0796AA97"));
             textu.CreateFace(0).TextureID = new UUID("00000000-0000-1111-9999-000000000012");
-            textu.CreateFace(1).TextureID = new UUID("5748decc-f629-461c-9a36-a35a221fe21f");
-            textu.CreateFace(2).TextureID = new UUID("5748decc-f629-461c-9a36-a35a221fe21f");
+            textu.CreateFace(1).TextureID = Util.BLANK_TEXTURE_UUID;
+            textu.CreateFace(2).TextureID = Util.BLANK_TEXTURE_UUID;
             textu.CreateFace(3).TextureID = new UUID("6522E74D-1660-4E7F-B601-6F48C1659A77");
             textu.CreateFace(4).TextureID = new UUID("7CA39B4C-BD19-4699-AFF7-F93FD03D3E7B");
             textu.CreateFace(5).TextureID = new UUID("00000000-0000-1111-9999-000000000010");
@@ -319,8 +319,6 @@ namespace OpenSim.Framework
 
         protected AvatarAppearance(SerializationInfo info, StreamingContext context)
         {
-            //System.Console.WriteLine("AvatarAppearance Deserialize BGN");
-
             if (info == null)
             {
                 throw new ArgumentNullException("info");

+ 2 - 3
OpenSim/Framework/Communications/Tests/LoginServiceTests.cs

@@ -95,9 +95,8 @@ namespace OpenSim.Framework.Communications.Tests
                 responseData["circuit_code"], Is.GreaterThanOrEqualTo(0) & Is.LessThanOrEqualTo(System.Int32.MaxValue));
             
             Regex capsSeedPattern 
-                = new Regex("^http://" 
-                    + regionExternalName 
-                    + ":9000/CAPS/[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{8}0000/$");
+                = new Regex("^http://" + regionExternalName + ":" + NetworkServersInfo.DefaultHttpListenerPort
+                    + "/CAPS/[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{8}0000/$");
 
             Assert.That(capsSeedPattern.IsMatch((string)responseData["seed_capability"]), Is.True);           
         }

+ 6 - 1
OpenSim/Framework/Util.cs

@@ -51,7 +51,7 @@ namespace OpenSim.Framework
     /// </summary>
     public class Util
     {
-        private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
+        private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);       
 
         private static uint nextXferID = 5000;
         private static Random randomClass = new Random();
@@ -66,6 +66,11 @@ namespace OpenSim.Framework
 
         public static readonly Regex UUIDPattern 
             = new Regex("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$");
+        
+        /// <value>
+        /// Well known UUID for the blank texture used in the Linden SL viewer version 1.20 (and hopefully onwards) 
+        /// </value>
+        public static UUID BLANK_TEXTURE_UUID = new UUID("5748decc-f629-461c-9a36-a35a221fe21f");
 
         #region Vector Equations
 

+ 1 - 2
OpenSim/Region/Environment/Modules/World/WorldMap/TexturedMapTileRenderer.cs

@@ -129,7 +129,6 @@ namespace OpenSim.Region.Environment.Modules.World.WorldMap
         private static readonly Color defaultColor3 = Color.FromArgb(162, 154, 141);
         private static readonly UUID defaultTerrainTexture4 = new UUID("53a2f406-4895-1d13-d541-d2e3b86bc19c");
         private static readonly Color defaultColor4 = Color.FromArgb(200, 200, 200);
-        private static readonly UUID blankTerrainTexture = new UUID("5748decc-f629-461c-9a36-a35a221fe21f");
 
         #endregion
 
@@ -153,7 +152,7 @@ namespace OpenSim.Region.Environment.Modules.World.WorldMap
             m_mapping.Add(defaultTerrainTexture2, defaultColor2);
             m_mapping.Add(defaultTerrainTexture3, defaultColor3);
             m_mapping.Add(defaultTerrainTexture4, defaultColor4);
-            m_mapping.Add(blankTerrainTexture, Color.White);
+            m_mapping.Add(Util.BLANK_TEXTURE_UUID, Color.White);
         }
 
         #region Helpers