aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/Serialization
diff options
context:
space:
mode:
authorUbitUmarov2017-07-16 05:19:27 +0100
committerUbitUmarov2017-07-16 05:19:27 +0100
commit9ae26fc5afc96c793186b79e80ac8f1a8a040d5b (patch)
tree450546e149c8620d422728056f5f0faf820c9c6a /OpenSim/Region/Framework/Scenes/Serialization
parentode does not like null refs (diff)
downloadopensim-SC-9ae26fc5afc96c793186b79e80ac8f1a8a040d5b.zip
opensim-SC-9ae26fc5afc96c793186b79e80ac8f1a8a040d5b.tar.gz
opensim-SC-9ae26fc5afc96c793186b79e80ac8f1a8a040d5b.tar.bz2
opensim-SC-9ae26fc5afc96c793186b79e80ac8f1a8a040d5b.tar.xz
store kfm on inventory. this may still be a bit confusing on rez
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/Serialization')
-rw-r--r--OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs23
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