aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/CoreModules/Avatar/Assets/GetMeshModule.cs
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2011-04-15 22:49:59 +0100
committerJustin Clark-Casey (justincc)2011-04-15 22:49:59 +0100
commit98c5ed2c79eabb29569a767a85c687dc09fd67f6 (patch)
tree605971b6c6e0a2164e97d72b98011c2fa001a776 /OpenSim/Region/CoreModules/Avatar/Assets/GetMeshModule.cs
parentrefactor: split out some rez code into a separate CreateItemForObject() method (diff)
parentMerge branch 'master' of ssh://opensimulator.org/var/git/opensim (diff)
downloadopensim-SC-98c5ed2c79eabb29569a767a85c687dc09fd67f6.zip
opensim-SC-98c5ed2c79eabb29569a767a85c687dc09fd67f6.tar.gz
opensim-SC-98c5ed2c79eabb29569a767a85c687dc09fd67f6.tar.bz2
opensim-SC-98c5ed2c79eabb29569a767a85c687dc09fd67f6.tar.xz
Merge branch 'master' of ssh://opensimulator.org/var/git/opensim
Diffstat (limited to 'OpenSim/Region/CoreModules/Avatar/Assets/GetMeshModule.cs')
-rw-r--r--OpenSim/Region/CoreModules/Avatar/Assets/GetMeshModule.cs13
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