aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/Serialization
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/Serialization')
-rw-r--r--OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs27
1 files changed, 27 insertions, 0 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs b/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs
index 7b94a81..b6aa31b 100644
--- a/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs
+++ b/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs
@@ -318,6 +318,8 @@ namespace OpenSim.Region.Framework.Scenes.Serialization
318 m_SOPXmlProcessors.Add("CollisionSound", ProcessCollisionSound); 318 m_SOPXmlProcessors.Add("CollisionSound", ProcessCollisionSound);
319 m_SOPXmlProcessors.Add("CollisionSoundVolume", ProcessCollisionSoundVolume); 319 m_SOPXmlProcessors.Add("CollisionSoundVolume", ProcessCollisionSoundVolume);
320 m_SOPXmlProcessors.Add("MediaUrl", ProcessMediaUrl); 320 m_SOPXmlProcessors.Add("MediaUrl", ProcessMediaUrl);
321 m_SOPXmlProcessors.Add("TextureAnimation", ProcessTextureAnimation);
322 m_SOPXmlProcessors.Add("ParticleSystem", ProcessParticleSystem);
321 #endregion 323 #endregion
322 324
323 #region TaskInventoryXmlProcessors initialization 325 #region TaskInventoryXmlProcessors initialization
@@ -663,6 +665,16 @@ namespace OpenSim.Region.Framework.Scenes.Serialization
663 { 665 {
664 obj.MediaUrl = reader.ReadElementContentAsString("MediaUrl", String.Empty); 666 obj.MediaUrl = reader.ReadElementContentAsString("MediaUrl", String.Empty);
665 } 667 }
668
669 private static void ProcessTextureAnimation(SceneObjectPart obj, XmlTextReader reader)
670 {
671 obj.TextureAnimation = Convert.FromBase64String(reader.ReadElementContentAsString("TextureAnimation", String.Empty));
672 }
673
674 private static void ProcessParticleSystem(SceneObjectPart obj, XmlTextReader reader)
675 {
676 obj.ParticleSystem = Convert.FromBase64String(reader.ReadElementContentAsString("ParticleSystem", String.Empty));
677 }
666 #endregion 678 #endregion
667 679
668 #region TaskInventoryXmlProcessors 680 #region TaskInventoryXmlProcessors
@@ -1128,6 +1140,8 @@ namespace OpenSim.Region.Framework.Scenes.Serialization
1128 writer.WriteElementString("CollisionSoundVolume", sop.CollisionSoundVolume.ToString()); 1140 writer.WriteElementString("CollisionSoundVolume", sop.CollisionSoundVolume.ToString());
1129 if (sop.MediaUrl != null) 1141 if (sop.MediaUrl != null)
1130 writer.WriteElementString("MediaUrl", sop.MediaUrl.ToString()); 1142 writer.WriteElementString("MediaUrl", sop.MediaUrl.ToString());
1143 WriteBytes(writer, "TextureAnimation", sop.TextureAnimation);
1144 WriteBytes(writer, "ParticleSystem", sop.ParticleSystem);
1131 1145
1132 writer.WriteEndElement(); 1146 writer.WriteEndElement();
1133 } 1147 }
@@ -1161,6 +1175,19 @@ namespace OpenSim.Region.Framework.Scenes.Serialization
1161 writer.WriteEndElement(); 1175 writer.WriteEndElement();
1162 } 1176 }
1163 1177
1178 static void WriteBytes(XmlTextWriter writer, string name, byte[] data)
1179 {
1180 writer.WriteStartElement(name);
1181 byte[] d;
1182 if (data != null)
1183 d = data;
1184 else
1185 d = Utils.EmptyBytes;
1186 writer.WriteBase64(d, 0, d.Length);
1187 writer.WriteEndElement(); // name
1188
1189 }
1190
1164 static void WriteTaskInventory(XmlTextWriter writer, TaskInventoryDictionary tinv, Dictionary<string, object> options) 1191 static void WriteTaskInventory(XmlTextWriter writer, TaskInventoryDictionary tinv, Dictionary<string, object> options)
1165 { 1192 {
1166 if (tinv.Count > 0) // otherwise skip this 1193 if (tinv.Count > 0) // otherwise skip this