aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
authorRobert Adams2014-02-02 22:16:01 -0800
committerRobert Adams2014-02-02 22:16:01 -0800
commit41b6602a775fb0a2a36d60c554364ff8e5efdbce (patch)
tree2f1572c27c01be4e31a2e17787138f7ed5a9b940 /OpenSim/Region
parentReally add the old parameter names to load oar to keep downward compatibiliy (diff)
downloadopensim-SC_OLD-41b6602a775fb0a2a36d60c554364ff8e5efdbce.zip
opensim-SC_OLD-41b6602a775fb0a2a36d60c554364ff8e5efdbce.tar.gz
opensim-SC_OLD-41b6602a775fb0a2a36d60c554364ff8e5efdbce.tar.bz2
opensim-SC_OLD-41b6602a775fb0a2a36d60c554364ff8e5efdbce.tar.xz
Add "--no-objects" parameter to 'load oar'.
Diffstat (limited to 'OpenSim/Region')
-rw-r--r--OpenSim/Region/Application/OpenSim.cs2
-rw-r--r--OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs5
-rw-r--r--OpenSim/Region/CoreModules/World/Archiver/ArchiverModule.cs3
3 files changed, 9 insertions, 1 deletions
diff --git a/OpenSim/Region/Application/OpenSim.cs b/OpenSim/Region/Application/OpenSim.cs
index a609b77..77b9440 100644
--- a/OpenSim/Region/Application/OpenSim.cs
+++ b/OpenSim/Region/Application/OpenSim.cs
@@ -268,6 +268,7 @@ namespace OpenSim
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 + " [--force-terrain] [--force-parcels]" 270 + " [--force-terrain] [--force-parcels]"
271 + " [--no-objects]"
271 + " [--rotation degrees] [--rotation-center \"<x,y,z>\"]" 272 + " [--rotation degrees] [--rotation-center \"<x,y,z>\"]"
272 + " [--displacement \"<x,y,z>\"]" 273 + " [--displacement \"<x,y,z>\"]"
273 + " [<OAR path>]", 274 + " [<OAR path>]",
@@ -279,6 +280,7 @@ namespace OpenSim
279 + "--force-parcels forces the loading of parcels from the oar (undoes suppression done by --merge)" + Environment.NewLine 280 + "--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 281 + "--rotation specified rotation to be applied to the oar. Specified in degrees." + Environment.NewLine
281 + "--rotation-center Location (relative to original OAR) to apply rotation. Default is <128,128,0>" + Environment.NewLine 282 + "--rotation-center Location (relative to original OAR) to apply rotation. Default is <128,128,0>" + Environment.NewLine
283 + "--no-objects suppresses the addition of any objects (good for loading only the terrain)" + Environment.NewLine
282 + "The path can be either a filesystem location or a URI." 284 + "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.", 285 + " If this is not given then the command looks for an OAR named region.oar in the current directory.",
284 LoadOar); 286 LoadOar);
diff --git a/OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs b/OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs
index 23008a0..0c4b79b 100644
--- a/OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs
+++ b/OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs
@@ -130,6 +130,8 @@ namespace OpenSim.Region.CoreModules.World.Archiver
130 /// </value> 130 /// </value>
131 protected Vector3 m_rotationCenter = new Vector3(Constants.RegionSize / 2f, Constants.RegionSize / 2f, 0f); 131 protected Vector3 m_rotationCenter = new Vector3(Constants.RegionSize / 2f, Constants.RegionSize / 2f, 0f);
132 132
133 protected bool m_noObjects = false;
134
133 /// <summary> 135 /// <summary>
134 /// Used to cache lookups for valid uuids. 136 /// Used to cache lookups for valid uuids.
135 /// </summary> 137 /// </summary>
@@ -179,6 +181,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver
179 m_merge = options.ContainsKey("merge"); 181 m_merge = options.ContainsKey("merge");
180 m_forceTerrain = options.ContainsKey("force-terrain"); 182 m_forceTerrain = options.ContainsKey("force-terrain");
181 m_forceParcels = options.ContainsKey("force-parcels"); 183 m_forceParcels = options.ContainsKey("force-parcels");
184 m_noObjects = options.ContainsKey("no-objects");
182 m_skipAssets = options.ContainsKey("skipAssets"); 185 m_skipAssets = options.ContainsKey("skipAssets");
183 m_requestId = requestId; 186 m_requestId = requestId;
184 m_displacement = options.ContainsKey("displacement") ? (Vector3)options["displacement"] : Vector3.Zero; 187 m_displacement = options.ContainsKey("displacement") ? (Vector3)options["displacement"] : Vector3.Zero;
@@ -261,7 +264,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver
261 264
262 // Process the file 265 // Process the file
263 266
264 if (filePath.StartsWith(ArchiveConstants.OBJECTS_PATH)) 267 if (filePath.StartsWith(ArchiveConstants.OBJECTS_PATH) && !m_noObjects)
265 { 268 {
266 sceneContext.SerialisedSceneObjects.Add(Encoding.UTF8.GetString(data)); 269 sceneContext.SerialisedSceneObjects.Add(Encoding.UTF8.GetString(data));
267 } 270 }
diff --git a/OpenSim/Region/CoreModules/World/Archiver/ArchiverModule.cs b/OpenSim/Region/CoreModules/World/Archiver/ArchiverModule.cs
index a89fe1c..2b2da6f 100644
--- a/OpenSim/Region/CoreModules/World/Archiver/ArchiverModule.cs
+++ b/OpenSim/Region/CoreModules/World/Archiver/ArchiverModule.cs
@@ -106,6 +106,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver
106 bool skipAssets = false; 106 bool skipAssets = false;
107 bool forceTerrain = false; 107 bool forceTerrain = false;
108 bool forceParcels = false; 108 bool forceParcels = false;
109 bool noObjects = false;
109 Vector3 displacement = new Vector3(0f, 0f, 0f); 110 Vector3 displacement = new Vector3(0f, 0f, 0f);
110 float rotation = 0f; 111 float rotation = 0f;
111 Vector3 rotationCenter = new Vector3(Constants.RegionSize / 2f, Constants.RegionSize / 2f, 0); 112 Vector3 rotationCenter = new Vector3(Constants.RegionSize / 2f, Constants.RegionSize / 2f, 0);
@@ -117,6 +118,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver
117 options.Add("forceterrain", delegate (string v) { forceTerrain = (v != null); }); // downward compatibility 118 options.Add("forceterrain", delegate (string v) { forceTerrain = (v != null); }); // downward compatibility
118 options.Add("force-parcels", delegate (string v) { forceParcels = (v != null); }); 119 options.Add("force-parcels", delegate (string v) { forceParcels = (v != null); });
119 options.Add("forceparcels", delegate (string v) { forceParcels = (v != null); }); // downward compatibility 120 options.Add("forceparcels", delegate (string v) { forceParcels = (v != null); }); // downward compatibility
121 options.Add("no-objects", delegate (string v) { noObjects = (v != null); });
120 options.Add("displacement=", delegate (string v) { 122 options.Add("displacement=", delegate (string v) {
121 try 123 try
122 { 124 {
@@ -178,6 +180,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver
178 if (skipAssets) archiveOptions.Add("skipAssets", null); 180 if (skipAssets) archiveOptions.Add("skipAssets", null);
179 if (forceTerrain) archiveOptions.Add("force-terrain", null); 181 if (forceTerrain) archiveOptions.Add("force-terrain", null);
180 if (forceParcels) archiveOptions.Add("force-parcels", null); 182 if (forceParcels) archiveOptions.Add("force-parcels", null);
183 if (noObjects) archiveOptions.Add("no-objects", null);
181 archiveOptions.Add("displacement", displacement); 184 archiveOptions.Add("displacement", displacement);
182 archiveOptions.Add("rotation", rotation); 185 archiveOptions.Add("rotation", rotation);
183 archiveOptions.Add("rotation-center", rotationCenter); 186 archiveOptions.Add("rotation-center", rotationCenter);