From dcfd54b7608093d509cd045a152a4cde7317f66f Mon Sep 17 00:00:00 2001 From: onefang Date: Tue, 8 Sep 2020 21:17:45 +1000 Subject: Move various paths out of the bin directory. --- OpenSim/Region/CoreModules/World/Warp3DMap/Warp3DImageModule.cs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'OpenSim/Region/CoreModules/World') diff --git a/OpenSim/Region/CoreModules/World/Warp3DMap/Warp3DImageModule.cs b/OpenSim/Region/CoreModules/World/Warp3DMap/Warp3DImageModule.cs index 4c922ba..ce5e167 100644 --- a/OpenSim/Region/CoreModules/World/Warp3DMap/Warp3DImageModule.cs +++ b/OpenSim/Region/CoreModules/World/Warp3DMap/Warp3DImageModule.cs @@ -83,6 +83,7 @@ namespace OpenSim.Region.CoreModules.World.Warp3DMap private bool m_texturePrims = true; // true if should texture the rendered prims private float m_texturePrimSize = 48f; // size of prim before we consider texturing it private bool m_renderMeshes = false; // true if to render meshes rather than just bounding boxes + private String m_cacheDirectory = ""; private float m_renderMinHeight = -100f; private float m_renderMaxHeight = 4096f; @@ -119,6 +120,11 @@ namespace OpenSim.Region.CoreModules.World.Warp3DMap Util.GetConfigVarFromSections(m_config, "TexturePrimSize", configSections, m_texturePrimSize); m_renderMeshes = Util.GetConfigVarFromSections(m_config, "RenderMeshes", configSections, m_renderMeshes); + m_cacheDirectory + = Util.GetConfigVarFromSections(m_config, "CacheDirectory", configSections, System.IO.Path.Combine(Util.cacheDir(), "MapImageCache")); + + if (!Directory.Exists(m_cacheDirectory)) + Directory.CreateDirectory(m_cacheDirectory); m_renderMaxHeight = Util.GetConfigVarFromSections(m_config, "RenderMaxHeight", configSections, m_renderMaxHeight); m_renderMinHeight = Util.GetConfigVarFromSections(m_config, "RenderMinHeight", configSections, m_renderMinHeight); @@ -210,7 +216,7 @@ namespace OpenSim.Region.CoreModules.World.Warp3DMap Bitmap tile = GenImage(); // image may be reloaded elsewhere, so no compression format - string filename = "MAP-" + m_scene.RegionInfo.RegionID.ToString() + ".png"; + string filename = System.IO.Path.Combine(m_cacheDirectory,"MAP-" + m_scene.RegionInfo.RegionID.ToString() + ".png"); tile.Save(filename, ImageFormat.Png); m_primMesher = null; return tile; -- cgit v1.1