From 179724b4fcc063adb67556bcb5997b2de663e348 Mon Sep 17 00:00:00 2001 From: Dahlia Trimble Date: Fri, 29 May 2009 08:57:10 +0000 Subject: some clean up of sculpt map caching code remove a redundant debug message --- OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs | 3 ++- OpenSim/Region/Physics/Meshing/Meshmerizer.cs | 8 +++----- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs index 4446fa4..06c4d6b 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs @@ -2970,12 +2970,13 @@ namespace OpenSim.Region.Framework.Scenes // check if a previously decoded sculpt map has been cached if (File.Exists(System.IO.Path.Combine("j2kDecodeCache", "smap_" + part.Shape.SculptTexture.ToString()))) { - m_log.Debug("[SCULPT]: found cached sculpt map - calling AssetReceived"); part.SculptTextureCallback(part.Shape.SculptTexture, null); } else + { m_scene.AssetService.Get( part.Shape.SculptTexture.ToString(), part, AssetReceived); + } } } } diff --git a/OpenSim/Region/Physics/Meshing/Meshmerizer.cs b/OpenSim/Region/Physics/Meshing/Meshmerizer.cs index f3e79c9..feeaf71 100644 --- a/OpenSim/Region/Physics/Meshing/Meshmerizer.cs +++ b/OpenSim/Region/Physics/Meshing/Meshmerizer.cs @@ -184,9 +184,6 @@ namespace OpenSim.Region.Physics.Meshing if (primShape.SculptEntry) { - //if (primShape.SculptData.Length == 0) - // return null; - if (cacheSculptMaps && primShape.SculptTexture != null) { decodedSculptFileName = System.IO.Path.Combine(decodedScultMapPath, "smap_" + primShape.SculptTexture.ToString()); @@ -196,8 +193,6 @@ namespace OpenSim.Region.Physics.Meshing { idata = Image.FromFile(decodedSculptFileName); } - else if (primShape.SculptData.Length == 0) - return null; } catch (Exception e) { @@ -210,6 +205,9 @@ namespace OpenSim.Region.Physics.Meshing if (idata == null) { + if (primShape.SculptData.Length == 0) + return null; + try { ManagedImage managedImage; // we never use this -- cgit v1.1