diff options
author | Justin Clark-Casey (justincc) | 2009-11-03 19:11:09 +0000 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2009-11-03 19:11:09 +0000 |
commit | af0e5d097480de264e7501e7d5d35328be5640bb (patch) | |
tree | 4ca5cd796ed9618dc9134a6e5eee1f7e7912bee4 /OpenSim/Region/Physics/Meshing/Meshmerizer.cs | |
parent | minor: remove some mono compiler warnings (diff) | |
parent | Fixed a couple of NREs in corner cases. (diff) | |
download | opensim-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.cs | 14 |
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 | } |