Add ColladaMesh switch

bulletsim
BlueWall 2011-04-13 16:10:18 -04:00
parent d3457eae7a
commit dec9c2283b
3 changed files with 26 additions and 4 deletions

View File

@ -54,6 +54,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Assets
private Scene m_scene;
private IAssetService m_assetService;
private bool m_enabled = true;
#region IRegionModuleBase Members
@ -65,7 +66,12 @@ namespace OpenSim.Region.CoreModules.Avatar.Assets
public void Initialise(IConfigSource source)
{
IConfig startupConfig = source.Configs["Startup"];
if (startupConfig == null)
return;
if (!startupConfig.GetBoolean("ColladaMesh",true))
m_enabled = false;
}
public void AddRegion(Scene pScene)
@ -101,16 +107,19 @@ namespace OpenSim.Region.CoreModules.Avatar.Assets
public void RegisterCaps(UUID agentID, Caps caps)
{
if(!m_enabled)
return;
UUID capID = UUID.Random();
// m_log.Info("[GETMESH]: /CAPS/" + capID);
caps.RegisterHandler("GetMesh",
new RestHTTPHandler("GET", "/CAPS/" + capID,
delegate(Hashtable m_dhttpMethod)
{
return ProcessGetMesh(m_dhttpMethod, agentID, caps);
}));
}
#endregion

View File

@ -56,6 +56,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Assets
private Scene m_scene;
// private IAssetService m_assetService;
private bool m_dumpAssetsToFile = false;
private bool m_enabled = true;
#region IRegionModuleBase Members
@ -67,7 +68,12 @@ namespace OpenSim.Region.CoreModules.Avatar.Assets
public void Initialise(IConfigSource source)
{
IConfig startupConfig = source.Configs["Startup"];
if (startupConfig == null)
return;
if (!startupConfig.GetBoolean("ColladaMesh",true))
m_enabled = false;
}
public void AddRegion(Scene pScene)
@ -103,6 +109,9 @@ namespace OpenSim.Region.CoreModules.Avatar.Assets
public void RegisterCaps(UUID agentID, Caps caps)
{
if(!m_enabled)
return;
UUID capID = UUID.Random();
// m_log.Debug("[NEW FILE AGENT INVENTORY VARIABLE PRICE]: /CAPS/" + capID);

View File

@ -154,7 +154,11 @@
; mesh, and use it for collisions. This is currently experimental code and enabling
; it may cause unexpected physics problems.
;UseMeshiesPhysicsMesh = false
; enable / disable Collada mesh support
; default is true
; ColladaMesh = true
; Choose one of the physics engines below
; OpenDynamicsEngine is by some distance the most developed physics engine
; basicphysics effectively does not model physics at all, making all objects phantom