aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/Serialization
diff options
context:
space:
mode:
authorMelanie2013-06-06 03:03:05 +0100
committerMelanie2013-06-06 03:03:05 +0100
commit81ad9255b5f44d988bf37cfaf6dc59b05fd744b7 (patch)
tree201e5f412c3f12e0f94424362fffb0c635343af3 /OpenSim/Region/Framework/Scenes/Serialization
parentCommitting Avination's Keyframe module. This is not hooked up yet and will do... (diff)
downloadopensim-SC_OLD-81ad9255b5f44d988bf37cfaf6dc59b05fd744b7.zip
opensim-SC_OLD-81ad9255b5f44d988bf37cfaf6dc59b05fd744b7.tar.gz
opensim-SC_OLD-81ad9255b5f44d988bf37cfaf6dc59b05fd744b7.tar.bz2
opensim-SC_OLD-81ad9255b5f44d988bf37cfaf6dc59b05fd744b7.tar.xz
Hook up Keyframe motion to almost everything. Failing to cross a sim border
may yield unexpected results in some cases. No database persistence yet,
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/Serialization')
-rw-r--r--OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs16
1 files changed, 16 insertions, 0 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs b/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs
index 39420a6..3882b45 100644
--- a/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs
+++ b/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs
@@ -262,6 +262,12 @@ namespace OpenSim.Region.Framework.Scenes.Serialization
262 sr.Close(); 262 sr.Close();
263 } 263 }
264 264
265 XmlNodeList keymotion = doc.GetElementsByTagName("KeyframeMotion");
266 if (keymotion.Count > 0)
267 sceneObject.RootPart.KeyframeMotion = KeyframeMotion.FromData(sceneObject, Convert.FromBase64String(keymotion[0].InnerText));
268 else
269 sceneObject.RootPart.KeyframeMotion = null;
270
265 // Script state may, or may not, exist. Not having any, is NOT 271 // Script state may, or may not, exist. Not having any, is NOT
266 // ever a problem. 272 // ever a problem.
267 sceneObject.LoadScriptState(doc); 273 sceneObject.LoadScriptState(doc);
@@ -1182,6 +1188,16 @@ namespace OpenSim.Region.Framework.Scenes.Serialization
1182 }); 1188 });
1183 1189
1184 writer.WriteEndElement(); 1190 writer.WriteEndElement();
1191
1192 if (sog.RootPart.KeyframeMotion != null)
1193 {
1194 Byte[] data = sog.RootPart.KeyframeMotion.Serialize();
1195
1196 writer.WriteStartElement(String.Empty, "KeyframeMotion", String.Empty);
1197 writer.WriteBase64(data, 0, data.Length);
1198 writer.WriteEndElement();
1199 }
1200
1185 writer.WriteEndElement(); 1201 writer.WriteEndElement();
1186 } 1202 }
1187 1203