From 41b6602a775fb0a2a36d60c554364ff8e5efdbce Mon Sep 17 00:00:00 2001 From: Robert Adams Date: Sun, 2 Feb 2014 22:16:01 -0800 Subject: Add "--no-objects" parameter to 'load oar'. --- OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs | 5 ++++- OpenSim/Region/CoreModules/World/Archiver/ArchiverModule.cs | 3 +++ 2 files changed, 7 insertions(+), 1 deletion(-) (limited to 'OpenSim/Region/CoreModules/World/Archiver') 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 /// protected Vector3 m_rotationCenter = new Vector3(Constants.RegionSize / 2f, Constants.RegionSize / 2f, 0f); + protected bool m_noObjects = false; + /// /// Used to cache lookups for valid uuids. /// @@ -179,6 +181,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver m_merge = options.ContainsKey("merge"); m_forceTerrain = options.ContainsKey("force-terrain"); m_forceParcels = options.ContainsKey("force-parcels"); + m_noObjects = options.ContainsKey("no-objects"); m_skipAssets = options.ContainsKey("skipAssets"); m_requestId = requestId; m_displacement = options.ContainsKey("displacement") ? (Vector3)options["displacement"] : Vector3.Zero; @@ -261,7 +264,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver // Process the file - if (filePath.StartsWith(ArchiveConstants.OBJECTS_PATH)) + if (filePath.StartsWith(ArchiveConstants.OBJECTS_PATH) && !m_noObjects) { sceneContext.SerialisedSceneObjects.Add(Encoding.UTF8.GetString(data)); } 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 bool skipAssets = false; bool forceTerrain = false; bool forceParcels = false; + bool noObjects = false; Vector3 displacement = new Vector3(0f, 0f, 0f); float rotation = 0f; Vector3 rotationCenter = new Vector3(Constants.RegionSize / 2f, Constants.RegionSize / 2f, 0); @@ -117,6 +118,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver options.Add("forceterrain", delegate (string v) { forceTerrain = (v != null); }); // downward compatibility options.Add("force-parcels", delegate (string v) { forceParcels = (v != null); }); options.Add("forceparcels", delegate (string v) { forceParcels = (v != null); }); // downward compatibility + options.Add("no-objects", delegate (string v) { noObjects = (v != null); }); options.Add("displacement=", delegate (string v) { try { @@ -178,6 +180,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver if (skipAssets) archiveOptions.Add("skipAssets", null); if (forceTerrain) archiveOptions.Add("force-terrain", null); if (forceParcels) archiveOptions.Add("force-parcels", null); + if (noObjects) archiveOptions.Add("no-objects", null); archiveOptions.Add("displacement", displacement); archiveOptions.Add("rotation", rotation); archiveOptions.Add("rotation-center", rotationCenter); -- cgit v1.1