aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Scenes
diff options
context:
space:
mode:
authorDr Scofield2008-08-15 07:20:38 +0000
committerDr Scofield2008-08-15 07:20:38 +0000
commit8d479fe5afc30cb4a188b79fb9f09820a763afbb (patch)
tree5f228dd1a51e3760c2a1505239691494c88d9827 /OpenSim/Region/Environment/Scenes
parentFrom: Richard Alimi <ralimi@us.ibm.com> (diff)
downloadopensim-SC_OLD-8d479fe5afc30cb4a188b79fb9f09820a763afbb.zip
opensim-SC_OLD-8d479fe5afc30cb4a188b79fb9f09820a763afbb.tar.gz
opensim-SC_OLD-8d479fe5afc30cb4a188b79fb9f09820a763afbb.tar.bz2
opensim-SC_OLD-8d479fe5afc30cb4a188b79fb9f09820a763afbb.tar.xz
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)
Diffstat (limited to 'OpenSim/Region/Environment/Scenes')
-rw-r--r--OpenSim/Region/Environment/Scenes/Scene.cs15
1 files changed, 15 insertions, 0 deletions
diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs
index bd02b7e..4e7e764 100644
--- a/OpenSim/Region/Environment/Scenes/Scene.cs
+++ b/OpenSim/Region/Environment/Scenes/Scene.cs
@@ -29,6 +29,7 @@ using System;
29using System.Collections.Generic; 29using System.Collections.Generic;
30using System.Drawing; 30using System.Drawing;
31using System.Drawing.Imaging; 31using System.Drawing.Imaging;
32using System.IO;
32using System.Threading; 33using System.Threading;
33using System.Timers; 34using System.Timers;
34using Axiom.Math; 35using Axiom.Math;
@@ -1760,6 +1761,13 @@ namespace OpenSim.Region.Environment.Scenes
1760 m_serialiser.LoadPrimsFromXml2(this, fileName); 1761 m_serialiser.LoadPrimsFromXml2(this, fileName);
1761 } 1762 }
1762 1763
1764 public void LoadPrimsFromXml2(TextReader reader, bool startScripts)
1765 {
1766 m_log.InfoFormat("[SCENE]: Loading prims in xml2 format to region {0} from stream", RegionInfo.RegionName);
1767
1768 m_serialiser.LoadPrimsFromXml2(this, reader, startScripts);
1769 }
1770
1763 public void SavePrimsToXml2(string fileName) 1771 public void SavePrimsToXml2(string fileName)
1764 { 1772 {
1765 m_log.InfoFormat("[SCENE]: Saving prims in xml2 format for region {0} to {1}", RegionInfo.RegionName, fileName); 1773 m_log.InfoFormat("[SCENE]: Saving prims in xml2 format for region {0} to {1}", RegionInfo.RegionName, fileName);
@@ -1767,6 +1775,13 @@ namespace OpenSim.Region.Environment.Scenes
1767 m_serialiser.SavePrimsToXml2(this, fileName); 1775 m_serialiser.SavePrimsToXml2(this, fileName);
1768 } 1776 }
1769 1777
1778 public void SavePrimsToXml2(TextWriter stream, LLVector3 min, LLVector3 max)
1779 {
1780 m_log.InfoFormat("[SCENE]: Saving prims in xml2 format for region {0} to stream", RegionInfo.RegionName);
1781
1782 m_serialiser.SavePrimsToXml2(this, stream, min, max);
1783 }
1784
1770 public void SaveNamedPrimsToXml2(string primName, string fileName) 1785 public void SaveNamedPrimsToXml2(string primName, string fileName)
1771 { 1786 {
1772 m_log.InfoFormat( 1787 m_log.InfoFormat(