aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Physics/Meshing/Meshmerizer.cs
diff options
context:
space:
mode:
authorBlueWall2010-09-25 22:36:38 -0400
committerMelanie2010-09-26 17:04:11 +0100
commitb0b4782a2b3c7a86195ad09c1c508856c2885f4d (patch)
treec8a1fcd118540b07fb5f30d5a15d8dd0bbbba04e /OpenSim/Region/Physics/Meshing/Meshmerizer.cs
parentSome cleanup to OpenSimDefaults.ini (diff)
downloadopensim-SC_OLD-b0b4782a2b3c7a86195ad09c1c508856c2885f4d.zip
opensim-SC_OLD-b0b4782a2b3c7a86195ad09c1c508856c2885f4d.tar.gz
opensim-SC_OLD-b0b4782a2b3c7a86195ad09c1c508856c2885f4d.tar.bz2
opensim-SC_OLD-b0b4782a2b3c7a86195ad09c1c508856c2885f4d.tar.xz
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/j2kDecodeCache
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/Physics/Meshing/Meshmerizer.cs13
1 files changed, 9 insertions, 4 deletions
diff --git a/OpenSim/Region/Physics/Meshing/Meshmerizer.cs b/OpenSim/Region/Physics/Meshing/Meshmerizer.cs
index fded95e..62f947c 100644
--- a/OpenSim/Region/Physics/Meshing/Meshmerizer.cs
+++ b/OpenSim/Region/Physics/Meshing/Meshmerizer.cs
@@ -35,6 +35,7 @@ using System.Drawing;
35using System.Drawing.Imaging; 35using System.Drawing.Imaging;
36using PrimMesher; 36using PrimMesher;
37using log4net; 37using log4net;
38using Nini.Config;
38using System.Reflection; 39using System.Reflection;
39using System.IO; 40using System.IO;
40 41
@@ -51,9 +52,9 @@ namespace OpenSim.Region.Physics.Meshing
51 return "Meshmerizer"; 52 return "Meshmerizer";
52 } 53 }
53 54
54 public IMesher GetMesher() 55 public IMesher GetMesher(IConfigSource config)
55 { 56 {
56 return new Meshmerizer(); 57 return new Meshmerizer(config);
57 } 58 }
58 } 59 }
59 60
@@ -70,14 +71,18 @@ namespace OpenSim.Region.Physics.Meshing
70#endif 71#endif
71 72
72 private bool cacheSculptMaps = true; 73 private bool cacheSculptMaps = true;
73 private string decodedScultMapPath = "j2kDecodeCache"; 74 private string decodedScultMapPath = null;
74 75
75 private float minSizeForComplexMesh = 0.2f; // prims with all dimensions smaller than this will have a bounding box mesh 76 private float minSizeForComplexMesh = 0.2f; // prims with all dimensions smaller than this will have a bounding box mesh
76 77
77 private Dictionary<ulong, Mesh> m_uniqueMeshes = new Dictionary<ulong, Mesh>(); 78 private Dictionary<ulong, Mesh> m_uniqueMeshes = new Dictionary<ulong, Mesh>();
78 79
79 public Meshmerizer() 80 public Meshmerizer(IConfigSource config)
80 { 81 {
82 IConfig start_config = config.Configs["Startup"];
83
84 decodedScultMapPath = start_config.GetString("DecodedSculpMapPath","j2kDecodeCache");
85
81 try 86 try
82 { 87 {
83 if (!Directory.Exists(decodedScultMapPath)) 88 if (!Directory.Exists(decodedScultMapPath))