diff options
author | Tom | 2010-08-02 21:54:47 -0700 |
---|---|---|
committer | Tom | 2010-08-02 21:54:47 -0700 |
commit | 8f2986bc6a438ea9f5de912a5b76a196e7933175 (patch) | |
tree | 53f0a0942827c9c365d95167ca088408de957aa3 /OpenSim | |
parent | Fix the XmlRpcRouterModule so it reads from the correct config section ([XMLR... (diff) | |
download | opensim-SC-8f2986bc6a438ea9f5de912a5b76a196e7933175.zip opensim-SC-8f2986bc6a438ea9f5de912a5b76a196e7933175.tar.gz opensim-SC-8f2986bc6a438ea9f5de912a5b76a196e7933175.tar.bz2 opensim-SC-8f2986bc6a438ea9f5de912a5b76a196e7933175.tar.xz |
Catch meshing error in Meshmerizer
Diffstat (limited to 'OpenSim')
-rw-r--r-- | OpenSim/Region/Physics/Meshing/Meshmerizer.cs | 22 |
1 files changed, 15 insertions, 7 deletions
diff --git a/OpenSim/Region/Physics/Meshing/Meshmerizer.cs b/OpenSim/Region/Physics/Meshing/Meshmerizer.cs index fded95e..fb2b462 100644 --- a/OpenSim/Region/Physics/Meshing/Meshmerizer.cs +++ b/OpenSim/Region/Physics/Meshing/Meshmerizer.cs | |||
@@ -336,16 +336,24 @@ namespace OpenSim.Region.Physics.Meshing | |||
336 | bool mirror = ((primShape.SculptType & 128) != 0); | 336 | bool mirror = ((primShape.SculptType & 128) != 0); |
337 | bool invert = ((primShape.SculptType & 64) != 0); | 337 | bool invert = ((primShape.SculptType & 64) != 0); |
338 | 338 | ||
339 | sculptMesh = new PrimMesher.SculptMesh((Bitmap)idata, sculptType, (int)lod, false, mirror, invert); | 339 | try |
340 | 340 | { | |
341 | idata.Dispose(); | 341 | sculptMesh = new PrimMesher.SculptMesh((Bitmap)idata, sculptType, (int)lod, false, mirror, invert); |
342 | |||
343 | idata.Dispose(); | ||
342 | 344 | ||
343 | sculptMesh.DumpRaw(baseDir, primName, "primMesh"); | 345 | sculptMesh.DumpRaw(baseDir, primName, "primMesh"); |
344 | 346 | ||
345 | sculptMesh.Scale(size.X, size.Y, size.Z); | 347 | sculptMesh.Scale(size.X, size.Y, size.Z); |
346 | 348 | ||
347 | coords = sculptMesh.coords; | 349 | coords = sculptMesh.coords; |
348 | faces = sculptMesh.faces; | 350 | faces = sculptMesh.faces; |
351 | } | ||
352 | catch(Exception ex) | ||
353 | { | ||
354 | m_log.Error("[Meshing]: Unable to generate a Sculpty mesh. " + ex.Message); | ||
355 | return null; | ||
356 | } | ||
349 | } | 357 | } |
350 | else | 358 | else |
351 | { | 359 | { |