aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Framework/AvatarAppearance.cs28
-rw-r--r--OpenSim/Framework/Capabilities/Caps.cs4
-rw-r--r--OpenSim/Region/Application/OpenSimBase.cs4
-rw-r--r--OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs28
-rw-r--r--OpenSim/Region/Framework/Scenes/ScenePresence.cs6
5 files changed, 46 insertions, 24 deletions
diff --git a/OpenSim/Framework/AvatarAppearance.cs b/OpenSim/Framework/AvatarAppearance.cs
index aaf441c..d0c8b73 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 };
@@ -255,7 +273,7 @@ namespace OpenSim.Framework
255 273
256 protected virtual void SetDefaultTexture() 274 protected virtual void SetDefaultTexture()
257 { 275 {
258 m_texture = new Primitive.TextureEntry(new UUID("C228D1CF-4B5D-4BA8-84F4-899A0796AA97")); 276 m_texture = new Primitive.TextureEntry(new UUID(AppearanceManager.DEFAULT_AVATAR_TEXTURE));
259 277
260 // for (uint i = 0; i < TEXTURE_COUNT; i++) 278 // for (uint i = 0; i < TEXTURE_COUNT; i++)
261 // m_texture.CreateFace(i).TextureID = new UUID(AppearanceManager.DEFAULT_AVATAR_TEXTURE); 279 // m_texture.CreateFace(i).TextureID = new UUID(AppearanceManager.DEFAULT_AVATAR_TEXTURE);
diff --git a/OpenSim/Framework/Capabilities/Caps.cs b/OpenSim/Framework/Capabilities/Caps.cs
index b7f9a05..5937ae6 100644
--- a/OpenSim/Framework/Capabilities/Caps.cs
+++ b/OpenSim/Framework/Capabilities/Caps.cs
@@ -1332,7 +1332,7 @@ namespace OpenSim.Framework.Capabilities
1332 newAssetID = UUID.Random(); 1332 newAssetID = UUID.Random();
1333 uploaderPath = path; 1333 uploaderPath = path;
1334 httpListener = httpServer; 1334 httpListener = httpServer;
1335 // m_log.WarnFormat("[CAPS] baked texture upload starting for {0}",newAssetID); 1335 m_log.InfoFormat("[CAPS] baked texture upload starting for {0}",newAssetID);
1336 } 1336 }
1337 1337
1338 /// <summary> 1338 /// <summary>
@@ -1362,6 +1362,8 @@ namespace OpenSim.Framework.Capabilities
1362 handlerUpLoad(newAssetID, data); 1362 handlerUpLoad(newAssetID, data);
1363 } 1363 }
1364 1364
1365 m_log.InfoFormat("[CAPS] baked texture upload completed for {0}",newAssetID);
1366
1365 return res; 1367 return res;
1366 } 1368 }
1367 } 1369 }
diff --git a/OpenSim/Region/Application/OpenSimBase.cs b/OpenSim/Region/Application/OpenSimBase.cs
index c5ee385..06b4aea 100644
--- a/OpenSim/Region/Application/OpenSimBase.cs
+++ b/OpenSim/Region/Application/OpenSimBase.cs
@@ -361,13 +361,13 @@ namespace OpenSim
361 m_moduleLoader.InitialiseSharedModules(scene); 361 m_moduleLoader.InitialiseSharedModules(scene);
362 362
363 // Use this in the future, the line above will be deprecated soon 363 // Use this in the future, the line above will be deprecated soon
364 m_log.Info("[MODULES]: Loading Region's modules (new style)"); 364 m_log.Info("[REGIONMODULE]: Loading Region's modules (new style)");
365 IRegionModulesController controller; 365 IRegionModulesController controller;
366 if (ApplicationRegistry.TryGet(out controller)) 366 if (ApplicationRegistry.TryGet(out controller))
367 { 367 {
368 controller.AddRegionToModules(scene); 368 controller.AddRegionToModules(scene);
369 } 369 }
370 else m_log.Error("[MODULES]: The new RegionModulesController is missing..."); 370 else m_log.Error("[REGIONMODULE]: The new RegionModulesController is missing...");
371 371
372 if (m_securePermissionsLoading) 372 if (m_securePermissionsLoading)
373 { 373 {
diff --git a/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs b/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs
index 63e7ddc..7d6d191 100644
--- a/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs
+++ b/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs
@@ -115,7 +115,12 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory
115 115
116 #endregion 116 #endregion
117 117
118 118 /// <summary>
119 /// Check for the existence of the baked texture assets. Request a rebake
120 /// unless checkonly is true.
121 /// </summary>
122 /// <param name="client"></param>
123 /// <param name="checkonly"></param>
119 public bool ValidateBakedTextureCache(IClientAPI client) 124 public bool ValidateBakedTextureCache(IClientAPI client)
120 { 125 {
121 return ValidateBakedTextureCache(client, true); 126 return ValidateBakedTextureCache(client, true);
@@ -157,12 +162,12 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory
157 // one and we're done otherwise, ask for a rebake 162 // one and we're done otherwise, ask for a rebake
158 if (checkonly) return false; 163 if (checkonly) return false;
159 164
160 m_log.WarnFormat("[AVFACTORY] missing baked texture {0}, request rebake",face.TextureID); 165 m_log.InfoFormat("[AVFACTORY] missing baked texture {0}, request rebake",face.TextureID);
161 client.SendRebakeAvatarTextures(face.TextureID); 166 client.SendRebakeAvatarTextures(face.TextureID);
162 } 167 }
163 } 168 }
164 169
165 m_log.WarnFormat("[AVFACTORY]: complete texture check for {0}",client.AgentId); 170 m_log.InfoFormat("[AVFACTORY]: complete texture check for {0}",client.AgentId);
166 171
167 // If we only found default textures, then the appearance is not cached 172 // If we only found default textures, then the appearance is not cached
168 return (defonly ? false : true); 173 return (defonly ? false : true);
@@ -182,8 +187,10 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory
182 return; 187 return;
183 } 188 }
184 189
185 m_log.WarnFormat("[AVFACTORY]: start SetAppearance for {0}",client.AgentId); 190 m_log.InfoFormat("[AVFACTORY]: start SetAppearance for {0}",client.AgentId);
186 191
192 // TODO: This is probably not necessary any longer, just assume the
193 // textureEntry set implies that the appearance transaction is complete
187 bool changed = false; 194 bool changed = false;
188 195
189 // Process the texture entry transactionally, this doesn't guarantee that Appearance is 196 // Process the texture entry transactionally, this doesn't guarantee that Appearance is
@@ -203,7 +210,7 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory
203 { 210 {
204 changed = sp.Appearance.SetTextureEntries(textureEntry) || changed; 211 changed = sp.Appearance.SetTextureEntries(textureEntry) || changed;
205 212
206 m_log.WarnFormat("[AVFACTORY]: received texture update for {0}",client.AgentId); 213 m_log.InfoFormat("[AVFACTORY]: received texture update for {0}",client.AgentId);
207 Util.FireAndForget(delegate(object o) { ValidateBakedTextureCache(client,false); }); 214 Util.FireAndForget(delegate(object o) { ValidateBakedTextureCache(client,false); });
208 215
209 // This appears to be set only in the final stage of the appearance 216 // This appears to be set only in the final stage of the appearance
@@ -216,13 +223,6 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory
216 223
217 } 224 }
218 225
219// // If something changed in the appearance then queue an appearance save
220// if (changed)
221// QueueAppearanceSave(client.AgentId);
222
223// // And always queue up an appearance update to send out
224// QueueAppearanceSend(client.AgentId);
225
226 // m_log.WarnFormat("[AVFACTORY]: complete SetAppearance for {0}:\n{1}",client.AgentId,sp.Appearance.ToString()); 226 // m_log.WarnFormat("[AVFACTORY]: complete SetAppearance for {0}:\n{1}",client.AgentId,sp.Appearance.ToString());
227 } 227 }
228 228
@@ -377,9 +377,11 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory
377 377
378 // m_log.WarnFormat("[AVFACTORY]: AvatarIsWearing called for {0}", client.AgentId); 378 // m_log.WarnFormat("[AVFACTORY]: AvatarIsWearing called for {0}", client.AgentId);
379 379
380 // we need to clean out the existing textures
381 sp.Appearance.ResetAppearance();
382
380 // operate on a copy of the appearance so we don't have to lock anything 383 // operate on a copy of the appearance so we don't have to lock anything
381 AvatarAppearance avatAppearance = new AvatarAppearance(sp.Appearance, false); 384 AvatarAppearance avatAppearance = new AvatarAppearance(sp.Appearance, false);
382 sp.Appearance.ResetBakedTextures(); // this makes sure we don't reuse old textures if the baking takes time
383 385
384 foreach (AvatarWearingArgs.Wearable wear in e.NowWearing) 386 foreach (AvatarWearingArgs.Wearable wear in e.NowWearing)
385 { 387 {
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
index 5a842d8..7ce94d4 100644
--- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs
+++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
@@ -2789,7 +2789,7 @@ namespace OpenSim.Region.Framework.Scenes
2789 // If we aren't using a cached appearance, then clear out the baked textures 2789 // If we aren't using a cached appearance, then clear out the baked textures
2790 if (! cachedappearance) 2790 if (! cachedappearance)
2791 { 2791 {
2792 m_appearance.ResetBakedTextures(); 2792 m_appearance.ResetAppearance();
2793 if (m_scene.AvatarFactory != null) 2793 if (m_scene.AvatarFactory != null)
2794 m_scene.AvatarFactory.QueueAppearanceSave(UUID); 2794 m_scene.AvatarFactory.QueueAppearanceSave(UUID);
2795 } 2795 }
@@ -2799,12 +2799,12 @@ namespace OpenSim.Region.Framework.Scenes
2799 // again here... this comes after the cached appearance check because the avatars 2799 // again here... this comes after the cached appearance check because the avatars
2800 // appearance goes into the avatar update packet 2800 // appearance goes into the avatar update packet
2801 SendAvatarDataToAllAgents(); 2801 SendAvatarDataToAllAgents();
2802 SendAppearanceToAgent(this);
2802 2803
2803 // If we are using the the cached appearance then send it out to everyone 2804 // If we are using the the cached appearance then send it out to everyone
2804 if (cachedappearance) 2805 if (cachedappearance)
2805 { 2806 {
2806 m_log.WarnFormat("[SCENEPRESENCE]: baked textures are in the cache for {0}", Name); 2807 m_log.InfoFormat("[SCENEPRESENCE]: baked textures are in the cache for {0}", Name);
2807 SendAppearanceToAgent(this);
2808 2808
2809 // If the avatars baked textures are all in the cache, then we have a 2809 // If the avatars baked textures are all in the cache, then we have a
2810 // complete appearance... send it out, if not, then we'll send it when 2810 // complete appearance... send it out, if not, then we'll send it when