aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/CoreModules
diff options
context:
space:
mode:
authorMelanie2012-04-03 23:52:53 +0100
committerMelanie2012-04-03 23:52:53 +0100
commit63c44719f7a67950325690bc4cc848b75318e29f (patch)
treeeaa0575671680d8dad75813dc8700d098a3df622 /OpenSim/Region/CoreModules
parentMerge branch 'master' into careminster (diff)
parentterrain save-tile extensions Signed-off-by: Garmin Kawaguichi <garmin.kawagui... (diff)
downloadopensim-SC_OLD-63c44719f7a67950325690bc4cc848b75318e29f.zip
opensim-SC_OLD-63c44719f7a67950325690bc4cc848b75318e29f.tar.gz
opensim-SC_OLD-63c44719f7a67950325690bc4cc848b75318e29f.tar.bz2
opensim-SC_OLD-63c44719f7a67950325690bc4cc848b75318e29f.tar.xz
Merge branch 'master' into careminster
Conflicts: OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs OpenSim/Region/Framework/Scenes/SceneObjectPart.cs OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
Diffstat (limited to 'OpenSim/Region/CoreModules')
-rw-r--r--OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs6
-rw-r--r--OpenSim/Region/CoreModules/World/Terrain/FileLoaders/BMP.cs6
-rw-r--r--OpenSim/Region/CoreModules/World/Terrain/FileLoaders/GIF.cs6
-rw-r--r--OpenSim/Region/CoreModules/World/Terrain/FileLoaders/GenericSystemDrawing.cs6
-rw-r--r--OpenSim/Region/CoreModules/World/Terrain/FileLoaders/JPEG.cs6
-rw-r--r--OpenSim/Region/CoreModules/World/Terrain/FileLoaders/LLRAW.cs7
-rw-r--r--OpenSim/Region/CoreModules/World/Terrain/FileLoaders/PNG.cs6
-rw-r--r--OpenSim/Region/CoreModules/World/Terrain/FileLoaders/RAW32.cs6
-rw-r--r--OpenSim/Region/CoreModules/World/Terrain/FileLoaders/TIFF.cs6
-rw-r--r--OpenSim/Region/CoreModules/World/Terrain/FileLoaders/Terragen.cs6
-rw-r--r--OpenSim/Region/CoreModules/World/Terrain/ITerrainLoader.cs4
-rw-r--r--OpenSim/Region/CoreModules/World/Terrain/TerrainModule.cs18
12 files changed, 78 insertions, 5 deletions
diff --git a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
index a422552..b64d372 100644
--- a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
+++ b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
@@ -36,6 +36,7 @@ using OpenSim.Framework.Capabilities;
36using OpenSim.Framework.Client; 36using OpenSim.Framework.Client;
37using OpenSim.Region.Framework.Interfaces; 37using OpenSim.Region.Framework.Interfaces;
38using OpenSim.Region.Framework.Scenes; 38using OpenSim.Region.Framework.Scenes;
39using OpenSim.Region.Physics.Manager;
39using OpenSim.Services.Interfaces; 40using OpenSim.Services.Interfaces;
40 41
41using GridRegion = OpenSim.Services.Interfaces.GridRegion; 42using GridRegion = OpenSim.Services.Interfaces.GridRegion;
@@ -1761,9 +1762,10 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
1761 { 1762 {
1762 if (!grp.IsDeleted) 1763 if (!grp.IsDeleted)
1763 { 1764 {
1764 if (grp.RootPart.PhysActor != null) 1765 PhysicsActor pa = grp.RootPart.PhysActor;
1766 if (pa != null)
1765 { 1767 {
1766 grp.RootPart.PhysActor.CrossingFailure(); 1768 pa.CrossingFailure();
1767 if (grp.RootPart.KeyframeMotion != null) 1769 if (grp.RootPart.KeyframeMotion != null)
1768 { 1770 {
1769 grp.RootPart.Velocity = Vector3.Zero; 1771 grp.RootPart.Velocity = Vector3.Zero;
diff --git a/OpenSim/Region/CoreModules/World/Terrain/FileLoaders/BMP.cs b/OpenSim/Region/CoreModules/World/Terrain/FileLoaders/BMP.cs
index 90f124b..fb57c82 100644
--- a/OpenSim/Region/CoreModules/World/Terrain/FileLoaders/BMP.cs
+++ b/OpenSim/Region/CoreModules/World/Terrain/FileLoaders/BMP.cs
@@ -72,5 +72,11 @@ namespace OpenSim.Region.CoreModules.World.Terrain.FileLoaders
72 { 72 {
73 return "BMP"; 73 return "BMP";
74 } 74 }
75
76 //Returns true if this extension is supported for terrain save-tile
77 public override bool SupportsTileSave()
78 {
79 return false;
80 }
75 } 81 }
76} 82}
diff --git a/OpenSim/Region/CoreModules/World/Terrain/FileLoaders/GIF.cs b/OpenSim/Region/CoreModules/World/Terrain/FileLoaders/GIF.cs
index f331b56..79cc50b 100644
--- a/OpenSim/Region/CoreModules/World/Terrain/FileLoaders/GIF.cs
+++ b/OpenSim/Region/CoreModules/World/Terrain/FileLoaders/GIF.cs
@@ -57,5 +57,11 @@ namespace OpenSim.Region.CoreModules.World.Terrain.FileLoaders
57 { 57 {
58 return "GIF"; 58 return "GIF";
59 } 59 }
60
61 //Returns true if this extension is supported for terrain save-tile
62 public override bool SupportsTileSave()
63 {
64 return false;
65 }
60 } 66 }
61} 67}
diff --git a/OpenSim/Region/CoreModules/World/Terrain/FileLoaders/GenericSystemDrawing.cs b/OpenSim/Region/CoreModules/World/Terrain/FileLoaders/GenericSystemDrawing.cs
index 58925fd..da81dc1 100644
--- a/OpenSim/Region/CoreModules/World/Terrain/FileLoaders/GenericSystemDrawing.cs
+++ b/OpenSim/Region/CoreModules/World/Terrain/FileLoaders/GenericSystemDrawing.cs
@@ -177,6 +177,12 @@ namespace OpenSim.Region.CoreModules.World.Terrain.FileLoaders
177 return "SYS.DRAWING"; 177 return "SYS.DRAWING";
178 } 178 }
179 179
180 //Returns true if this extension is supported for terrain save-tile
181 public virtual bool SupportsTileSave()
182 {
183 return false;
184 }
185
180 /// <summary> 186 /// <summary>
181 /// Protected method, generates a grayscale bitmap 187 /// Protected method, generates a grayscale bitmap
182 /// image from a specified terrain channel. 188 /// image from a specified terrain channel.
diff --git a/OpenSim/Region/CoreModules/World/Terrain/FileLoaders/JPEG.cs b/OpenSim/Region/CoreModules/World/Terrain/FileLoaders/JPEG.cs
index 1a0d8ec..699d67a 100644
--- a/OpenSim/Region/CoreModules/World/Terrain/FileLoaders/JPEG.cs
+++ b/OpenSim/Region/CoreModules/World/Terrain/FileLoaders/JPEG.cs
@@ -91,6 +91,12 @@ namespace OpenSim.Region.CoreModules.World.Terrain.FileLoaders
91 return "JPEG"; 91 return "JPEG";
92 } 92 }
93 93
94 //Returns true if this extension is supported for terrain save-tile
95 public bool SupportsTileSave()
96 {
97 return false;
98 }
99
94 private static Bitmap CreateBitmapFromMap(ITerrainChannel map) 100 private static Bitmap CreateBitmapFromMap(ITerrainChannel map)
95 { 101 {
96 Bitmap gradientmapLd = new Bitmap("defaultstripe.png"); 102 Bitmap gradientmapLd = new Bitmap("defaultstripe.png");
diff --git a/OpenSim/Region/CoreModules/World/Terrain/FileLoaders/LLRAW.cs b/OpenSim/Region/CoreModules/World/Terrain/FileLoaders/LLRAW.cs
index fad7641..62d232e 100644
--- a/OpenSim/Region/CoreModules/World/Terrain/FileLoaders/LLRAW.cs
+++ b/OpenSim/Region/CoreModules/World/Terrain/FileLoaders/LLRAW.cs
@@ -254,5 +254,12 @@ namespace OpenSim.Region.CoreModules.World.Terrain.FileLoaders
254 { 254 {
255 return "LL/SL RAW"; 255 return "LL/SL RAW";
256 } 256 }
257
258 //Returns true if this extension is supported for terrain save-tile
259 public bool SupportsTileSave()
260 {
261 return false;
262 }
263
257 } 264 }
258} 265}
diff --git a/OpenSim/Region/CoreModules/World/Terrain/FileLoaders/PNG.cs b/OpenSim/Region/CoreModules/World/Terrain/FileLoaders/PNG.cs
index e009ecf..c5c12ae 100644
--- a/OpenSim/Region/CoreModules/World/Terrain/FileLoaders/PNG.cs
+++ b/OpenSim/Region/CoreModules/World/Terrain/FileLoaders/PNG.cs
@@ -57,5 +57,11 @@ namespace OpenSim.Region.CoreModules.World.Terrain.FileLoaders
57 { 57 {
58 return "PNG"; 58 return "PNG";
59 } 59 }
60
61 //Returns true if this extension is supported for terrain save-tile
62 public override bool SupportsTileSave()
63 {
64 return true;
65 }
60 } 66 }
61} 67}
diff --git a/OpenSim/Region/CoreModules/World/Terrain/FileLoaders/RAW32.cs b/OpenSim/Region/CoreModules/World/Terrain/FileLoaders/RAW32.cs
index ba073ca..9fb7ef7 100644
--- a/OpenSim/Region/CoreModules/World/Terrain/FileLoaders/RAW32.cs
+++ b/OpenSim/Region/CoreModules/World/Terrain/FileLoaders/RAW32.cs
@@ -173,5 +173,11 @@ namespace OpenSim.Region.CoreModules.World.Terrain.FileLoaders
173 { 173 {
174 return "RAW32"; 174 return "RAW32";
175 } 175 }
176
177 //Returns true if this extension is supported for terrain save-tile
178 public bool SupportsTileSave()
179 {
180 return false;
181 }
176 } 182 }
177} 183}
diff --git a/OpenSim/Region/CoreModules/World/Terrain/FileLoaders/TIFF.cs b/OpenSim/Region/CoreModules/World/Terrain/FileLoaders/TIFF.cs
index fc1ad33..5d2f893 100644
--- a/OpenSim/Region/CoreModules/World/Terrain/FileLoaders/TIFF.cs
+++ b/OpenSim/Region/CoreModules/World/Terrain/FileLoaders/TIFF.cs
@@ -57,5 +57,11 @@ namespace OpenSim.Region.CoreModules.World.Terrain.FileLoaders
57 { 57 {
58 return "TIFF"; 58 return "TIFF";
59 } 59 }
60
61 //Returns true if this extension is supported for terrain save-tile
62 public bool SupportsTileSave()
63 {
64 return false;
65 }
60 } 66 }
61} 67}
diff --git a/OpenSim/Region/CoreModules/World/Terrain/FileLoaders/Terragen.cs b/OpenSim/Region/CoreModules/World/Terrain/FileLoaders/Terragen.cs
index 2f37d9d..1ebf916 100644
--- a/OpenSim/Region/CoreModules/World/Terrain/FileLoaders/Terragen.cs
+++ b/OpenSim/Region/CoreModules/World/Terrain/FileLoaders/Terragen.cs
@@ -323,6 +323,12 @@ namespace OpenSim.Region.CoreModules.World.Terrain.FileLoaders
323 return "Terragen"; 323 return "Terragen";
324 } 324 }
325 325
326 //Returns true if this extension is supported for terrain save-tile
327 public bool SupportsTileSave()
328 {
329 return false;
330 }
331
326 /// <summary> 332 /// <summary>
327 /// terragen SCAL floats need to be written intel ordered regardless of 333 /// terragen SCAL floats need to be written intel ordered regardless of
328 /// big or little endian system 334 /// big or little endian system
diff --git a/OpenSim/Region/CoreModules/World/Terrain/ITerrainLoader.cs b/OpenSim/Region/CoreModules/World/Terrain/ITerrainLoader.cs
index d407617..3ba3657 100644
--- a/OpenSim/Region/CoreModules/World/Terrain/ITerrainLoader.cs
+++ b/OpenSim/Region/CoreModules/World/Terrain/ITerrainLoader.cs
@@ -32,6 +32,10 @@ namespace OpenSim.Region.CoreModules.World.Terrain
32{ 32{
33 public interface ITerrainLoader 33 public interface ITerrainLoader
34 { 34 {
35 // Returns true if that extension can be used for terrain save-tile
36 // (Look into each file in Region.CoreModules.World.Terrain.FileLoaders)
37 bool SupportsTileSave();
38
35 string FileExtension { get; } 39 string FileExtension { get; }
36 ITerrainChannel LoadFile(string filename); 40 ITerrainChannel LoadFile(string filename);
37 ITerrainChannel LoadFile(string filename, int fileStartX, int fileStartY, int fileWidth, int fileHeight, int sectionWidth, int sectionHeight); 41 ITerrainChannel LoadFile(string filename, int fileStartX, int fileStartY, int fileWidth, int fileHeight, int sectionWidth, int sectionHeight);
diff --git a/OpenSim/Region/CoreModules/World/Terrain/TerrainModule.cs b/OpenSim/Region/CoreModules/World/Terrain/TerrainModule.cs
index 14e428e..e2bd769 100644
--- a/OpenSim/Region/CoreModules/World/Terrain/TerrainModule.cs
+++ b/OpenSim/Region/CoreModules/World/Terrain/TerrainModule.cs
@@ -93,6 +93,9 @@ namespace OpenSim.Region.CoreModules.World.Terrain
93 /// </summary> 93 /// </summary>
94 private string m_supportedFileExtensions = ""; 94 private string m_supportedFileExtensions = "";
95 95
96 //For terrain save-tile file extensions
97 private string m_supportFileExtensionsForTileSave = "";
98
96 #region ICommandableModule Members 99 #region ICommandableModule Members
97 100
98 public ICommander CommandInterface 101 public ICommander CommandInterface
@@ -148,11 +151,20 @@ namespace OpenSim.Region.CoreModules.World.Terrain
148 151
149 // Generate user-readable extensions list 152 // Generate user-readable extensions list
150 string supportedFilesSeparator = ""; 153 string supportedFilesSeparator = "";
154 string supportedFilesSeparatorForTileSave = "";
151 155
156 m_supportFileExtensionsForTileSave = "";
152 foreach (KeyValuePair<string, ITerrainLoader> loader in m_loaders) 157 foreach (KeyValuePair<string, ITerrainLoader> loader in m_loaders)
153 { 158 {
154 m_supportedFileExtensions += supportedFilesSeparator + loader.Key + " (" + loader.Value + ")"; 159 m_supportedFileExtensions += supportedFilesSeparator + loader.Key + " (" + loader.Value + ")";
155 supportedFilesSeparator = ", "; 160 supportedFilesSeparator = ", ";
161
162 //For terrain save-tile file extensions
163 if (loader.Value.SupportsTileSave() == true)
164 {
165 m_supportFileExtensionsForTileSave += supportedFilesSeparatorForTileSave + loader.Key + " (" + loader.Value + ")";
166 supportedFilesSeparatorForTileSave = ", ";
167 }
156 } 168 }
157 } 169 }
158 170
@@ -589,7 +601,7 @@ namespace OpenSim.Region.CoreModules.World.Terrain
589 // this region is included in the tile request 601 // this region is included in the tile request
590 foreach (KeyValuePair<string, ITerrainLoader> loader in m_loaders) 602 foreach (KeyValuePair<string, ITerrainLoader> loader in m_loaders)
591 { 603 {
592 if (filename.EndsWith(loader.Key)) 604 if (filename.EndsWith(loader.Key) && loader.Value.SupportsTileSave())
593 { 605 {
594 lock (m_scene) 606 lock (m_scene)
595 { 607 {
@@ -610,7 +622,7 @@ namespace OpenSim.Region.CoreModules.World.Terrain
610 622
611 MainConsole.Instance.OutputFormat( 623 MainConsole.Instance.OutputFormat(
612 "ERROR: Could not save terrain from {0} to {1}. Valid file extensions are {2}", 624 "ERROR: Could not save terrain from {0} to {1}. Valid file extensions are {2}",
613 m_scene.RegionInfo.RegionName, filename, m_supportedFileExtensions); 625 m_scene.RegionInfo.RegionName, filename, m_supportFileExtensionsForTileSave);
614 } 626 }
615 627
616 /// <summary> 628 /// <summary>
@@ -1194,7 +1206,7 @@ namespace OpenSim.Region.CoreModules.World.Terrain
1194 new Command("save-tile", CommandIntentions.COMMAND_HAZARDOUS, InterfaceSaveTileFile, "Saves the current heightmap to the larger file."); 1206 new Command("save-tile", CommandIntentions.COMMAND_HAZARDOUS, InterfaceSaveTileFile, "Saves the current heightmap to the larger file.");
1195 saveToTileCommand.AddArgument("filename", 1207 saveToTileCommand.AddArgument("filename",
1196 "The file you wish to save to, the file extension determines the loader to be used. Supported extensions include: " + 1208 "The file you wish to save to, the file extension determines the loader to be used. Supported extensions include: " +
1197 m_supportedFileExtensions, "String"); 1209 m_supportFileExtensionsForTileSave, "String");
1198 saveToTileCommand.AddArgument("file width", "The width of the file in tiles", "Integer"); 1210 saveToTileCommand.AddArgument("file width", "The width of the file in tiles", "Integer");
1199 saveToTileCommand.AddArgument("file height", "The height of the file in tiles", "Integer"); 1211 saveToTileCommand.AddArgument("file height", "The height of the file in tiles", "Integer");
1200 saveToTileCommand.AddArgument("minimum X tile", "The X region coordinate of the first section on the file", 1212 saveToTileCommand.AddArgument("minimum X tile", "The X region coordinate of the first section on the file",