* 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.0.6.0-stable
parent
a97fa3f43e
commit
401e9bc3b9
|
@ -62,7 +62,15 @@ namespace OpenSim
|
|||
protected string proxyUrl;
|
||||
protected int proxyOffset = 0;
|
||||
|
||||
/// <summary>
|
||||
/// The file used to load and save prim backup xml if none has been specified
|
||||
/// </summary>
|
||||
protected const string DEFAULT_PRIM_BACKUP_FILENAME = "prim-backup.xml";
|
||||
|
||||
/// <summary>
|
||||
/// The file use to load and save an opensim archive if none has been specified
|
||||
/// </summary>
|
||||
protected const string DEFAULT_OAR_BACKUP_FILENAME = "scene.oar.zip";
|
||||
|
||||
public string m_physicsEngine;
|
||||
public string m_meshEngineName;
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -157,25 +157,62 @@ namespace OpenSim.Region.Environment.Scenes
|
|||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Save the prims in the current scene to an xml file in OpenSimulator's original 'xml' format
|
||||
/// </summary>
|
||||
/// <param name="filename"></param>
|
||||
public void SaveCurrentSceneToXml(string filename)
|
||||
{
|
||||
CurrentOrFirstScene.SavePrimsToXml(filename);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Load an xml file of prims in OpenSimulator's original 'xml' file format to the current scene
|
||||
/// </summary>
|
||||
/// <param name="filename"></param>
|
||||
/// <param name="generateNewIDs"></param>
|
||||
/// <param name="loadOffset"></param>
|
||||
public void LoadCurrentSceneFromXml(string filename, bool generateNewIDs, LLVector3 loadOffset)
|
||||
{
|
||||
CurrentOrFirstScene.LoadPrimsFromXml(filename, generateNewIDs, loadOffset);
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Save the prims in the current scene to an xml file in OpenSimulator's current 'xml2' format
|
||||
/// </summary>
|
||||
/// <param name="filename"></param>
|
||||
public void SaveCurrentSceneToXml2(string filename)
|
||||
{
|
||||
CurrentOrFirstScene.SavePrimsToXml2(filename);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Load an xml file of prims in OpenSimulator's current 'xml2' file format to the current scene
|
||||
/// </summary>
|
||||
public void LoadCurrentSceneFromXml2(string filename)
|
||||
{
|
||||
CurrentOrFirstScene.LoadPrimsFromXml2(filename);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 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.
|
||||
/// </summary>
|
||||
/// <param name="filename"></param>
|
||||
public void SaveCurrentSceneToOar(string filename)
|
||||
{
|
||||
// TODO Nothing yet
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 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.
|
||||
/// </summary>
|
||||
/// <param name="filename"></param>
|
||||
public void LoadCurrentSceneFromOar(string filename)
|
||||
{
|
||||
// TODO Nothing yet
|
||||
}
|
||||
|
||||
[Obsolete("TODO: Remove this warning by 0.7")]
|
||||
public bool RunTerrainCmdOnCurrentScene(string[] cmdparams, ref string result)
|
||||
|
|
Loading…
Reference in New Issue