mirror of
https://github.com/opensim/opensim.git
synced 2026-08-01 14:16:07 +08:00
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:
@@ -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>();
|
||||
|
||||
Reference in New Issue
Block a user