Catch meshing error in Meshmerizer

avinationmerge
Tom 2010-08-02 21:54:47 -07:00
parent d2d56494b2
commit 8f2986bc6a
1 changed files with 15 additions and 7 deletions

View File

@ -336,6 +336,8 @@ namespace OpenSim.Region.Physics.Meshing
bool mirror = ((primShape.SculptType & 128) != 0);
bool invert = ((primShape.SculptType & 64) != 0);
try
{
sculptMesh = new PrimMesher.SculptMesh((Bitmap)idata, sculptType, (int)lod, false, mirror, invert);
idata.Dispose();
@ -347,6 +349,12 @@ namespace OpenSim.Region.Physics.Meshing
coords = sculptMesh.coords;
faces = sculptMesh.faces;
}
catch(Exception ex)
{
m_log.Error("[Meshing]: Unable to generate a Sculpty mesh. " + ex.Message);
return null;
}
}
else
{
float pathShearX = primShape.PathShearX < 128 ? (float)primShape.PathShearX * 0.01f : (float)(primShape.PathShearX - 256) * 0.01f;