diff options
Diffstat (limited to 'OpenSim/Region/Physics/Meshing/Meshmerizer.cs')
-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 | { |