From 401e9bc3b9083e106a9eb1b6bc6f2902e23cf9c0 Mon Sep 17 00:00:00 2001 From: Justin Clarke Casey Date: Thu, 22 May 2008 17:09:33 +0000 Subject: * 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. --- OpenSim/Region/Application/OpenSimMain.cs | 8 ++++++++ OpenSim/Region/Application/OpenSimMainConsole.cs | 11 +++++++++++ 2 files changed, 19 insertions(+) (limited to 'OpenSim/Region/Application') 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 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 ea1243e..193bad4 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); -- cgit v1.1