adding configurable j2kDecodeCache path
allowing the decoded sculpt map cache path to be defined in the configuration files. Use DecodedSculpMapPath in the [Startup] section to set the path. The default is still ./bin/j2kDecodeCacheviewer-2-initial-appearance
parent
8afa21cef0
commit
b0b4782a2b
|
@ -81,7 +81,7 @@ namespace OpenSim.Region.Physics.Manager
|
|||
if (_MeshPlugins.ContainsKey(meshEngineName))
|
||||
{
|
||||
m_log.Info("[PHYSICS]: creating meshing engine " + meshEngineName);
|
||||
meshEngine = _MeshPlugins[meshEngineName].GetMesher();
|
||||
meshEngine = _MeshPlugins[meshEngineName].GetMesher(config);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -234,6 +234,6 @@ namespace OpenSim.Region.Physics.Manager
|
|||
public interface IMeshingPlugin
|
||||
{
|
||||
string GetName();
|
||||
IMesher GetMesher();
|
||||
IMesher GetMesher(IConfigSource config);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -28,6 +28,7 @@
|
|||
using System;
|
||||
using OpenSim.Framework;
|
||||
using OpenMetaverse;
|
||||
using Nini.Config;
|
||||
|
||||
/*
|
||||
* This is the zero mesher.
|
||||
|
@ -53,7 +54,7 @@ namespace OpenSim.Region.Physics.Manager
|
|||
return "ZeroMesher";
|
||||
}
|
||||
|
||||
public IMesher GetMesher()
|
||||
public IMesher GetMesher(IConfigSource config)
|
||||
{
|
||||
return new ZeroMesher();
|
||||
}
|
||||
|
|
|
@ -35,6 +35,7 @@ using System.Drawing;
|
|||
using System.Drawing.Imaging;
|
||||
using PrimMesher;
|
||||
using log4net;
|
||||
using Nini.Config;
|
||||
using System.Reflection;
|
||||
using System.IO;
|
||||
|
||||
|
@ -51,9 +52,9 @@ namespace OpenSim.Region.Physics.Meshing
|
|||
return "Meshmerizer";
|
||||
}
|
||||
|
||||
public IMesher GetMesher()
|
||||
public IMesher GetMesher(IConfigSource config)
|
||||
{
|
||||
return new Meshmerizer();
|
||||
return new Meshmerizer(config);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -70,14 +71,18 @@ namespace OpenSim.Region.Physics.Meshing
|
|||
#endif
|
||||
|
||||
private bool cacheSculptMaps = true;
|
||||
private string decodedScultMapPath = "j2kDecodeCache";
|
||||
private string decodedScultMapPath = null;
|
||||
|
||||
private float minSizeForComplexMesh = 0.2f; // prims with all dimensions smaller than this will have a bounding box mesh
|
||||
|
||||
private Dictionary<ulong, Mesh> m_uniqueMeshes = new Dictionary<ulong, Mesh>();
|
||||
|
||||
public Meshmerizer()
|
||||
public Meshmerizer(IConfigSource config)
|
||||
{
|
||||
IConfig start_config = config.Configs["Startup"];
|
||||
|
||||
decodedScultMapPath = start_config.GetString("DecodedSculpMapPath","j2kDecodeCache");
|
||||
|
||||
try
|
||||
{
|
||||
if (!Directory.Exists(decodedScultMapPath))
|
||||
|
|
|
@ -48,6 +48,10 @@ namespace OpenSim.Region.Physics.OdePlugin
|
|||
[SetUp]
|
||||
public void Initialize()
|
||||
{
|
||||
IConfigSource TopConfig = new IniConfigSource();
|
||||
IConfig config = TopConfig.AddConfig("Startup");
|
||||
config.Set("DecodedSculpMapPath","j2kDecodeCache");
|
||||
|
||||
// Loading ODEPlugin
|
||||
cbt = new OdePlugin();
|
||||
// Loading Zero Mesher
|
||||
|
@ -55,7 +59,7 @@ namespace OpenSim.Region.Physics.OdePlugin
|
|||
// Getting Physics Scene
|
||||
ps = cbt.GetScene("test");
|
||||
// Initializing Physics Scene.
|
||||
ps.Initialise(imp.GetMesher(),null);
|
||||
ps.Initialise(imp.GetMesher(TopConfig),null);
|
||||
float[] _heightmap = new float[(int)Constants.RegionSize * (int)Constants.RegionSize];
|
||||
for (int i = 0; i < ((int)Constants.RegionSize * (int)Constants.RegionSize); i++)
|
||||
{
|
||||
|
|
|
@ -1003,14 +1003,8 @@
|
|||
; false to allow script controlled underground positioning of
|
||||
; prims
|
||||
; DisableUndergroundMovement = true
|
||||
<<<<<<< HEAD:bin/OpenSimDefaults.ini
|
||||
|
||||
; Path to script engine assemblies
|
||||
; Default is ./bin/ScriptEngines
|
||||
=======
|
||||
|
||||
;; Path to script assemblies
|
||||
>>>>>>> 298b4c0... Some cleanup to OpenSimDefaults.ini:OpenSim/Region/Application/OpenSimDefaults.ini
|
||||
; ScriptEnginesPath = "ScriptEngines"
|
||||
|
||||
[OpenGridProtocol]
|
||||
|
|
Loading…
Reference in New Issue