aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/Physics/Meshing/Meshmerizer.cs21
-rw-r--r--OpenSim/Region/Physics/OdePlugin/OdePlugin.cs5
2 files changed, 21 insertions, 5 deletions
diff --git a/OpenSim/Region/Physics/Meshing/Meshmerizer.cs b/OpenSim/Region/Physics/Meshing/Meshmerizer.cs
index 99b2d84..a5fe45b 100644
--- a/OpenSim/Region/Physics/Meshing/Meshmerizer.cs
+++ b/OpenSim/Region/Physics/Meshing/Meshmerizer.cs
@@ -291,7 +291,14 @@ namespace OpenSim.Region.Physics.Meshing
291 { 291 {
292 try 292 try
293 { 293 {
294 meshOsd = (OSDMap)OSDParser.DeserializeLLSDBinary(data); 294 OSD osd = OSDParser.DeserializeLLSDBinary(data);
295 if (osd is OSDMap)
296 meshOsd = (OSDMap)osd;
297 else
298 {
299 m_log.Warn("[Mesh}: unable to cast mesh asset to OSDMap");
300 return null;
301 }
295 } 302 }
296 catch (Exception e) 303 catch (Exception e)
297 { 304 {
@@ -302,11 +309,17 @@ namespace OpenSim.Region.Physics.Meshing
302 309
303 if (meshOsd is OSDMap) 310 if (meshOsd is OSDMap)
304 { 311 {
312 OSDMap physicsParms = null;
305 OSDMap map = (OSDMap)meshOsd; 313 OSDMap map = (OSDMap)meshOsd;
306 OSDMap physicsParms = (OSDMap)map["physics_shape"]; // old asset format 314 if (map.ContainsKey("physics_shape"))
307 315 physicsParms = (OSDMap)map["physics_shape"]; // old asset format
308 if (physicsParms.Count == 0) 316 else if (map.ContainsKey("physics_mesh"))
309 physicsParms = (OSDMap)map["physics_mesh"]; // new asset format 317 physicsParms = (OSDMap)map["physics_mesh"]; // new asset format
318 if (physicsParms == null)
319 {
320 m_log.Warn("[Mesh]: no recognized physics mesh found in mesh asset");
321 return null;
322 }
310 323
311 int physOffset = physicsParms["offset"].AsInteger() + (int)start; 324 int physOffset = physicsParms["offset"].AsInteger() + (int)start;
312 int physSize = physicsParms["size"].AsInteger(); 325 int physSize = physicsParms["size"].AsInteger();
diff --git a/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs b/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs
index a0101af..8d9f5f1 100644
--- a/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs
+++ b/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs
@@ -2502,7 +2502,7 @@ namespace OpenSim.Region.Physics.OdePlugin
2502 } 2502 }
2503 2503
2504 // if it's a standard box or sphere with no cuts, hollows, twist or top shear, return false since ODE can use an internal representation for the prim 2504 // if it's a standard box or sphere with no cuts, hollows, twist or top shear, return false since ODE can use an internal representation for the prim
2505 if (!forceSimplePrimMeshing) 2505 if (!forceSimplePrimMeshing && !pbs.SculptEntry)
2506 { 2506 {
2507 if ((pbs.ProfileShape == ProfileShape.Square && pbs.PathCurve == (byte)Extrusion.Straight) 2507 if ((pbs.ProfileShape == ProfileShape.Square && pbs.PathCurve == (byte)Extrusion.Straight)
2508 || (pbs.ProfileShape == ProfileShape.HalfCircle && pbs.PathCurve == (byte)Extrusion.Curve1 2508 || (pbs.ProfileShape == ProfileShape.HalfCircle && pbs.PathCurve == (byte)Extrusion.Curve1
@@ -2592,6 +2592,9 @@ namespace OpenSim.Region.Physics.OdePlugin
2592 } 2592 }
2593 } 2593 }
2594 2594
2595 if (pbs.SculptEntry && meshSculptedPrim)
2596 iPropertiesNotSupportedDefault++;
2597
2595 2598
2596 if (iPropertiesNotSupportedDefault == 0) 2599 if (iPropertiesNotSupportedDefault == 0)
2597 { 2600 {