Added "save-prims-xml2 <PrimName> <FileName>", as we were lacking a method to save a single primitive or small group of them. This command will save all prims in the current scene that name matches the "PrimName" parameter. The saved file is in standard xml2 format, so can be loaded using load-xml2

This commit is contained in:
MW
2008-07-01 19:23:45 +00:00
parent 0aaf0c4565
commit c9fe500212
6 changed files with 58 additions and 4 deletions

View File

@@ -1738,6 +1738,27 @@ namespace OpenSim.Region.Environment.Scenes
m_serialiser.SavePrimsToXml2(this, fileName);
}
public void SaveNamedPrimsToXml2(string primName, string fileName)
{
List<EntityBase> entityList = GetEntities();
List<EntityBase> primList = new List<EntityBase>();
foreach (EntityBase ent in entityList)
{
if (ent is SceneObjectGroup)
{
if (ent.Name == primName)
{
primList.Add(ent);
}
}
}
m_serialiser.SavePrimListToXml2(primList, fileName);
}
/// <summary>
/// Load a prim archive into the scene. This loads both prims and their assets.
/// </summary>