aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Scenes/Scene.cs
diff options
context:
space:
mode:
authorMW2008-07-01 19:23:45 +0000
committerMW2008-07-01 19:23:45 +0000
commitc9fe500212cf8b8231ef0604a1f577e9bbedfcbe (patch)
tree4515ef7ae75a913ff2172c5ad2d3be747ffc893d /OpenSim/Region/Environment/Scenes/Scene.cs
parentMantis#1640. Thank you, Chernega for a patch that addresses: (diff)
downloadopensim-SC-c9fe500212cf8b8231ef0604a1f577e9bbedfcbe.zip
opensim-SC-c9fe500212cf8b8231ef0604a1f577e9bbedfcbe.tar.gz
opensim-SC-c9fe500212cf8b8231ef0604a1f577e9bbedfcbe.tar.bz2
opensim-SC-c9fe500212cf8b8231ef0604a1f577e9bbedfcbe.tar.xz
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
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/Environment/Scenes/Scene.cs21
1 files changed, 21 insertions, 0 deletions
diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs
index 261f73d..375756d 100644
--- a/OpenSim/Region/Environment/Scenes/Scene.cs
+++ b/OpenSim/Region/Environment/Scenes/Scene.cs
@@ -1738,6 +1738,27 @@ namespace OpenSim.Region.Environment.Scenes
1738 m_serialiser.SavePrimsToXml2(this, fileName); 1738 m_serialiser.SavePrimsToXml2(this, fileName);
1739 } 1739 }
1740 1740
1741
1742 public void SaveNamedPrimsToXml2(string primName, string fileName)
1743 {
1744 List<EntityBase> entityList = GetEntities();
1745 List<EntityBase> primList = new List<EntityBase>();
1746
1747 foreach (EntityBase ent in entityList)
1748 {
1749 if (ent is SceneObjectGroup)
1750 {
1751 if (ent.Name == primName)
1752 {
1753 primList.Add(ent);
1754 }
1755 }
1756 }
1757
1758 m_serialiser.SavePrimListToXml2(primList, fileName);
1759 }
1760
1761
1741 /// <summary> 1762 /// <summary>
1742 /// Load a prim archive into the scene. This loads both prims and their assets. 1763 /// Load a prim archive into the scene. This loads both prims and their assets.
1743 /// </summary> 1764 /// </summary>