From: Richard Alimi <ralimi@us.ibm.com>

The following patch makes some enhancements to loading/saving the Xml2
format.

- Add streamed version of functionality for saving prims to Xml2
  format. The streamed version (optionally) allows for saving the
  prims whose positions appear within a particular bounding box.

- Expose stream versions of LoadPrimsFromXml2 and SavePrimsToXml2 in
  the Scene class

- Extend loading from Xml2 (the streamed version) to optionally start
  scripts for the loaded scene objects)
This commit is contained in:
Dr Scofield
2008-08-15 07:20:38 +00:00
parent 8606a86d5c
commit 8d479fe5af
4 changed files with 106 additions and 12 deletions

View File

@@ -102,9 +102,9 @@ namespace OpenSim.Region.Environment.Modules.World.Serialiser
SceneXmlLoader.LoadPrimsFromXml2(scene, fileName);
}
public void LoadPrimsFromXml2(Scene scene, TextReader reader)
public void LoadPrimsFromXml2(Scene scene, TextReader reader, bool startScripts)
{
SceneXmlLoader.LoadPrimsFromXml2(scene, reader);
SceneXmlLoader.LoadPrimsFromXml2(scene, reader, startScripts);
}
public void SavePrimsToXml2(Scene scene, string fileName)
@@ -112,6 +112,11 @@ namespace OpenSim.Region.Environment.Modules.World.Serialiser
SceneXmlLoader.SavePrimsToXml2(scene, fileName);
}
public void SavePrimsToXml2(Scene scene, TextWriter stream, LLVector3 min, LLVector3 max)
{
SceneXmlLoader.SavePrimsToXml2(scene, stream, min, max);
}
public SceneObjectGroup DeserializeGroupFromXml2(string xmlString)
{
return SceneXmlLoader.DeserializeGroupFromXml2(xmlString);
@@ -127,6 +132,11 @@ namespace OpenSim.Region.Environment.Modules.World.Serialiser
SceneXmlLoader.SavePrimListToXml2(entityList, fileName);
}
public void SavePrimListToXml2(List<EntityBase> entityList, TextWriter stream, LLVector3 min, LLVector3 max)
{
SceneXmlLoader.SavePrimListToXml2(entityList, stream, min, max);
}
public List<string> SerialiseRegion(Scene scene, string saveDir)
{
List<string> results = new List<string>();