aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
authorJonathan Freedman2010-10-24 15:01:01 -0400
committerJonathan Freedman2010-10-24 15:01:01 -0400
commit07db35697b27c04fea0b13bd050c5cfc2ccdc5a6 (patch)
tree7a96850244a6c814fce26788ba0ecc3681dc45f3 /OpenSim
parentMerge branch 'master' into mantis5110 (diff)
parentAdd PRIM_NAME, PRIM_DESC and PRIM_ROT_LOCAL (diff)
downloadopensim-SC_OLD-07db35697b27c04fea0b13bd050c5cfc2ccdc5a6.zip
opensim-SC_OLD-07db35697b27c04fea0b13bd050c5cfc2ccdc5a6.tar.gz
opensim-SC_OLD-07db35697b27c04fea0b13bd050c5cfc2ccdc5a6.tar.bz2
opensim-SC_OLD-07db35697b27c04fea0b13bd050c5cfc2ccdc5a6.tar.xz
Merge branch 'master' into mantis5110
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs19
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs27
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Constants.cs3
3 files changed, 46 insertions, 3 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs b/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs
index 044b599..95908fc 100644
--- a/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs
+++ b/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs
@@ -1426,7 +1426,7 @@ namespace OpenSim.Region.Framework.Scenes.Serialization
1426 1426
1427 reader.ReadStartElement(name); 1427 reader.ReadStartElement(name);
1428 vec.X = reader.ReadElementContentAsFloat(reader.Name, String.Empty); // X or x 1428 vec.X = reader.ReadElementContentAsFloat(reader.Name, String.Empty); // X or x
1429 vec.Y = reader.ReadElementContentAsFloat(reader.Name, String.Empty); // Y or Y 1429 vec.Y = reader.ReadElementContentAsFloat(reader.Name, String.Empty); // Y or y
1430 vec.Z = reader.ReadElementContentAsFloat(reader.Name, String.Empty); // Z or z 1430 vec.Z = reader.ReadElementContentAsFloat(reader.Name, String.Empty); // Z or z
1431 reader.ReadEndElement(); 1431 reader.ReadEndElement();
1432 1432
@@ -1501,15 +1501,28 @@ namespace OpenSim.Region.Framework.Scenes.Serialization
1501 1501
1502 reader.ReadStartElement(name, String.Empty); // Shape 1502 reader.ReadStartElement(name, String.Empty); // Shape
1503 1503
1504 string nodeName = string.Empty;
1504 while (reader.NodeType != XmlNodeType.EndElement) 1505 while (reader.NodeType != XmlNodeType.EndElement)
1505 { 1506 {
1507 nodeName = reader.Name;
1506 //m_log.DebugFormat("[XXX] Processing: {0}", reader.Name); 1508 //m_log.DebugFormat("[XXX] Processing: {0}", reader.Name);
1507 ShapeXmlProcessor p = null; 1509 ShapeXmlProcessor p = null;
1508 if (m_ShapeXmlProcessors.TryGetValue(reader.Name, out p)) 1510 if (m_ShapeXmlProcessors.TryGetValue(reader.Name, out p))
1509 p(shape, reader); 1511 {
1512 try
1513 {
1514 p(shape, reader);
1515 }
1516 catch (Exception e)
1517 {
1518 m_log.DebugFormat("[SceneObjectSerializer]: exception while parsing Shape {0}: {1}", nodeName, e);
1519 if (reader.NodeType == XmlNodeType.EndElement)
1520 reader.Read();
1521 }
1522 }
1510 else 1523 else
1511 { 1524 {
1512// m_log.DebugFormat("[SceneObjectSerializer]: caught unknown element in Shape {0}", reader.Name); 1525 // m_log.DebugFormat("[SceneObjectSerializer]: caught unknown element in Shape {0}", reader.Name);
1513 reader.ReadOuterXml(); 1526 reader.ReadOuterXml();
1514 } 1527 }
1515 } 1528 }
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
index 59a3618..1a13dea 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
@@ -7268,6 +7268,24 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
7268 part.SetText(primText, av3, Util.Clip((float)primTextAlpha, 0.0f, 1.0f)); 7268 part.SetText(primText, av3, Util.Clip((float)primTextAlpha, 0.0f, 1.0f));
7269 7269
7270 break; 7270 break;
7271 case (int)ScriptBaseClass.PRIM_NAME:
7272 if (remain < 1)
7273 return;
7274 string primName = rules.GetLSLStringItem(idx++);
7275 part.Name = primName;
7276 break;
7277 case (int)ScriptBaseClass.PRIM_DESC:
7278 if (remain < 1)
7279 return;
7280 string primDesc = rules.GetLSLStringItem(idx++);
7281 part.Description = primDesc;
7282 break;
7283 case (int)ScriptBaseClass.PRIM_ROT_LOCAL:
7284 if (remain < 1)
7285 return;
7286 LSL_Rotation lr = rules.GetQuaternionItem(idx++);
7287 SetRot(part, Rot2Quaternion(lr));
7288 break;
7271 } 7289 }
7272 } 7290 }
7273 } 7291 }
@@ -7813,6 +7831,15 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
7813 textColor.B)); 7831 textColor.B));
7814 res.Add(new LSL_Float(textColor.A)); 7832 res.Add(new LSL_Float(textColor.A));
7815 break; 7833 break;
7834 case (int)ScriptBaseClass.PRIM_NAME:
7835 res.Add(part.Name);
7836 break;
7837 case (int)ScriptBaseClass.PRIM_DESC:
7838 res.Add(part.Description);
7839 break;
7840 case (int)ScriptBaseClass.PRIM_ROT_LOCAL:
7841 res.Add(new LSL_Rotation(part.RotationOffset.X, part.RotationOffset.Y, part.RotationOffset.Z, part.RotationOffset.W));
7842 break;
7816 } 7843 }
7817 } 7844 }
7818 return res; 7845 return res;
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Constants.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Constants.cs
index 5da6bb9..b96e977 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Constants.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Constants.cs
@@ -316,6 +316,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
316 public const int PRIM_POINT_LIGHT = 23; // Huh? 316 public const int PRIM_POINT_LIGHT = 23; // Huh?
317 public const int PRIM_GLOW = 25; 317 public const int PRIM_GLOW = 25;
318 public const int PRIM_TEXT = 26; 318 public const int PRIM_TEXT = 26;
319 public const int PRIM_NAME = 27;
320 public const int PRIM_DESC = 28;
321 public const int PRIM_ROT_LOCAL = 29;
319 public const int PRIM_TEXGEN_DEFAULT = 0; 322 public const int PRIM_TEXGEN_DEFAULT = 0;
320 public const int PRIM_TEXGEN_PLANAR = 1; 323 public const int PRIM_TEXGEN_PLANAR = 1;
321 324