aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Physics/Meshing/Meshmerizer.cs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/Physics/Meshing/Meshmerizer.cs14
1 files changed, 9 insertions, 5 deletions
diff --git a/OpenSim/Region/Physics/Meshing/Meshmerizer.cs b/OpenSim/Region/Physics/Meshing/Meshmerizer.cs
index fbe1949..fded95e 100644
--- a/OpenSim/Region/Physics/Meshing/Meshmerizer.cs
+++ b/OpenSim/Region/Physics/Meshing/Meshmerizer.cs
@@ -284,9 +284,13 @@ namespace OpenSim.Region.Physics.Meshing
284 284
285 try 285 try
286 { 286 {
287 idata = CSJ2K.J2kImage.FromBytes(primShape.SculptData); 287 OpenMetaverse.Imaging.ManagedImage unusedData;
288 OpenMetaverse.Imaging.OpenJPEG.DecodeToImage(primShape.SculptData, out unusedData, out idata);
289 unusedData = null;
288 290
289 if (cacheSculptMaps) 291 //idata = CSJ2K.J2kImage.FromBytes(primShape.SculptData);
292
293 if (cacheSculptMaps && idata != null)
290 { 294 {
291 try { idata.Save(decodedSculptFileName, ImageFormat.MemoryBmp); } 295 try { idata.Save(decodedSculptFileName, ImageFormat.MemoryBmp); }
292 catch (Exception e) { m_log.Error("[SCULPT]: unable to cache sculpt map " + decodedSculptFileName + " " + e.Message); } 296 catch (Exception e) { m_log.Error("[SCULPT]: unable to cache sculpt map " + decodedSculptFileName + " " + e.Message); }
@@ -299,12 +303,12 @@ namespace OpenSim.Region.Physics.Meshing
299 } 303 }
300 catch (IndexOutOfRangeException) 304 catch (IndexOutOfRangeException)
301 { 305 {
302 m_log.Error("[PHYSICS]: OpenJpeg was unable to decode this. Physics Proxy generation failed"); 306 m_log.Error("[PHYSICS]: OpenJpeg was unable to decode this. Physics Proxy generation failed");
303 return null; 307 return null;
304 } 308 }
305 catch (Exception) 309 catch (Exception ex)
306 { 310 {
307 m_log.Error("[PHYSICS]: Unable to generate a Sculpty physics proxy. Sculpty texture decode failed!"); 311 m_log.Error("[PHYSICS]: Unable to generate a Sculpty physics proxy. Sculpty texture decode failed: " + ex.Message);
308 return null; 312 return null;
309 } 313 }
310 } 314 }