master
Christopher 2018-01-24 23:49:57 +01:00
parent 5bc09bd801
commit ffbcc276c1
1 changed files with 11 additions and 7 deletions

View File

@ -41,8 +41,6 @@ using Mono.Addins;
using OpenSim.Framework; using OpenSim.Framework;
using OpenSim.Region.Framework.Interfaces; using OpenSim.Region.Framework.Interfaces;
using OpenSim.Region.Framework.Scenes; using OpenSim.Region.Framework.Scenes;
using OpenSim.Region.PhysicsModules.SharedBase;
using OpenSim.Services.Interfaces;
using OpenMetaverse; using OpenMetaverse;
using OpenMetaverse.Assets; using OpenMetaverse.Assets;
@ -554,13 +552,19 @@ namespace OpenSim.Region.CoreModules.World.Warp3DMap
IJ2KDecoder imgDecoder = m_scene.RequestModuleInterface<IJ2KDecoder>(); IJ2KDecoder imgDecoder = m_scene.RequestModuleInterface<IJ2KDecoder>();
if(imgDecoder != null) if(imgDecoder != null)
{ {
Image sculpt = imgDecoder.DecodeToImage(sculptAsset); try
if(sculpt != null)
{ {
renderMesh = m_primMesher.GenerateFacetedSculptMesh(omvPrim,(Bitmap)sculpt, Image sculpt = imgDecoder.DecodeToImage(sculptAsset);
if (sculpt != null)
{
renderMesh = m_primMesher.GenerateFacetedSculptMesh(omvPrim, (Bitmap)sculpt,
DetailLevel.Medium); DetailLevel.Medium);
sculpt.Dispose(); sculpt.Dispose();
} }
}catch(Exception _e)
{
m_log.Error(LogHeader + "Fail to read asset data for scene object " + omvPrim.GroupID + "(" + omvPrim.Properties.Name + ")");
}
} }
} }
} }