mirror of
https://github.com/opensim/opensim.git
synced 2026-08-12 12:25:42 +08:00
Compare commits
9 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
78cb44c0c9 | ||
|
|
8002eaffb9 | ||
|
|
b10457f04a | ||
|
|
35104e4960 | ||
|
|
5d70f9e34d | ||
|
|
a87969840c | ||
|
|
460ed81f41 | ||
|
|
b4b0d1773a | ||
|
|
46dd8c03bb |
@@ -137,6 +137,18 @@ namespace OpenSim.Region.CoreModules.World.Warp3DMap
|
||||
|
||||
m_mapTilesDirectory =
|
||||
Util.GetConfigVarFromSections<string>(source, "MapTilesDirectory", configSections, m_mapTilesDirectory);
|
||||
if(!string.IsNullOrEmpty(m_mapTilesDirectory))
|
||||
{
|
||||
try
|
||||
{
|
||||
Directory.CreateDirectory(m_mapTilesDirectory);
|
||||
}
|
||||
catch(Exception e)
|
||||
{
|
||||
m_log.Error($"[MAPTILE]: failed to create folder {m_mapTilesDirectory} for local map tiles {e.Message}");
|
||||
m_mapTilesDirectory = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void AddRegion(Scene scene)
|
||||
@@ -215,10 +227,8 @@ namespace OpenSim.Region.CoreModules.World.Warp3DMap
|
||||
// image may be reloaded elsewhere, so no compression format
|
||||
string filename = "MAP-" + m_scene.RegionInfo.RegionID.ToString() + ".png";
|
||||
if (!string.IsNullOrEmpty(m_mapTilesDirectory))
|
||||
{
|
||||
Directory.CreateDirectory(m_mapTilesDirectory);
|
||||
filename = System.IO.Path.Combine(m_mapTilesDirectory, filename);
|
||||
}
|
||||
|
||||
tile.Save(filename,ImageFormat.Png);
|
||||
m_primMesher = null;
|
||||
return tile;
|
||||
|
||||
@@ -27,7 +27,6 @@
|
||||
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Concurrent;
|
||||
using System.Collections.Generic;
|
||||
using System.Drawing;
|
||||
using System.Drawing.Imaging;
|
||||
@@ -161,6 +160,19 @@ namespace OpenSim.Region.CoreModules.World.WorldMap
|
||||
Util.GetConfigVarFromSections<bool>(config, "LocalV1MapAssets", configSections, m_localV1MapAssets);
|
||||
m_mapTilesDirectory =
|
||||
Util.GetConfigVarFromSections<string>(config, "MapTilesDirectory", configSections, m_mapTilesDirectory);
|
||||
if(!string.IsNullOrEmpty(m_mapTilesDirectory))
|
||||
{
|
||||
try
|
||||
{
|
||||
Directory.CreateDirectory(m_mapTilesDirectory);
|
||||
}
|
||||
catch(Exception e)
|
||||
{
|
||||
m_log.Error($"[WORLD MAP]: failed to create folder {m_mapTilesDirectory} for local map tiles {e.Message}");
|
||||
m_mapTilesDirectory = null;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public virtual void AddRegion(Scene scene)
|
||||
@@ -1340,12 +1352,12 @@ namespace OpenSim.Region.CoreModules.World.WorldMap
|
||||
startX--;
|
||||
startY--;
|
||||
|
||||
bool doneLocal = false;
|
||||
bool doneLocal;
|
||||
string filename = "MAP-" + m_scene.RegionInfo.RegionID.ToString() + ".png";
|
||||
if (!string.IsNullOrEmpty(m_mapTilesDirectory))
|
||||
filename = Path.Combine(m_mapTilesDirectory, filename);
|
||||
try
|
||||
{
|
||||
if (!string.IsNullOrEmpty(m_mapTilesDirectory))
|
||||
filename = Path.Combine(m_mapTilesDirectory, filename);
|
||||
using(Image localMap = Bitmap.FromFile(filename))
|
||||
{
|
||||
int x = regionX - startX;
|
||||
@@ -1364,7 +1376,11 @@ namespace OpenSim.Region.CoreModules.World.WorldMap
|
||||
}
|
||||
doneLocal = true;
|
||||
}
|
||||
catch {}
|
||||
catch(Exception ex)
|
||||
{
|
||||
m_log.Error($"[WORLD MAP]: failed Export map file {ex.Message}");
|
||||
return;
|
||||
}
|
||||
|
||||
if(regions.Count > 0)
|
||||
{
|
||||
|
||||
@@ -1337,10 +1337,15 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
{
|
||||
string IDstr = assetID.ToString();
|
||||
AssetBase asset = m_assetService.Get(IDstr, m_assetServerURL, true);
|
||||
if (asset is null)
|
||||
m_log.Debug($"[HGUUIDGatherer]: Failed to fetch asset {IDstr} from {m_assetServerURL}");
|
||||
else
|
||||
m_log.Debug($"[HGUUIDGatherer]: Copied asset {IDstr} from {m_assetServerURL} to local asset server");
|
||||
// Per-asset Debug is expensive (sync File+Console). Only when HTTP debug is on:
|
||||
// debug http all|out N (WebUtil.DebugLevel > 0)
|
||||
if (WebUtil.DebugLevel > 0)
|
||||
{
|
||||
if (asset is null)
|
||||
m_log.Debug($"[HGUUIDGatherer]: Failed to fetch asset {IDstr} from {m_assetServerURL}");
|
||||
else
|
||||
m_log.Debug($"[HGUUIDGatherer]: Copied asset {IDstr} from {m_assetServerURL} to local asset server");
|
||||
}
|
||||
|
||||
return asset;
|
||||
}
|
||||
|
||||
@@ -61,6 +61,10 @@
|
||||
; QueueUserWorkItem, SmartThreadPool, and Thread.
|
||||
async_call_method = SmartThreadPool
|
||||
|
||||
; Min threads to allocate on the FireAndForget thread pool
|
||||
; when running with the SmartThreadPool option above
|
||||
MinPoolThreads = 2
|
||||
|
||||
; Max threads to allocate on the FireAndForget thread pool
|
||||
; when running with the SmartThreadPool option above
|
||||
MaxPoolThreads = 300
|
||||
@@ -470,7 +474,7 @@
|
||||
; Directory used to load and save the generated MAP-<region uuid>.png tile images.
|
||||
; If left empty the current working directory is used (default behaviour).
|
||||
; The directory is created automatically if it does not exist.
|
||||
;MapTilesDirectory = "./maptiles"
|
||||
;MapTilesDirectory = "./localmaptiles"
|
||||
|
||||
; World map blacklist timeout in seconds
|
||||
;BlacklistTimeout = 600
|
||||
|
||||
Reference in New Issue
Block a user