aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Modules/World/Serialiser
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Environment/Modules/World/Serialiser')
-rw-r--r--OpenSim/Region/Environment/Modules/World/Serialiser/IRegionSerialiser.cs3
-rw-r--r--OpenSim/Region/Environment/Modules/World/Serialiser/SceneXmlLoader.cs14
-rw-r--r--OpenSim/Region/Environment/Modules/World/Serialiser/SerialiserModule.cs4
3 files changed, 14 insertions, 7 deletions
diff --git a/OpenSim/Region/Environment/Modules/World/Serialiser/IRegionSerialiser.cs b/OpenSim/Region/Environment/Modules/World/Serialiser/IRegionSerialiser.cs
index 3ae7a54..0fc8ac3 100644
--- a/OpenSim/Region/Environment/Modules/World/Serialiser/IRegionSerialiser.cs
+++ b/OpenSim/Region/Environment/Modules/World/Serialiser/IRegionSerialiser.cs
@@ -85,7 +85,8 @@ namespace OpenSim.Region.Environment.Modules.World.Serialiser
85 /// </summary> 85 /// </summary>
86 /// <param name="scene"></param> 86 /// <param name="scene"></param>
87 /// <param name="xmlString"></param> 87 /// <param name="xmlString"></param>
88 void LoadGroupFromXml2(Scene scene, string xmlString); 88 /// <returns>The scene object created</returns>
89 SceneObjectGroup LoadGroupFromXml2(Scene scene, string xmlString);
89 90
90 /// <summary> 91 /// <summary>
91 /// Serialize an individual scene object into the xml2 format 92 /// Serialize an individual scene object into the xml2 format
diff --git a/OpenSim/Region/Environment/Modules/World/Serialiser/SceneXmlLoader.cs b/OpenSim/Region/Environment/Modules/World/Serialiser/SceneXmlLoader.cs
index 9bab2b6..f283ecb 100644
--- a/OpenSim/Region/Environment/Modules/World/Serialiser/SceneXmlLoader.cs
+++ b/OpenSim/Region/Environment/Modules/World/Serialiser/SceneXmlLoader.cs
@@ -104,7 +104,7 @@ namespace OpenSim.Region.Environment.Scenes
104 return grp.ToXmlString2(); 104 return grp.ToXmlString2();
105 } 105 }
106 106
107 public static void LoadGroupFromXml2(Scene scene, string xmlString) 107 public static SceneObjectGroup LoadGroupFromXml2(Scene scene, string xmlString)
108 { 108 {
109 XmlDocument doc = new XmlDocument(); 109 XmlDocument doc = new XmlDocument();
110 XmlNode rootNode; 110 XmlNode rootNode;
@@ -126,11 +126,14 @@ namespace OpenSim.Region.Environment.Scenes
126 { 126 {
127 CreatePrimFromXml2(scene, aPrimNode.OuterXml); 127 CreatePrimFromXml2(scene, aPrimNode.OuterXml);
128 } 128 }
129
130 // There is only ever one prim, but it's easiest to return null here since this part should disappear post 0.5.9 anyway
131 return null;
129 } 132 }
130 else 133 else
131 { 134 {
132 CreatePrimFromXml2(scene, rootNode.OuterXml); 135 return CreatePrimFromXml2(scene, rootNode.OuterXml);
133 } 136 }
134 } 137 }
135 138
136 /// <summary> 139 /// <summary>
@@ -177,11 +180,14 @@ namespace OpenSim.Region.Environment.Scenes
177 /// </summary> 180 /// </summary>
178 /// <param name="scene"></param> 181 /// <param name="scene"></param>
179 /// <param name="xmlData"></param> 182 /// <param name="xmlData"></param>
180 protected static void CreatePrimFromXml2(Scene scene, string xmlData) 183 /// <returns>The scene object created</returns>
184 protected static SceneObjectGroup CreatePrimFromXml2(Scene scene, string xmlData)
181 { 185 {
182 SceneObjectGroup obj = new SceneObjectGroup(xmlData); 186 SceneObjectGroup obj = new SceneObjectGroup(xmlData);
183 187
184 scene.AddRestoredSceneObject(obj, true); 188 scene.AddRestoredSceneObject(obj, true);
189
190 return obj;
185 } 191 }
186 192
187 public static void SavePrimsToXml2(Scene scene, string fileName) 193 public static void SavePrimsToXml2(Scene scene, string fileName)
diff --git a/OpenSim/Region/Environment/Modules/World/Serialiser/SerialiserModule.cs b/OpenSim/Region/Environment/Modules/World/Serialiser/SerialiserModule.cs
index c7b5fa5..eb3ab2e 100644
--- a/OpenSim/Region/Environment/Modules/World/Serialiser/SerialiserModule.cs
+++ b/OpenSim/Region/Environment/Modules/World/Serialiser/SerialiserModule.cs
@@ -112,9 +112,9 @@ namespace OpenSim.Region.Environment.Modules.World.Serialiser
112 SceneXmlLoader.SavePrimsToXml2(scene, fileName); 112 SceneXmlLoader.SavePrimsToXml2(scene, fileName);
113 } 113 }
114 114
115 public void LoadGroupFromXml2(Scene scene, string xmlString) 115 public SceneObjectGroup LoadGroupFromXml2(Scene scene, string xmlString)
116 { 116 {
117 SceneXmlLoader.LoadGroupFromXml2(scene, xmlString); 117 return SceneXmlLoader.LoadGroupFromXml2(scene, xmlString);
118 } 118 }
119 119
120 public string SaveGroupToXml2(SceneObjectGroup grp) 120 public string SaveGroupToXml2(SceneObjectGroup grp)