diff options
author | Justin Clarke Casey | 2008-05-22 17:09:33 +0000 |
---|---|---|
committer | Justin Clarke Casey | 2008-05-22 17:09:33 +0000 |
commit | 401e9bc3b9083e106a9eb1b6bc6f2902e23cf9c0 (patch) | |
tree | 59269eae65bee46ef2494b75882fc5b5b4f79e43 | |
parent | changing more 'raw' HTTP status codes to OSHttpStatusCodes. (diff) | |
download | opensim-SC-401e9bc3b9083e106a9eb1b6bc6f2902e23cf9c0.zip opensim-SC-401e9bc3b9083e106a9eb1b6bc6f2902e23cf9c0.tar.gz opensim-SC-401e9bc3b9083e106a9eb1b6bc6f2902e23cf9c0.tar.bz2 opensim-SC-401e9bc3b9083e106a9eb1b6bc6f2902e23cf9c0.tar.xz |
* Documentation for load/save xml methods
* Insert the very rough beginning stubs for a save/load OpenSim archive facility that will load/save prim assets (textures & inventory) as well as the prim details themselves
(our existing xml facilities).
* This won't be ready for even rough testing for quite some time.
* I'm doing this directly in the region server for now since this will be quicker to get something working (hence giving me the Serotonin boost that I need). However, there are
very good arguments for later also including it (or moving it entirely) to the separate export executable which Sean stubbed out some time ago.
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/Application/OpenSimMain.cs | 8 | ||||
-rw-r--r-- | OpenSim/Region/Application/OpenSimMainConsole.cs | 11 | ||||
-rw-r--r-- | OpenSim/Region/Environment/Scenes/SceneManager.cs | 39 |
3 files changed, 57 insertions, 1 deletions
diff --git a/OpenSim/Region/Application/OpenSimMain.cs b/OpenSim/Region/Application/OpenSimMain.cs index 61b4de0..ea7b0e7 100644 --- a/OpenSim/Region/Application/OpenSimMain.cs +++ b/OpenSim/Region/Application/OpenSimMain.cs | |||
@@ -62,7 +62,15 @@ namespace OpenSim | |||
62 | protected string proxyUrl; | 62 | protected string proxyUrl; |
63 | protected int proxyOffset = 0; | 63 | protected int proxyOffset = 0; |
64 | 64 | ||
65 | /// <summary> | ||
66 | /// The file used to load and save prim backup xml if none has been specified | ||
67 | /// </summary> | ||
65 | protected const string DEFAULT_PRIM_BACKUP_FILENAME = "prim-backup.xml"; | 68 | protected const string DEFAULT_PRIM_BACKUP_FILENAME = "prim-backup.xml"; |
69 | |||
70 | /// <summary> | ||
71 | /// The file use to load and save an opensim archive if none has been specified | ||
72 | /// </summary> | ||
73 | protected const string DEFAULT_OAR_BACKUP_FILENAME = "scene.oar.zip"; | ||
66 | 74 | ||
67 | public string m_physicsEngine; | 75 | public string m_physicsEngine; |
68 | public string m_meshEngineName; | 76 | public string m_meshEngineName; |
diff --git a/OpenSim/Region/Application/OpenSimMainConsole.cs b/OpenSim/Region/Application/OpenSimMainConsole.cs index ea1243e..193bad4 100644 --- a/OpenSim/Region/Application/OpenSimMainConsole.cs +++ b/OpenSim/Region/Application/OpenSimMainConsole.cs | |||
@@ -359,6 +359,17 @@ namespace OpenSim | |||
359 | m_sceneManager.LoadCurrentSceneFromXml2(DEFAULT_PRIM_BACKUP_FILENAME); | 359 | m_sceneManager.LoadCurrentSceneFromXml2(DEFAULT_PRIM_BACKUP_FILENAME); |
360 | } | 360 | } |
361 | break; | 361 | break; |
362 | |||
363 | case "save-oar": | ||
364 | if (cmdparams.Length > 0) | ||
365 | { | ||
366 | m_sceneManager.SaveCurrentSceneToOar(cmdparams[0]); | ||
367 | } | ||
368 | else | ||
369 | { | ||
370 | m_sceneManager.SaveCurrentSceneToOar(DEFAULT_OAR_BACKUP_FILENAME); | ||
371 | } | ||
372 | break; | ||
362 | 373 | ||
363 | case "plugin": | 374 | case "plugin": |
364 | m_sceneManager.SendCommandToPluginModules(cmdparams); | 375 | m_sceneManager.SendCommandToPluginModules(cmdparams); |
diff --git a/OpenSim/Region/Environment/Scenes/SceneManager.cs b/OpenSim/Region/Environment/Scenes/SceneManager.cs index 1568632..68dfa2f 100644 --- a/OpenSim/Region/Environment/Scenes/SceneManager.cs +++ b/OpenSim/Region/Environment/Scenes/SceneManager.cs | |||
@@ -157,25 +157,62 @@ namespace OpenSim.Region.Environment.Scenes | |||
157 | } | 157 | } |
158 | } | 158 | } |
159 | 159 | ||
160 | /// <summary> | ||
161 | /// Save the prims in the current scene to an xml file in OpenSimulator's original 'xml' format | ||
162 | /// </summary> | ||
163 | /// <param name="filename"></param> | ||
160 | public void SaveCurrentSceneToXml(string filename) | 164 | public void SaveCurrentSceneToXml(string filename) |
161 | { | 165 | { |
162 | CurrentOrFirstScene.SavePrimsToXml(filename); | 166 | CurrentOrFirstScene.SavePrimsToXml(filename); |
163 | } | 167 | } |
164 | 168 | ||
169 | /// <summary> | ||
170 | /// Load an xml file of prims in OpenSimulator's original 'xml' file format to the current scene | ||
171 | /// </summary> | ||
172 | /// <param name="filename"></param> | ||
173 | /// <param name="generateNewIDs"></param> | ||
174 | /// <param name="loadOffset"></param> | ||
165 | public void LoadCurrentSceneFromXml(string filename, bool generateNewIDs, LLVector3 loadOffset) | 175 | public void LoadCurrentSceneFromXml(string filename, bool generateNewIDs, LLVector3 loadOffset) |
166 | { | 176 | { |
167 | CurrentOrFirstScene.LoadPrimsFromXml(filename, generateNewIDs, loadOffset); | 177 | CurrentOrFirstScene.LoadPrimsFromXml(filename, generateNewIDs, loadOffset); |
168 | } | 178 | } |
169 | 179 | ||
180 | /// <summary> | ||
181 | /// Save the prims in the current scene to an xml file in OpenSimulator's current 'xml2' format | ||
182 | /// </summary> | ||
183 | /// <param name="filename"></param> | ||
170 | public void SaveCurrentSceneToXml2(string filename) | 184 | public void SaveCurrentSceneToXml2(string filename) |
171 | { | 185 | { |
172 | CurrentOrFirstScene.SavePrimsToXml2(filename); | 186 | CurrentOrFirstScene.SavePrimsToXml2(filename); |
173 | } | 187 | } |
174 | 188 | ||
189 | /// <summary> | ||
190 | /// Load an xml file of prims in OpenSimulator's current 'xml2' file format to the current scene | ||
191 | /// </summary> | ||
175 | public void LoadCurrentSceneFromXml2(string filename) | 192 | public void LoadCurrentSceneFromXml2(string filename) |
176 | { | 193 | { |
177 | CurrentOrFirstScene.LoadPrimsFromXml2(filename); | 194 | CurrentOrFirstScene.LoadPrimsFromXml2(filename); |
178 | } | 195 | } |
196 | |||
197 | /// <summary> | ||
198 | /// Save the current scene to an OpenSimulator archive. This archive will eventually include the prim's assets | ||
199 | /// as well as the details of the prims themselves. | ||
200 | /// </summary> | ||
201 | /// <param name="filename"></param> | ||
202 | public void SaveCurrentSceneToOar(string filename) | ||
203 | { | ||
204 | // TODO Nothing yet | ||
205 | } | ||
206 | |||
207 | /// <summary> | ||
208 | /// Load an OpenSim archive into the current scene. This will load both the shapes of the prims and upload | ||
209 | /// their assets to the asset service. | ||
210 | /// </summary> | ||
211 | /// <param name="filename"></param> | ||
212 | public void LoadCurrentSceneFromOar(string filename) | ||
213 | { | ||
214 | // TODO Nothing yet | ||
215 | } | ||
179 | 216 | ||
180 | [Obsolete("TODO: Remove this warning by 0.7")] | 217 | [Obsolete("TODO: Remove this warning by 0.7")] |
181 | public bool RunTerrainCmdOnCurrentScene(string[] cmdparams, ref string result) | 218 | public bool RunTerrainCmdOnCurrentScene(string[] cmdparams, ref string result) |