aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Physics/Meshing/Meshmerizer.cs
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2009-11-03 19:11:09 +0000
committerJustin Clark-Casey (justincc)2009-11-03 19:11:09 +0000
commitaf0e5d097480de264e7501e7d5d35328be5640bb (patch)
tree4ca5cd796ed9618dc9134a6e5eee1f7e7912bee4 /OpenSim/Region/Physics/Meshing/Meshmerizer.cs
parentminor: remove some mono compiler warnings (diff)
parentFixed a couple of NREs in corner cases. (diff)
downloadopensim-SC_OLD-af0e5d097480de264e7501e7d5d35328be5640bb.zip
opensim-SC_OLD-af0e5d097480de264e7501e7d5d35328be5640bb.tar.gz
opensim-SC_OLD-af0e5d097480de264e7501e7d5d35328be5640bb.tar.bz2
opensim-SC_OLD-af0e5d097480de264e7501e7d5d35328be5640bb.tar.xz
Merge branch 'master' of ssh://justincc@opensimulator.org/var/git/opensim
Diffstat (limited to 'OpenSim/Region/Physics/Meshing/Meshmerizer.cs')
-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 }