some clean up of sculpt map caching code

remove a redundant debug message
0.6.6-post-fixes
Dahlia Trimble 2009-05-29 08:57:10 +00:00
parent 05cbf0b502
commit 179724b4fc
2 changed files with 5 additions and 6 deletions

View File

@ -2970,10 +2970,10 @@ 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);
}
@ -2982,6 +2982,7 @@ namespace OpenSim.Region.Framework.Scenes
}
}
}
}
protected void AssetReceived(string id, Object sender, AssetBase asset)
{

View File

@ -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