aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs')
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs32
1 files changed, 15 insertions, 17 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
index a184445..fa23fcd 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
@@ -3288,7 +3288,14 @@ namespace OpenSim.Region.Framework.Scenes
3288 3288
3289 return retmass; 3289 return retmass;
3290 } 3290 }
3291 3291
3292 /// <summary>
3293 /// If the object is a sculpt/mesh, retrieve the mesh data for each part and reinsert it into each shape so that
3294 /// the physics engine can use it.
3295 /// </summary>
3296 /// <remarks>
3297 /// When the physics engine has finished with it, the sculpt data is discarded to save memory.
3298 /// </remarks>
3292 public void CheckSculptAndLoad() 3299 public void CheckSculptAndLoad()
3293 { 3300 {
3294 if (IsDeleted) 3301 if (IsDeleted)
@@ -3302,24 +3309,15 @@ namespace OpenSim.Region.Framework.Scenes
3302 SceneObjectPart[] parts = m_parts.GetArray(); 3309 SceneObjectPart[] parts = m_parts.GetArray();
3303 3310
3304 for (int i = 0; i < parts.Length; i++) 3311 for (int i = 0; i < parts.Length; i++)
3305 { 3312 parts[i].CheckSculptAndLoad();
3306 SceneObjectPart part = parts[i];
3307 if (part.Shape.SculptEntry && part.Shape.SculptTexture != UUID.Zero)
3308 {
3309 // check if a previously decoded sculpt map has been cached
3310 if (File.Exists(System.IO.Path.Combine("j2kDecodeCache", "smap_" + part.Shape.SculptTexture.ToString())))
3311 {
3312 part.SculptTextureCallback(part.Shape.SculptTexture, null);
3313 }
3314 else
3315 {
3316 m_scene.AssetService.Get(
3317 part.Shape.SculptTexture.ToString(), part, AssetReceived);
3318 }
3319 }
3320 }
3321 } 3313 }
3322 3314
3315 /// <summary>
3316 /// Handle an asset received asynchronously from the asset service.
3317 /// </summary>
3318 /// <param name="id"></param>
3319 /// <param name="sender"></param>
3320 /// <param name="asset"></param>
3323 protected void AssetReceived(string id, Object sender, AssetBase asset) 3321 protected void AssetReceived(string id, Object sender, AssetBase asset)
3324 { 3322 {
3325 SceneObjectPart sop = (SceneObjectPart)sender; 3323 SceneObjectPart sop = (SceneObjectPart)sender;