Add "--no-objects" parameter to 'load oar'.
							parent
							
								
									8c6a0cb44a
								
							
						
					
					
						commit
						41b6602a77
					
				|  | @ -268,6 +268,7 @@ namespace OpenSim | ||||||
|             m_console.Commands.AddCommand("Archiving", false, "load oar", |             m_console.Commands.AddCommand("Archiving", false, "load oar", | ||||||
|                                           "load oar [--merge] [--skip-assets]" |                                           "load oar [--merge] [--skip-assets]" | ||||||
|                                              + " [--force-terrain] [--force-parcels]" |                                              + " [--force-terrain] [--force-parcels]" | ||||||
|  |                                              + " [--no-objects]" | ||||||
|                                              + " [--rotation degrees] [--rotation-center \"<x,y,z>\"]" |                                              + " [--rotation degrees] [--rotation-center \"<x,y,z>\"]" | ||||||
|                                              + " [--displacement \"<x,y,z>\"]" |                                              + " [--displacement \"<x,y,z>\"]" | ||||||
|                                              + " [<OAR path>]", |                                              + " [<OAR path>]", | ||||||
|  | @ -279,6 +280,7 @@ namespace OpenSim | ||||||
|                                           + "--force-parcels forces the loading of parcels from the oar (undoes suppression done by --merge)" + Environment.NewLine |                                           + "--force-parcels forces the loading of parcels from the oar (undoes suppression done by --merge)" + Environment.NewLine | ||||||
|                                           + "--rotation specified rotation to be applied to the oar. Specified in degrees." + Environment.NewLine |                                           + "--rotation specified rotation to be applied to the oar. Specified in degrees." + Environment.NewLine | ||||||
|                                           + "--rotation-center Location (relative to original OAR) to apply rotation. Default is <128,128,0>" + Environment.NewLine |                                           + "--rotation-center Location (relative to original OAR) to apply rotation. Default is <128,128,0>" + Environment.NewLine | ||||||
|  |                                           + "--no-objects suppresses the addition of any objects (good for loading only the terrain)" + Environment.NewLine | ||||||
|                                           + "The path can be either a filesystem location or a URI." |                                           + "The path can be either a filesystem location or a URI." | ||||||
|                                           + "  If this is not given then the command looks for an OAR named region.oar in the current directory.", |                                           + "  If this is not given then the command looks for an OAR named region.oar in the current directory.", | ||||||
|                                           LoadOar); |                                           LoadOar); | ||||||
|  |  | ||||||
|  | @ -130,6 +130,8 @@ namespace OpenSim.Region.CoreModules.World.Archiver | ||||||
|         /// </value> |         /// </value> | ||||||
|         protected Vector3 m_rotationCenter = new Vector3(Constants.RegionSize / 2f, Constants.RegionSize / 2f, 0f); |         protected Vector3 m_rotationCenter = new Vector3(Constants.RegionSize / 2f, Constants.RegionSize / 2f, 0f); | ||||||
| 
 | 
 | ||||||
|  |         protected bool m_noObjects = false; | ||||||
|  | 
 | ||||||
|         /// <summary> |         /// <summary> | ||||||
|         /// Used to cache lookups for valid uuids. |         /// Used to cache lookups for valid uuids. | ||||||
|         /// </summary> |         /// </summary> | ||||||
|  | @ -179,6 +181,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver | ||||||
|             m_merge = options.ContainsKey("merge"); |             m_merge = options.ContainsKey("merge"); | ||||||
|             m_forceTerrain = options.ContainsKey("force-terrain"); |             m_forceTerrain = options.ContainsKey("force-terrain"); | ||||||
|             m_forceParcels = options.ContainsKey("force-parcels"); |             m_forceParcels = options.ContainsKey("force-parcels"); | ||||||
|  |             m_noObjects = options.ContainsKey("no-objects"); | ||||||
|             m_skipAssets = options.ContainsKey("skipAssets"); |             m_skipAssets = options.ContainsKey("skipAssets"); | ||||||
|             m_requestId = requestId; |             m_requestId = requestId; | ||||||
|             m_displacement = options.ContainsKey("displacement") ? (Vector3)options["displacement"] : Vector3.Zero; |             m_displacement = options.ContainsKey("displacement") ? (Vector3)options["displacement"] : Vector3.Zero; | ||||||
|  | @ -261,7 +264,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver | ||||||
| 
 | 
 | ||||||
|                     // Process the file |                     // Process the file | ||||||
| 
 | 
 | ||||||
|                     if (filePath.StartsWith(ArchiveConstants.OBJECTS_PATH)) |                     if (filePath.StartsWith(ArchiveConstants.OBJECTS_PATH) && !m_noObjects) | ||||||
|                     { |                     { | ||||||
|                         sceneContext.SerialisedSceneObjects.Add(Encoding.UTF8.GetString(data)); |                         sceneContext.SerialisedSceneObjects.Add(Encoding.UTF8.GetString(data)); | ||||||
|                     } |                     } | ||||||
|  |  | ||||||
|  | @ -106,6 +106,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver | ||||||
|             bool skipAssets = false; |             bool skipAssets = false; | ||||||
|             bool forceTerrain = false; |             bool forceTerrain = false; | ||||||
|             bool forceParcels = false; |             bool forceParcels = false; | ||||||
|  |             bool noObjects = false; | ||||||
|             Vector3 displacement = new Vector3(0f, 0f, 0f); |             Vector3 displacement = new Vector3(0f, 0f, 0f); | ||||||
|             float rotation = 0f; |             float rotation = 0f; | ||||||
|             Vector3 rotationCenter = new Vector3(Constants.RegionSize / 2f, Constants.RegionSize / 2f, 0); |             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("forceterrain", delegate (string v) { forceTerrain = (v != null); });   // downward compatibility | ||||||
|             options.Add("force-parcels", delegate (string v) { forceParcels = (v != null); }); |             options.Add("force-parcels", delegate (string v) { forceParcels = (v != null); }); | ||||||
|             options.Add("forceparcels", delegate (string v) { forceParcels = (v != null); });   // downward compatibility |             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) { |             options.Add("displacement=", delegate (string v) { | ||||||
|                 try |                 try | ||||||
|                 { |                 { | ||||||
|  | @ -178,6 +180,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver | ||||||
|             if (skipAssets) archiveOptions.Add("skipAssets", null); |             if (skipAssets) archiveOptions.Add("skipAssets", null); | ||||||
|             if (forceTerrain) archiveOptions.Add("force-terrain", null); |             if (forceTerrain) archiveOptions.Add("force-terrain", null); | ||||||
|             if (forceParcels) archiveOptions.Add("force-parcels", null); |             if (forceParcels) archiveOptions.Add("force-parcels", null); | ||||||
|  |             if (noObjects) archiveOptions.Add("no-objects", null); | ||||||
|             archiveOptions.Add("displacement", displacement); |             archiveOptions.Add("displacement", displacement); | ||||||
|             archiveOptions.Add("rotation", rotation); |             archiveOptions.Add("rotation", rotation); | ||||||
|             archiveOptions.Add("rotation-center", rotationCenter); |             archiveOptions.Add("rotation-center", rotationCenter); | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue
	
	 Robert Adams
						Robert Adams