diff options
author | Robert Adams | 2014-01-19 12:45:16 -0800 |
---|---|---|
committer | Robert Adams | 2014-01-19 12:45:16 -0800 |
commit | 5e6a47f13f3dbc273dda0f76e506b60fd27d7f66 (patch) | |
tree | 1184bed69a3eb16745ba63d08c2bfc83f95774a5 /OpenSim/Region/CoreModules/World/Archiver/ArchiverModule.cs | |
parent | varregion: add --noterrain and --noparcel to 'load oar'. (diff) | |
download | opensim-SC_OLD-5e6a47f13f3dbc273dda0f76e506b60fd27d7f66.zip opensim-SC_OLD-5e6a47f13f3dbc273dda0f76e506b60fd27d7f66.tar.gz opensim-SC_OLD-5e6a47f13f3dbc273dda0f76e506b60fd27d7f66.tar.bz2 opensim-SC_OLD-5e6a47f13f3dbc273dda0f76e506b60fd27d7f66.tar.xz |
varregion: remove --noterrain and --noparcel parameters in 'load oar'.
Add --forceterrain and --forceparcel to 'load oar'. In order to not change
the operation of --merge (which does an object merge and suppresses terrain
and parcel information loading), added the --force* parameters to be used
when loading multiple oars to build up a varregion.
Added --rotation and --rotationcenter parameters to 'load oar' which apply a rotation to
the loaded oar objects before displacing. The rotation is in degrees (pos or neg)
and the center defaults to "<128, 128, 0>".
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/CoreModules/World/Archiver/ArchiverModule.cs | 28 |
1 files changed, 20 insertions, 8 deletions
diff --git a/OpenSim/Region/CoreModules/World/Archiver/ArchiverModule.cs b/OpenSim/Region/CoreModules/World/Archiver/ArchiverModule.cs index df5b443..2a6f1eb 100644 --- a/OpenSim/Region/CoreModules/World/Archiver/ArchiverModule.cs +++ b/OpenSim/Region/CoreModules/World/Archiver/ArchiverModule.cs | |||
@@ -104,19 +104,21 @@ namespace OpenSim.Region.CoreModules.World.Archiver | |||
104 | { | 104 | { |
105 | bool mergeOar = false; | 105 | bool mergeOar = false; |
106 | bool skipAssets = false; | 106 | bool skipAssets = false; |
107 | bool noTerrain = false; | 107 | bool forceTerrain = false; |
108 | bool noParcels = false; | 108 | bool forceParcels = false; |
109 | Vector3 displacement = new Vector3(0f, 0f, 0f); | 109 | Vector3 displacement = new Vector3(0f, 0f, 0f); |
110 | float rotation = 0f; | ||
111 | Vector3 rotationCenter = new Vector3(Constants.RegionSize / 2f, Constants.RegionSize / 2f, 0); | ||
110 | 112 | ||
111 | OptionSet options = new OptionSet(); | 113 | OptionSet options = new OptionSet(); |
112 | options.Add("m|merge", delegate (string v) { mergeOar = (v != null); }); | 114 | options.Add("m|merge", delegate (string v) { mergeOar = (v != null); }); |
113 | options.Add("s|skip-assets", delegate (string v) { skipAssets = (v != null); }); | 115 | options.Add("s|skip-assets", delegate (string v) { skipAssets = (v != null); }); |
114 | options.Add("noterrain", delegate (string v) { noTerrain = (v != null); }); | 116 | options.Add("forceterrain", delegate (string v) { forceTerrain = (v != null); }); |
115 | options.Add("noparcels", delegate (string v) { noParcels = (v != null); }); | 117 | options.Add("forceparcels", delegate (string v) { forceParcels = (v != null); }); |
116 | options.Add("displacement=", delegate (string v) { | 118 | options.Add("displacement=", delegate (string v) { |
117 | try | 119 | try |
118 | { | 120 | { |
119 | displacement = v == null ? new Vector3(0f, 0f, 0f) : Vector3.Parse(v); | 121 | displacement = v == null ? Vector3.Zero : Vector3.Parse(v); |
120 | } | 122 | } |
121 | catch (Exception e) | 123 | catch (Exception e) |
122 | { | 124 | { |
@@ -124,6 +126,14 @@ namespace OpenSim.Region.CoreModules.World.Archiver | |||
124 | displacement = new Vector3(0f, 0f, 0f); | 126 | displacement = new Vector3(0f, 0f, 0f); |
125 | } | 127 | } |
126 | }); | 128 | }); |
129 | options.Add("rotation=", delegate (string v) { | ||
130 | rotation = float.Parse(v); | ||
131 | rotation = Util.Clamp<float>(rotation, -359f, 359f); | ||
132 | }); | ||
133 | options.Add("rotationcenter=", delegate (string v) { | ||
134 | // RA 20130119: libomv's Vector2.Parse doesn't work. Need to use vector3 for the moment | ||
135 | rotationCenter = Vector3.Parse(v); | ||
136 | }); | ||
127 | 137 | ||
128 | // Send a message to the region ready module | 138 | // Send a message to the region ready module |
129 | /* bluewall* Disable this for the time being | 139 | /* bluewall* Disable this for the time being |
@@ -145,9 +155,11 @@ namespace OpenSim.Region.CoreModules.World.Archiver | |||
145 | Dictionary<string, object> archiveOptions = new Dictionary<string, object>(); | 155 | Dictionary<string, object> archiveOptions = new Dictionary<string, object>(); |
146 | if (mergeOar) archiveOptions.Add("merge", null); | 156 | if (mergeOar) archiveOptions.Add("merge", null); |
147 | if (skipAssets) archiveOptions.Add("skipAssets", null); | 157 | if (skipAssets) archiveOptions.Add("skipAssets", null); |
148 | if (noTerrain) archiveOptions.Add("noTerrain", null); | 158 | if (forceTerrain) archiveOptions.Add("forceTerrain", null); |
149 | if (noParcels) archiveOptions.Add("noParcels", null); | 159 | if (forceParcels) archiveOptions.Add("forceParcels", null); |
150 | if (displacement != Vector3.Zero) archiveOptions.Add("displacement", displacement); | 160 | archiveOptions.Add("displacement", displacement); |
161 | archiveOptions.Add("rotation", rotation); | ||
162 | archiveOptions.Add("rotationCenter", rotationCenter); | ||
151 | 163 | ||
152 | if (mainParams.Count > 2) | 164 | if (mainParams.Count > 2) |
153 | { | 165 | { |