diff options
author | MW | 2007-12-03 14:57:39 +0000 |
---|---|---|
committer | MW | 2007-12-03 14:57:39 +0000 |
commit | 690e517240495fdd80e12f605ab7f3a05a4be006 (patch) | |
tree | 47e93ec425d8d09d8d0f0ebfb8a1ed033cc3062e /OpenSim/Region/Environment/Scenes | |
parent | Fixed bug in Appearance update in AvatarFactoryModule. (diff) | |
download | opensim-SC-690e517240495fdd80e12f605ab7f3a05a4be006.zip opensim-SC-690e517240495fdd80e12f605ab7f3a05a4be006.tar.gz opensim-SC-690e517240495fdd80e12f605ab7f3a05a4be006.tar.bz2 opensim-SC-690e517240495fdd80e12f605ab7f3a05a4be006.tar.xz |
Added a flag to load-xml console command, that will generate new uuids for the loaded Sceneobjects (as per mantis request #53).
To use append "-newUID" to the end of the command, so new format is : "load-xml <filename> -newUID".
If you don't add the "-newUID", then the uuids in the xml file will be kept.
Diffstat (limited to 'OpenSim/Region/Environment/Scenes')
-rw-r--r-- | OpenSim/Region/Environment/Scenes/Scene.cs | 4 | ||||
-rw-r--r-- | OpenSim/Region/Environment/Scenes/SceneManager.cs | 4 | ||||
-rw-r--r-- | OpenSim/Region/Environment/Scenes/SceneXmlLoader.cs | 6 |
3 files changed, 9 insertions, 5 deletions
diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs index 38cfc8c..09ecae0 100644 --- a/OpenSim/Region/Environment/Scenes/Scene.cs +++ b/OpenSim/Region/Environment/Scenes/Scene.cs | |||
@@ -896,9 +896,9 @@ namespace OpenSim.Region.Environment.Scenes | |||
896 | prim.OnPrimCountTainted += m_LandManager.setPrimsTainted; | 896 | prim.OnPrimCountTainted += m_LandManager.setPrimsTainted; |
897 | } | 897 | } |
898 | 898 | ||
899 | public void LoadPrimsFromXml(string fileName) | 899 | public void LoadPrimsFromXml(string fileName, bool newIdsFlag) |
900 | { | 900 | { |
901 | m_sceneXmlLoader.LoadPrimsFromXml(fileName); | 901 | m_sceneXmlLoader.LoadPrimsFromXml(fileName, newIdsFlag); |
902 | } | 902 | } |
903 | 903 | ||
904 | public void SavePrimsToXml(string fileName) | 904 | public void SavePrimsToXml(string fileName) |
diff --git a/OpenSim/Region/Environment/Scenes/SceneManager.cs b/OpenSim/Region/Environment/Scenes/SceneManager.cs index 52b06f0..347091f 100644 --- a/OpenSim/Region/Environment/Scenes/SceneManager.cs +++ b/OpenSim/Region/Environment/Scenes/SceneManager.cs | |||
@@ -160,9 +160,9 @@ namespace OpenSim.Region.Environment.Scenes | |||
160 | CurrentOrFirstScene.SavePrimsToXml(filename); | 160 | CurrentOrFirstScene.SavePrimsToXml(filename); |
161 | } | 161 | } |
162 | 162 | ||
163 | public void LoadCurrentSceneFromXml(string filename) | 163 | public void LoadCurrentSceneFromXml(string filename, bool generateNewIDs) |
164 | { | 164 | { |
165 | CurrentOrFirstScene.LoadPrimsFromXml(filename); | 165 | CurrentOrFirstScene.LoadPrimsFromXml(filename, generateNewIDs); |
166 | } | 166 | } |
167 | 167 | ||
168 | public void SaveCurrentSceneToXml2(string filename) | 168 | public void SaveCurrentSceneToXml2(string filename) |
diff --git a/OpenSim/Region/Environment/Scenes/SceneXmlLoader.cs b/OpenSim/Region/Environment/Scenes/SceneXmlLoader.cs index 40f8b96..ab8f835 100644 --- a/OpenSim/Region/Environment/Scenes/SceneXmlLoader.cs +++ b/OpenSim/Region/Environment/Scenes/SceneXmlLoader.cs | |||
@@ -23,7 +23,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
23 | m_regInfo = regionInfo; | 23 | m_regInfo = regionInfo; |
24 | } | 24 | } |
25 | 25 | ||
26 | public void LoadPrimsFromXml(string fileName) | 26 | public void LoadPrimsFromXml(string fileName, bool newIDS) |
27 | { | 27 | { |
28 | XmlDocument doc = new XmlDocument(); | 28 | XmlDocument doc = new XmlDocument(); |
29 | XmlNode rootNode; | 29 | XmlNode rootNode; |
@@ -39,6 +39,10 @@ namespace OpenSim.Region.Environment.Scenes | |||
39 | { | 39 | { |
40 | SceneObjectGroup obj = new SceneObjectGroup(m_parentScene, | 40 | SceneObjectGroup obj = new SceneObjectGroup(m_parentScene, |
41 | m_regInfo.RegionHandle, aPrimNode.OuterXml); | 41 | m_regInfo.RegionHandle, aPrimNode.OuterXml); |
42 | if (newIDS) | ||
43 | { | ||
44 | obj.GenerateNewIDs(); | ||
45 | } | ||
42 | //if we want this to be a import method then we need new uuids for the object to avoid any clashes | 46 | //if we want this to be a import method then we need new uuids for the object to avoid any clashes |
43 | //obj.RegenerateFullIDs(); | 47 | //obj.RegenerateFullIDs(); |
44 | m_innerScene.AddEntity(obj); | 48 | m_innerScene.AddEntity(obj); |