diff options
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/Serialization')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs b/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs index 3d867a4..cdf275b 100644 --- a/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs +++ b/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs | |||
@@ -112,9 +112,22 @@ namespace OpenSim.Region.Framework.Scenes.Serialization | |||
112 | while (reader.ReadToNextSibling("Part")); | 112 | while (reader.ReadToNextSibling("Part")); |
113 | } | 113 | } |
114 | 114 | ||
115 | reader.ReadEndElement(); | ||
116 | |||
117 | if (reader.Name == "KeyframeMotion" && reader.NodeType == XmlNodeType.Element) | ||
118 | { | ||
119 | |||
120 | string innerkeytxt = reader.ReadElementContentAsString(); | ||
121 | sceneObject.RootPart.KeyframeMotion = | ||
122 | KeyframeMotion.FromData(sceneObject, Convert.FromBase64String(innerkeytxt)); | ||
123 | } | ||
124 | else | ||
125 | sceneObject.RootPart.KeyframeMotion = null; | ||
126 | |||
115 | // Script state may, or may not, exist. Not having any, is NOT | 127 | // Script state may, or may not, exist. Not having any, is NOT |
116 | // ever a problem. | 128 | // ever a problem. |
117 | sceneObject.LoadScriptState(reader); | 129 | sceneObject.LoadScriptState(reader); |
130 | |||
118 | sceneObject.InvalidateDeepEffectivePerms(); | 131 | sceneObject.InvalidateDeepEffectivePerms(); |
119 | return sceneObject; | 132 | return sceneObject; |
120 | } | 133 | } |
@@ -211,9 +224,19 @@ namespace OpenSim.Region.Framework.Scenes.Serialization | |||
211 | 224 | ||
212 | writer.WriteEndElement(); // OtherParts | 225 | writer.WriteEndElement(); // OtherParts |
213 | 226 | ||
227 | if (sceneObject.RootPart.KeyframeMotion != null) | ||
228 | { | ||
229 | Byte[] data = sceneObject.RootPart.KeyframeMotion.Serialize(); | ||
230 | |||
231 | writer.WriteStartElement(String.Empty, "KeyframeMotion", String.Empty); | ||
232 | writer.WriteBase64(data, 0, data.Length); | ||
233 | writer.WriteEndElement(); | ||
234 | } | ||
235 | |||
214 | if (doScriptStates) | 236 | if (doScriptStates) |
215 | sceneObject.SaveScriptedState(writer); | 237 | sceneObject.SaveScriptedState(writer); |
216 | 238 | ||
239 | |||
217 | if (!noRootElement) | 240 | if (!noRootElement) |
218 | writer.WriteEndElement(); // SceneObjectGroup | 241 | writer.WriteEndElement(); // SceneObjectGroup |
219 | 242 | ||