diff options
author | Jeff Ames | 2008-06-04 09:59:27 +0000 |
---|---|---|
committer | Jeff Ames | 2008-06-04 09:59:27 +0000 |
commit | 4ec4e16c809cf86a63b736d2b7b6ad7291595a5f (patch) | |
tree | cfa896ef9057228171e2ee39c4807060101ba90b /OpenSim/Region/Environment/Modules/World/Serialiser | |
parent | * If a ThreadAbortException reaches AuthUser() then let it pass through unmol... (diff) | |
download | opensim-SC_OLD-4ec4e16c809cf86a63b736d2b7b6ad7291595a5f.zip opensim-SC_OLD-4ec4e16c809cf86a63b736d2b7b6ad7291595a5f.tar.gz opensim-SC_OLD-4ec4e16c809cf86a63b736d2b7b6ad7291595a5f.tar.bz2 opensim-SC_OLD-4ec4e16c809cf86a63b736d2b7b6ad7291595a5f.tar.xz |
Formatting cleanup, minor refactoring, svn properties.
Diffstat (limited to '')
3 files changed, 26 insertions, 26 deletions
diff --git a/OpenSim/Region/Environment/Modules/World/Serialiser/IRegionSerialiser.cs b/OpenSim/Region/Environment/Modules/World/Serialiser/IRegionSerialiser.cs index b7ed9f9..e0d2add 100644 --- a/OpenSim/Region/Environment/Modules/World/Serialiser/IRegionSerialiser.cs +++ b/OpenSim/Region/Environment/Modules/World/Serialiser/IRegionSerialiser.cs | |||
@@ -34,30 +34,30 @@ namespace OpenSim.Region.Environment.Modules.World.Serialiser | |||
34 | { | 34 | { |
35 | public interface IRegionSerialiser | 35 | public interface IRegionSerialiser |
36 | { | 36 | { |
37 | List<string> SerialiseRegion(Scene scene, string saveDir); | 37 | List<string> SerialiseRegion(Scene scene, string saveDir); |
38 | 38 | ||
39 | void LoadPrimsFromXml(Scene scene, string fileName, bool newIDS, LLVector3 loadOffset); | 39 | void LoadPrimsFromXml(Scene scene, string fileName, bool newIDS, LLVector3 loadOffset); |
40 | 40 | ||
41 | void SavePrimsToXml(Scene scene, string fileName); | 41 | void SavePrimsToXml(Scene scene, string fileName); |
42 | 42 | ||
43 | /// <summary> | 43 | /// <summary> |
44 | /// Load prims from the xml2 format | 44 | /// Load prims from the xml2 format |
45 | /// </summary> | 45 | /// </summary> |
46 | /// <param name="scene"></param> | 46 | /// <param name="scene"></param> |
47 | /// <param name="fileName"></param> | 47 | /// <param name="fileName"></param> |
48 | void LoadPrimsFromXml2(Scene scene, string fileName); | 48 | void LoadPrimsFromXml2(Scene scene, string fileName); |
49 | 49 | ||
50 | /// <summary> | 50 | /// <summary> |
51 | /// Load prims from the xml2 format | 51 | /// Load prims from the xml2 format |
52 | /// </summary> | 52 | /// </summary> |
53 | /// <param name="scene"></param> | 53 | /// <param name="scene"></param> |
54 | /// <param name="reader"></param> | 54 | /// <param name="reader"></param> |
55 | void LoadPrimsFromXml2(Scene scene, TextReader reader); | 55 | void LoadPrimsFromXml2(Scene scene, TextReader reader); |
56 | 56 | ||
57 | void SavePrimsToXml2(Scene scene, string fileName); | 57 | void SavePrimsToXml2(Scene scene, string fileName); |
58 | 58 | ||
59 | void LoadGroupFromXml2String(Scene scene, string xmlString); | 59 | void LoadGroupFromXml2String(Scene scene, string xmlString); |
60 | 60 | ||
61 | string SavePrimGroupToXML2String(SceneObjectGroup grp); | 61 | string SavePrimGroupToXML2String(SceneObjectGroup grp); |
62 | } | 62 | } |
63 | } | 63 | } |
diff --git a/OpenSim/Region/Environment/Modules/World/Serialiser/SceneXmlLoader.cs b/OpenSim/Region/Environment/Modules/World/Serialiser/SceneXmlLoader.cs index 2ac0754..5ec8026 100644 --- a/OpenSim/Region/Environment/Modules/World/Serialiser/SceneXmlLoader.cs +++ b/OpenSim/Region/Environment/Modules/World/Serialiser/SceneXmlLoader.cs | |||
@@ -56,14 +56,14 @@ namespace OpenSim.Region.Environment.Scenes | |||
56 | foreach (XmlNode aPrimNode in rootNode.ChildNodes) | 56 | foreach (XmlNode aPrimNode in rootNode.ChildNodes) |
57 | { | 57 | { |
58 | SceneObjectGroup obj = new SceneObjectGroup(scene, scene.RegionInfo.RegionHandle, aPrimNode.OuterXml); | 58 | SceneObjectGroup obj = new SceneObjectGroup(scene, scene.RegionInfo.RegionHandle, aPrimNode.OuterXml); |
59 | 59 | ||
60 | if (newIDS) | 60 | if (newIDS) |
61 | { | 61 | { |
62 | obj.ResetIDs(); | 62 | obj.ResetIDs(); |
63 | } | 63 | } |
64 | //if we want this to be a import method then we need new uuids for the object to avoid any clashes | 64 | //if we want this to be a import method then we need new uuids for the object to avoid any clashes |
65 | //obj.RegenerateFullIDs(); | 65 | //obj.RegenerateFullIDs(); |
66 | 66 | ||
67 | scene.AddSceneObject(obj); | 67 | scene.AddSceneObject(obj); |
68 | 68 | ||
69 | SceneObjectPart rootPart = obj.GetChildPart(obj.UUID); | 69 | SceneObjectPart rootPart = obj.GetChildPart(obj.UUID); |
@@ -156,7 +156,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
156 | { | 156 | { |
157 | LoadPrimsFromXml2(scene, new XmlTextReader(fileName)); | 157 | LoadPrimsFromXml2(scene, new XmlTextReader(fileName)); |
158 | } | 158 | } |
159 | 159 | ||
160 | /// <summary> | 160 | /// <summary> |
161 | /// Load prims from the xml2 format | 161 | /// Load prims from the xml2 format |
162 | /// </summary> | 162 | /// </summary> |
@@ -173,24 +173,24 @@ namespace OpenSim.Region.Environment.Scenes | |||
173 | /// <param name="scene"></param> | 173 | /// <param name="scene"></param> |
174 | /// <param name="reader"></param> | 174 | /// <param name="reader"></param> |
175 | protected static void LoadPrimsFromXml2(Scene scene, XmlTextReader reader) | 175 | protected static void LoadPrimsFromXml2(Scene scene, XmlTextReader reader) |
176 | { | 176 | { |
177 | XmlDocument doc = new XmlDocument(); | 177 | XmlDocument doc = new XmlDocument(); |
178 | reader.WhitespaceHandling = WhitespaceHandling.None; | 178 | reader.WhitespaceHandling = WhitespaceHandling.None; |
179 | doc.Load(reader); | 179 | doc.Load(reader); |
180 | reader.Close(); | 180 | reader.Close(); |
181 | XmlNode rootNode = doc.FirstChild; | 181 | XmlNode rootNode = doc.FirstChild; |
182 | 182 | ||
183 | foreach (XmlNode aPrimNode in rootNode.ChildNodes) | 183 | foreach (XmlNode aPrimNode in rootNode.ChildNodes) |
184 | { | 184 | { |
185 | CreatePrimFromXml(scene, aPrimNode.OuterXml); | 185 | CreatePrimFromXml(scene, aPrimNode.OuterXml); |
186 | } | 186 | } |
187 | } | 187 | } |
188 | 188 | ||
189 | public static void CreatePrimFromXml(Scene scene, string xmlData) | 189 | public static void CreatePrimFromXml(Scene scene, string xmlData) |
190 | { | 190 | { |
191 | SceneObjectGroup obj = new SceneObjectGroup(xmlData); | 191 | SceneObjectGroup obj = new SceneObjectGroup(xmlData); |
192 | LLVector3 receivedVelocity = obj.RootPart.Velocity; | 192 | LLVector3 receivedVelocity = obj.RootPart.Velocity; |
193 | //System.Console.WriteLine(obj.RootPart.Velocity.ToString()); | 193 | //System.Console.WriteLine(obj.RootPart.Velocity.ToString()); |
194 | scene.AddSceneObjectFromStorage(obj); | 194 | scene.AddSceneObjectFromStorage(obj); |
195 | 195 | ||
196 | SceneObjectPart rootPart = obj.GetChildPart(obj.UUID); | 196 | SceneObjectPart rootPart = obj.GetChildPart(obj.UUID); |
diff --git a/OpenSim/Region/Environment/Modules/World/Serialiser/SerialiserModule.cs b/OpenSim/Region/Environment/Modules/World/Serialiser/SerialiserModule.cs index b181fe8..c7c8e39 100644 --- a/OpenSim/Region/Environment/Modules/World/Serialiser/SerialiserModule.cs +++ b/OpenSim/Region/Environment/Modules/World/Serialiser/SerialiserModule.cs | |||
@@ -86,42 +86,42 @@ namespace OpenSim.Region.Environment.Modules.World.Serialiser | |||
86 | #endregion | 86 | #endregion |
87 | 87 | ||
88 | #region IRegionSerialiser Members | 88 | #region IRegionSerialiser Members |
89 | 89 | ||
90 | public void LoadPrimsFromXml(Scene scene, string fileName, bool newIDS, LLVector3 loadOffset) | 90 | public void LoadPrimsFromXml(Scene scene, string fileName, bool newIDS, LLVector3 loadOffset) |
91 | { | 91 | { |
92 | SceneXmlLoader.LoadPrimsFromXml(scene, fileName, newIDS, loadOffset); | 92 | SceneXmlLoader.LoadPrimsFromXml(scene, fileName, newIDS, loadOffset); |
93 | } | 93 | } |
94 | 94 | ||
95 | public void SavePrimsToXml(Scene scene, string fileName) | 95 | public void SavePrimsToXml(Scene scene, string fileName) |
96 | { | 96 | { |
97 | SceneXmlLoader.SavePrimsToXml(scene, fileName); | 97 | SceneXmlLoader.SavePrimsToXml(scene, fileName); |
98 | } | 98 | } |
99 | 99 | ||
100 | public void LoadPrimsFromXml2(Scene scene, string fileName) | 100 | public void LoadPrimsFromXml2(Scene scene, string fileName) |
101 | { | 101 | { |
102 | SceneXmlLoader.LoadPrimsFromXml2(scene, fileName); | 102 | SceneXmlLoader.LoadPrimsFromXml2(scene, fileName); |
103 | } | 103 | } |
104 | 104 | ||
105 | public void LoadPrimsFromXml2(Scene scene, TextReader reader) | 105 | public void LoadPrimsFromXml2(Scene scene, TextReader reader) |
106 | { | 106 | { |
107 | SceneXmlLoader.LoadPrimsFromXml2(scene, reader); | 107 | SceneXmlLoader.LoadPrimsFromXml2(scene, reader); |
108 | } | 108 | } |
109 | 109 | ||
110 | public void SavePrimsToXml2(Scene scene, string fileName) | 110 | public void SavePrimsToXml2(Scene scene, string fileName) |
111 | { | 111 | { |
112 | SceneXmlLoader.SavePrimsToXml2(scene, fileName); | 112 | SceneXmlLoader.SavePrimsToXml2(scene, fileName); |
113 | } | 113 | } |
114 | 114 | ||
115 | public void LoadGroupFromXml2String(Scene scene, string xmlString) | 115 | public void LoadGroupFromXml2String(Scene scene, string xmlString) |
116 | { | 116 | { |
117 | SceneXmlLoader.LoadGroupFromXml2String(scene, xmlString); | 117 | SceneXmlLoader.LoadGroupFromXml2String(scene, xmlString); |
118 | } | 118 | } |
119 | 119 | ||
120 | public string SavePrimGroupToXML2String(SceneObjectGroup grp) | 120 | public string SavePrimGroupToXML2String(SceneObjectGroup grp) |
121 | { | 121 | { |
122 | return SceneXmlLoader.SavePrimGroupToXML2String(grp); | 122 | return SceneXmlLoader.SavePrimGroupToXML2String(grp); |
123 | } | 123 | } |
124 | 124 | ||
125 | public List<string> SerialiseRegion(Scene scene, string saveDir) | 125 | public List<string> SerialiseRegion(Scene scene, string saveDir) |
126 | { | 126 | { |
127 | List<string> results = new List<string>(); | 127 | List<string> results = new List<string>(); |