From db4f8d129887cd4fdd5603918590b3c940191882 Mon Sep 17 00:00:00 2001 From: Dahlia Trimble Date: Fri, 29 May 2009 02:46:35 +0000 Subject: Experimental decoded sculpt map caching --- OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs | 8 ++++++-- OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | 2 +- 2 files changed, 7 insertions(+), 3 deletions(-) (limited to 'OpenSim/Region/Framework') diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs index e0a50a1..a60ae83 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs @@ -2967,8 +2967,12 @@ namespace OpenSim.Region.Framework.Scenes { if (part.Shape.SculptEntry && part.Shape.SculptTexture != UUID.Zero) { - m_scene.AssetService.Get( - part.Shape.SculptTexture.ToString(), part, AssetReceived); + // check if a previously decoded sculpt map has been cached + if (File.Exists(System.IO.Path.Combine("j2kDecodeCache", "smap_" + part.Shape.SculptTexture.ToString()))) + part.SculptTextureCallback(part.Shape.SculptTexture, null); + else + m_scene.AssetService.Get( + part.Shape.SculptTexture.ToString(), part, AssetReceived); } } } diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs index 719b028..7065d2f 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs @@ -2268,7 +2268,7 @@ if (m_shape != null) { { if (m_shape.SculptEntry) { - if (texture != null) + //if (texture != null) // null could mean a cached sculpt map has been found { m_shape.SculptData = texture.Data; if (PhysActor != null) -- cgit v1.1