diff options
Add ColladaMesh switch
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/CoreModules/Avatar/Assets/GetMeshModule.cs | 13 |
1 files changed, 11 insertions, 2 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 |