aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
authorRobert Adams2014-02-02 12:21:18 -0800
committerRobert Adams2014-02-02 12:21:18 -0800
commit2a4dd34616bdb0641f841766dfd15c4c784d3549 (patch)
tree4c01fa16ca4b96218ff4ba5d7026f659a6056334 /OpenSim
parentImplement terrain merging in TerrainChannel. (diff)
downloadopensim-SC_OLD-2a4dd34616bdb0641f841766dfd15c4c784d3549.zip
opensim-SC_OLD-2a4dd34616bdb0641f841766dfd15c4c784d3549.tar.gz
opensim-SC_OLD-2a4dd34616bdb0641f841766dfd15c4c784d3549.tar.bz2
opensim-SC_OLD-2a4dd34616bdb0641f841766dfd15c4c784d3549.tar.xz
Change new 'load oar' parameters to be hyphenated to be consistant with
existing parameters. ('--forceterrain' becomes '--force-terrain'). The old forms have been kept for downward compatiblity.
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/Region/Application/OpenSim.cs16
-rw-r--r--OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs6
-rw-r--r--OpenSim/Region/CoreModules/World/Archiver/ArchiverModule.cs14
3 files changed, 18 insertions, 18 deletions
diff --git a/OpenSim/Region/Application/OpenSim.cs b/OpenSim/Region/Application/OpenSim.cs
index 1e36853..a609b77 100644
--- a/OpenSim/Region/Application/OpenSim.cs
+++ b/OpenSim/Region/Application/OpenSim.cs
@@ -267,18 +267,18 @@ namespace OpenSim
267 267
268 m_console.Commands.AddCommand("Archiving", false, "load oar", 268 m_console.Commands.AddCommand("Archiving", false, "load oar",
269 "load oar [--merge] [--skip-assets]" 269 "load oar [--merge] [--skip-assets]"
270 + " [--forceterrain] [--forceparcels]" 270 + " [--force-terrain] [--force-parcels]"
271 + " [--rotation degrees] [--rotationCenter \"<x,y,z>\"]" 271 + " [--rotation degrees] [--rotation-center \"<x,y,z>\"]"
272 + " [--displacement \"<x,y,z>\"]" 272 + " [--displacement \"<x,y,z>\"]"
273 + " [<OAR path>]", 273 + " [<OAR path>]",
274 "Load a region's data from an OAR archive.", 274 "Load a region's data from an OAR archive.",
275 "--merge will merge the OAR with the existing scene (suppresses terrain and parcel info loading)." + Environment.NewLine 275 "--merge will merge the OAR with the existing scene (suppresses terrain and parcel info loading)." + Environment.NewLine
276 + "--skip-assets will load the OAR but ignore the assets it contains." + Environment.NewLine 276 + "--skip-assets will load the OAR but ignore the assets it contains." + Environment.NewLine
277 + "--displacement will add this value to the position of every object loaded" + Environment.NewLine 277 + "--displacement will add this value to the position of every object loaded" + Environment.NewLine
278 + "--forceterrain forces the loading of terrain from the oar (undoes suppression done by --merge)" + Environment.NewLine 278 + "--force-terrain forces the loading of terrain from the oar (undoes suppression done by --merge)" + Environment.NewLine
279 + "--forceparcels forces the loading of parcels from the oar (undoes suppression done by --merge)" + Environment.NewLine 279 + "--force-parcels forces the loading of parcels from the oar (undoes suppression done by --merge)" + Environment.NewLine
280 + "--rotation specified rotation to be applied to the oar. Specified in degrees." + Environment.NewLine 280 + "--rotation specified rotation to be applied to the oar. Specified in degrees." + Environment.NewLine
281 + "--rotationcenter Location (relative to original OAR) to apply rotation. Default is <128,128,0>" + Environment.NewLine 281 + "--rotation-center Location (relative to original OAR) to apply rotation. Default is <128,128,0>" + Environment.NewLine
282 + "The path can be either a filesystem location or a URI." 282 + "The path can be either a filesystem location or a URI."
283 + " If this is not given then the command looks for an OAR named region.oar in the current directory.", 283 + " If this is not given then the command looks for an OAR named region.oar in the current directory.",
284 LoadOar); 284 LoadOar);
diff --git a/OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs b/OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs
index 6f68966..23008a0 100644
--- a/OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs
+++ b/OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs
@@ -177,13 +177,13 @@ namespace OpenSim.Region.CoreModules.World.Archiver
177 177
178 m_errorMessage = String.Empty; 178 m_errorMessage = String.Empty;
179 m_merge = options.ContainsKey("merge"); 179 m_merge = options.ContainsKey("merge");
180 m_forceTerrain = options.ContainsKey("forceTerrain"); 180 m_forceTerrain = options.ContainsKey("force-terrain");
181 m_forceParcels = options.ContainsKey("forceParcels"); 181 m_forceParcels = options.ContainsKey("force-parcels");
182 m_skipAssets = options.ContainsKey("skipAssets"); 182 m_skipAssets = options.ContainsKey("skipAssets");
183 m_requestId = requestId; 183 m_requestId = requestId;
184 m_displacement = options.ContainsKey("displacement") ? (Vector3)options["displacement"] : Vector3.Zero; 184 m_displacement = options.ContainsKey("displacement") ? (Vector3)options["displacement"] : Vector3.Zero;
185 m_rotation = options.ContainsKey("rotation") ? (float)options["rotation"] : 0f; 185 m_rotation = options.ContainsKey("rotation") ? (float)options["rotation"] : 0f;
186 m_rotationCenter = options.ContainsKey("rotationCenter") ? (Vector3)options["rotationCenter"] 186 m_rotationCenter = options.ContainsKey("rotation-center") ? (Vector3)options["rotation-center"]
187 : new Vector3(scene.RegionInfo.RegionSizeX / 2f, scene.RegionInfo.RegionSizeY / 2f, 0f); 187 : new Vector3(scene.RegionInfo.RegionSizeX / 2f, scene.RegionInfo.RegionSizeY / 2f, 0f);
188 188
189 // Zero can never be a valid user id 189 // Zero can never be a valid user id
diff --git a/OpenSim/Region/CoreModules/World/Archiver/ArchiverModule.cs b/OpenSim/Region/CoreModules/World/Archiver/ArchiverModule.cs
index 6fbac4c..9fa1fbd 100644
--- a/OpenSim/Region/CoreModules/World/Archiver/ArchiverModule.cs
+++ b/OpenSim/Region/CoreModules/World/Archiver/ArchiverModule.cs
@@ -113,8 +113,8 @@ namespace OpenSim.Region.CoreModules.World.Archiver
113 OptionSet options = new OptionSet(); 113 OptionSet options = new OptionSet();
114 options.Add("m|merge", delegate (string v) { mergeOar = (v != null); }); 114 options.Add("m|merge", delegate (string v) { mergeOar = (v != null); });
115 options.Add("s|skip-assets", delegate (string v) { skipAssets = (v != null); }); 115 options.Add("s|skip-assets", delegate (string v) { skipAssets = (v != null); });
116 options.Add("forceterrain", delegate (string v) { forceTerrain = (v != null); }); 116 options.Add("force-terrain", delegate (string v) { forceTerrain = (v != null); });
117 options.Add("forceparcels", delegate (string v) { forceParcels = (v != null); }); 117 options.Add("force-parcels", delegate (string v) { forceParcels = (v != null); });
118 options.Add("displacement=", delegate (string v) { 118 options.Add("displacement=", delegate (string v) {
119 try 119 try
120 { 120 {
@@ -141,7 +141,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver
141 // Convert to radians for internals 141 // Convert to radians for internals
142 rotation = Util.Clamp<float>(rotation, -359f, 359f) / 180f * (float)Math.PI; 142 rotation = Util.Clamp<float>(rotation, -359f, 359f) / 180f * (float)Math.PI;
143 }); 143 });
144 options.Add("rotationcenter=", delegate (string v) { 144 options.Add("rotation-center=", delegate (string v) {
145 try 145 try
146 { 146 {
147 rotationCenter = v == null ? Vector3.Zero : Vector3.Parse(v); 147 rotationCenter = v == null ? Vector3.Zero : Vector3.Parse(v);
@@ -149,7 +149,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver
149 catch 149 catch
150 { 150 {
151 m_log.ErrorFormat("[ARCHIVER MODULE] failure parsing rotation displacement"); 151 m_log.ErrorFormat("[ARCHIVER MODULE] failure parsing rotation displacement");
152 m_log.ErrorFormat("[ARCHIVER MODULE] Must be represented as vector3: --rotationcenter \"<128,128,0>\""); 152 m_log.ErrorFormat("[ARCHIVER MODULE] Must be represented as vector3: --rotation-center \"<128,128,0>\"");
153 return; 153 return;
154 } 154 }
155 }); 155 });
@@ -174,11 +174,11 @@ namespace OpenSim.Region.CoreModules.World.Archiver
174 Dictionary<string, object> archiveOptions = new Dictionary<string, object>(); 174 Dictionary<string, object> archiveOptions = new Dictionary<string, object>();
175 if (mergeOar) archiveOptions.Add("merge", null); 175 if (mergeOar) archiveOptions.Add("merge", null);
176 if (skipAssets) archiveOptions.Add("skipAssets", null); 176 if (skipAssets) archiveOptions.Add("skipAssets", null);
177 if (forceTerrain) archiveOptions.Add("forceTerrain", null); 177 if (forceTerrain) archiveOptions.Add("force-terrain", null);
178 if (forceParcels) archiveOptions.Add("forceParcels", null); 178 if (forceParcels) archiveOptions.Add("force-parcels", null);
179 archiveOptions.Add("displacement", displacement); 179 archiveOptions.Add("displacement", displacement);
180 archiveOptions.Add("rotation", rotation); 180 archiveOptions.Add("rotation", rotation);
181 archiveOptions.Add("rotationCenter", rotationCenter); 181 archiveOptions.Add("rotation-center", rotationCenter);
182 182
183 if (mainParams.Count > 2) 183 if (mainParams.Count > 2)
184 { 184 {