diff options
author | Justin Clarke Casey | 2008-12-19 19:47:11 +0000 |
---|---|---|
committer | Justin Clarke Casey | 2008-12-19 19:47:11 +0000 |
commit | aa497a18678c6cc9a7425986c5bf5ca91415bd1d (patch) | |
tree | 71539fcfec1b22b057b5553776fe24a940fa6b6b /OpenSim/Region/Environment/Scenes | |
parent | minor: Remove some serialization module scene wrappers (diff) | |
download | opensim-SC-aa497a18678c6cc9a7425986c5bf5ca91415bd1d.zip opensim-SC-aa497a18678c6cc9a7425986c5bf5ca91415bd1d.tar.gz opensim-SC-aa497a18678c6cc9a7425986c5bf5ca91415bd1d.tar.bz2 opensim-SC-aa497a18678c6cc9a7425986c5bf5ca91415bd1d.tar.xz |
* refactor: move saved named prims to xml2 method out into the serialization module
Diffstat (limited to 'OpenSim/Region/Environment/Scenes')
-rw-r--r-- | OpenSim/Region/Environment/Scenes/Scene.cs | 22 | ||||
-rw-r--r-- | OpenSim/Region/Environment/Scenes/SceneManager.cs | 4 |
2 files changed, 3 insertions, 23 deletions
diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs index eaf04ea..70cd45e 100644 --- a/OpenSim/Region/Environment/Scenes/Scene.cs +++ b/OpenSim/Region/Environment/Scenes/Scene.cs | |||
@@ -1880,28 +1880,6 @@ namespace OpenSim.Region.Environment.Scenes | |||
1880 | return false; | 1880 | return false; |
1881 | } | 1881 | } |
1882 | 1882 | ||
1883 | public void SaveNamedPrimsToXml2(string primName, string fileName) | ||
1884 | { | ||
1885 | m_log.InfoFormat( | ||
1886 | "[SCENE]: Saving prims with name {0} in xml2 format for region {1} to {2}", primName, RegionInfo.RegionName, fileName); | ||
1887 | |||
1888 | List<EntityBase> entityList = GetEntities(); | ||
1889 | List<EntityBase> primList = new List<EntityBase>(); | ||
1890 | |||
1891 | foreach (EntityBase ent in entityList) | ||
1892 | { | ||
1893 | if (ent is SceneObjectGroup) | ||
1894 | { | ||
1895 | if (ent.Name == primName) | ||
1896 | { | ||
1897 | primList.Add(ent); | ||
1898 | } | ||
1899 | } | ||
1900 | } | ||
1901 | |||
1902 | m_serialiser.SavePrimListToXml2(primList, fileName); | ||
1903 | } | ||
1904 | |||
1905 | /// <summary> | 1883 | /// <summary> |
1906 | /// Move the given scene object into a new region depending on which region its absolute position has moved | 1884 | /// Move the given scene object into a new region depending on which region its absolute position has moved |
1907 | /// into. | 1885 | /// into. |
diff --git a/OpenSim/Region/Environment/Scenes/SceneManager.cs b/OpenSim/Region/Environment/Scenes/SceneManager.cs index 9e83f25..d585b48 100644 --- a/OpenSim/Region/Environment/Scenes/SceneManager.cs +++ b/OpenSim/Region/Environment/Scenes/SceneManager.cs | |||
@@ -215,7 +215,9 @@ namespace OpenSim.Region.Environment.Scenes | |||
215 | 215 | ||
216 | public void SaveNamedPrimsToXml2(string primName, string filename) | 216 | public void SaveNamedPrimsToXml2(string primName, string filename) |
217 | { | 217 | { |
218 | CurrentOrFirstScene.SaveNamedPrimsToXml2( primName, filename); | 218 | IRegionSerialiserModule serialiser = CurrentOrFirstScene.RequestModuleInterface<IRegionSerialiserModule>(); |
219 | if (serialiser != null) | ||
220 | serialiser.SaveNamedPrimsToXml2(CurrentOrFirstScene, primName, filename); | ||
219 | } | 221 | } |
220 | 222 | ||
221 | /// <summary> | 223 | /// <summary> |