diff --git a/OpenSim/Region/Application/OpenSimMain.cs b/OpenSim/Region/Application/OpenSimMain.cs
index 61b4de0be9..ea7b0e7bd5 100644
--- a/OpenSim/Region/Application/OpenSimMain.cs
+++ b/OpenSim/Region/Application/OpenSimMain.cs
@@ -62,7 +62,15 @@ namespace OpenSim
protected string proxyUrl;
protected int proxyOffset = 0;
+ ///
+ /// The file used to load and save prim backup xml if none has been specified
+ ///
protected const string DEFAULT_PRIM_BACKUP_FILENAME = "prim-backup.xml";
+
+ ///
+ /// The file use to load and save an opensim archive if none has been specified
+ ///
+ protected const string DEFAULT_OAR_BACKUP_FILENAME = "scene.oar.zip";
public string m_physicsEngine;
public string m_meshEngineName;
diff --git a/OpenSim/Region/Application/OpenSimMainConsole.cs b/OpenSim/Region/Application/OpenSimMainConsole.cs
index ea1243e031..193bad4abd 100644
--- a/OpenSim/Region/Application/OpenSimMainConsole.cs
+++ b/OpenSim/Region/Application/OpenSimMainConsole.cs
@@ -359,6 +359,17 @@ namespace OpenSim
m_sceneManager.LoadCurrentSceneFromXml2(DEFAULT_PRIM_BACKUP_FILENAME);
}
break;
+
+ case "save-oar":
+ if (cmdparams.Length > 0)
+ {
+ m_sceneManager.SaveCurrentSceneToOar(cmdparams[0]);
+ }
+ else
+ {
+ m_sceneManager.SaveCurrentSceneToOar(DEFAULT_OAR_BACKUP_FILENAME);
+ }
+ break;
case "plugin":
m_sceneManager.SendCommandToPluginModules(cmdparams);
diff --git a/OpenSim/Region/Environment/Scenes/SceneManager.cs b/OpenSim/Region/Environment/Scenes/SceneManager.cs
index 15686320f9..68dfa2fd38 100644
--- a/OpenSim/Region/Environment/Scenes/SceneManager.cs
+++ b/OpenSim/Region/Environment/Scenes/SceneManager.cs
@@ -157,25 +157,62 @@ namespace OpenSim.Region.Environment.Scenes
}
}
+ ///
+ /// Save the prims in the current scene to an xml file in OpenSimulator's original 'xml' format
+ ///
+ ///
public void SaveCurrentSceneToXml(string filename)
{
CurrentOrFirstScene.SavePrimsToXml(filename);
}
+ ///
+ /// Load an xml file of prims in OpenSimulator's original 'xml' file format to the current scene
+ ///
+ ///
+ ///
+ ///
public void LoadCurrentSceneFromXml(string filename, bool generateNewIDs, LLVector3 loadOffset)
{
CurrentOrFirstScene.LoadPrimsFromXml(filename, generateNewIDs, loadOffset);
}
-
+
+ ///
+ /// Save the prims in the current scene to an xml file in OpenSimulator's current 'xml2' format
+ ///
+ ///
public void SaveCurrentSceneToXml2(string filename)
{
CurrentOrFirstScene.SavePrimsToXml2(filename);
}
+ ///
+ /// Load an xml file of prims in OpenSimulator's current 'xml2' file format to the current scene
+ ///
public void LoadCurrentSceneFromXml2(string filename)
{
CurrentOrFirstScene.LoadPrimsFromXml2(filename);
}
+
+ ///
+ /// Save the current scene to an OpenSimulator archive. This archive will eventually include the prim's assets
+ /// as well as the details of the prims themselves.
+ ///
+ ///
+ public void SaveCurrentSceneToOar(string filename)
+ {
+ // TODO Nothing yet
+ }
+
+ ///
+ /// Load an OpenSim archive into the current scene. This will load both the shapes of the prims and upload
+ /// their assets to the asset service.
+ ///
+ ///
+ public void LoadCurrentSceneFromOar(string filename)
+ {
+ // TODO Nothing yet
+ }
[Obsolete("TODO: Remove this warning by 0.7")]
public bool RunTerrainCmdOnCurrentScene(string[] cmdparams, ref string result)