diff options
Diffstat (limited to 'OpenSim/Region/Environment/Scenes')
-rw-r--r-- | OpenSim/Region/Environment/Scenes/Scene.cs | 21 | ||||
-rw-r--r-- | OpenSim/Region/Environment/Scenes/SceneManager.cs | 5 |
2 files changed, 26 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> |
diff --git a/OpenSim/Region/Environment/Scenes/SceneManager.cs b/OpenSim/Region/Environment/Scenes/SceneManager.cs index add8081..a3a9c75 100644 --- a/OpenSim/Region/Environment/Scenes/SceneManager.cs +++ b/OpenSim/Region/Environment/Scenes/SceneManager.cs | |||
@@ -204,6 +204,11 @@ namespace OpenSim.Region.Environment.Scenes | |||
204 | CurrentOrFirstScene.SavePrimsToXml2(filename); | 204 | CurrentOrFirstScene.SavePrimsToXml2(filename); |
205 | } | 205 | } |
206 | 206 | ||
207 | public void SaveNamedPrimsToXml2(string primName, string filename) | ||
208 | { | ||
209 | CurrentOrFirstScene.SaveNamedPrimsToXml2( primName, filename); | ||
210 | } | ||
211 | |||
207 | /// <summary> | 212 | /// <summary> |
208 | /// Load an xml file of prims in OpenSimulator's current 'xml2' file format to the current scene | 213 | /// Load an xml file of prims in OpenSimulator's current 'xml2' file format to the current scene |
209 | /// </summary> | 214 | /// </summary> |