reinstate a hopefully more robust experimental decoded sculpt map caching scheme

This commit is contained in:
Dahlia Trimble
2009-05-29 06:50:15 +00:00
parent 42fa7cf989
commit 05cbf0b502
3 changed files with 18 additions and 12 deletions

View File

@@ -2967,10 +2967,13 @@ namespace OpenSim.Region.Framework.Scenes
{
if (part.Shape.SculptEntry && part.Shape.SculptTexture != UUID.Zero)
{
//// 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
// 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);
}
@@ -2982,10 +2985,11 @@ namespace OpenSim.Region.Framework.Scenes
protected void AssetReceived(string id, Object sender, AssetBase asset)
{
if (asset != null)
SceneObjectPart sop = (SceneObjectPart)sender;
if (sop != null)
{
SceneObjectPart sop = (SceneObjectPart)sender;
if (sop != null)
if (asset != null)
sop.SculptTextureCallback(asset.FullID, asset);
}
}