aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorBlueWall2011-04-13 16:10:18 -0400
committerBlueWall2011-04-13 16:10:18 -0400
commitdec9c2283b548818409c91a93307334d1c0d9774 (patch)
tree8b082873ed1147dd03ebec27415e2988cd2b8934
parentMerge branch 'master' of /home/git/repo/OpenSim (diff)
downloadopensim-SC-dec9c2283b548818409c91a93307334d1c0d9774.zip
opensim-SC-dec9c2283b548818409c91a93307334d1c0d9774.tar.gz
opensim-SC-dec9c2283b548818409c91a93307334d1c0d9774.tar.bz2
opensim-SC-dec9c2283b548818409c91a93307334d1c0d9774.tar.xz
Add ColladaMesh switch
-rw-r--r--OpenSim/Region/CoreModules/Avatar/Assets/GetMeshModule.cs13
-rw-r--r--OpenSim/Region/CoreModules/Avatar/Assets/NewFileAgentInventoryVariablePriceModule.cs11
-rw-r--r--bin/OpenSimDefaults.ini6
3 files changed, 26 insertions, 4 deletions
diff --git a/OpenSim/Region/CoreModules/Avatar/Assets/GetMeshModule.cs b/OpenSim/Region/CoreModules/Avatar/Assets/GetMeshModule.cs
index 878242a..d2278bc 100644
--- a/OpenSim/Region/CoreModules/Avatar/Assets/GetMeshModule.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Assets/GetMeshModule.cs
@@ -54,6 +54,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Assets
54 54
55 private Scene m_scene; 55 private Scene m_scene;
56 private IAssetService m_assetService; 56 private IAssetService m_assetService;
57 private bool m_enabled = true;
57 58
58 #region IRegionModuleBase Members 59 #region IRegionModuleBase Members
59 60
@@ -65,7 +66,12 @@ namespace OpenSim.Region.CoreModules.Avatar.Assets
65 66
66 public void Initialise(IConfigSource source) 67 public void Initialise(IConfigSource source)
67 { 68 {
68 69 IConfig startupConfig = source.Configs["Startup"];
70 if (startupConfig == null)
71 return;
72
73 if (!startupConfig.GetBoolean("ColladaMesh",true))
74 m_enabled = false;
69 } 75 }
70 76
71 public void AddRegion(Scene pScene) 77 public void AddRegion(Scene pScene)
@@ -101,16 +107,19 @@ namespace OpenSim.Region.CoreModules.Avatar.Assets
101 107
102 public void RegisterCaps(UUID agentID, Caps caps) 108 public void RegisterCaps(UUID agentID, Caps caps)
103 { 109 {
110 if(!m_enabled)
111 return;
112
104 UUID capID = UUID.Random(); 113 UUID capID = UUID.Random();
105 114
106// m_log.Info("[GETMESH]: /CAPS/" + capID); 115// m_log.Info("[GETMESH]: /CAPS/" + capID);
116
107 caps.RegisterHandler("GetMesh", 117 caps.RegisterHandler("GetMesh",
108 new RestHTTPHandler("GET", "/CAPS/" + capID, 118 new RestHTTPHandler("GET", "/CAPS/" + capID,
109 delegate(Hashtable m_dhttpMethod) 119 delegate(Hashtable m_dhttpMethod)
110 { 120 {
111 return ProcessGetMesh(m_dhttpMethod, agentID, caps); 121 return ProcessGetMesh(m_dhttpMethod, agentID, caps);
112 })); 122 }));
113
114 } 123 }
115 124
116 #endregion 125 #endregion
diff --git a/OpenSim/Region/CoreModules/Avatar/Assets/NewFileAgentInventoryVariablePriceModule.cs b/OpenSim/Region/CoreModules/Avatar/Assets/NewFileAgentInventoryVariablePriceModule.cs
index 4a42c93..fb07cc9 100644
--- a/OpenSim/Region/CoreModules/Avatar/Assets/NewFileAgentInventoryVariablePriceModule.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Assets/NewFileAgentInventoryVariablePriceModule.cs
@@ -56,6 +56,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Assets
56 private Scene m_scene; 56 private Scene m_scene;
57// private IAssetService m_assetService; 57// private IAssetService m_assetService;
58 private bool m_dumpAssetsToFile = false; 58 private bool m_dumpAssetsToFile = false;
59 private bool m_enabled = true;
59 60
60 #region IRegionModuleBase Members 61 #region IRegionModuleBase Members
61 62
@@ -67,7 +68,12 @@ namespace OpenSim.Region.CoreModules.Avatar.Assets
67 68
68 public void Initialise(IConfigSource source) 69 public void Initialise(IConfigSource source)
69 { 70 {
70 71 IConfig startupConfig = source.Configs["Startup"];
72 if (startupConfig == null)
73 return;
74
75 if (!startupConfig.GetBoolean("ColladaMesh",true))
76 m_enabled = false;
71 } 77 }
72 78
73 public void AddRegion(Scene pScene) 79 public void AddRegion(Scene pScene)
@@ -103,6 +109,9 @@ namespace OpenSim.Region.CoreModules.Avatar.Assets
103 109
104 public void RegisterCaps(UUID agentID, Caps caps) 110 public void RegisterCaps(UUID agentID, Caps caps)
105 { 111 {
112 if(!m_enabled)
113 return;
114
106 UUID capID = UUID.Random(); 115 UUID capID = UUID.Random();
107 116
108// m_log.Debug("[NEW FILE AGENT INVENTORY VARIABLE PRICE]: /CAPS/" + capID); 117// m_log.Debug("[NEW FILE AGENT INVENTORY VARIABLE PRICE]: /CAPS/" + capID);
diff --git a/bin/OpenSimDefaults.ini b/bin/OpenSimDefaults.ini
index f857b8d..107e859 100644
--- a/bin/OpenSimDefaults.ini
+++ b/bin/OpenSimDefaults.ini
@@ -154,7 +154,11 @@
154 ; mesh, and use it for collisions. This is currently experimental code and enabling 154 ; mesh, and use it for collisions. This is currently experimental code and enabling
155 ; it may cause unexpected physics problems. 155 ; it may cause unexpected physics problems.
156 ;UseMeshiesPhysicsMesh = false 156 ;UseMeshiesPhysicsMesh = false
157 157
158 ; enable / disable Collada mesh support
159 ; default is true
160 ; ColladaMesh = true
161
158 ; Choose one of the physics engines below 162 ; Choose one of the physics engines below
159 ; OpenDynamicsEngine is by some distance the most developed physics engine 163 ; OpenDynamicsEngine is by some distance the most developed physics engine
160 ; basicphysics effectively does not model physics at all, making all objects phantom 164 ; basicphysics effectively does not model physics at all, making all objects phantom