One more module: DynamicTextureModule. Removed it from the special load in the beginning.

integration
Diva Canto 2012-11-11 14:54:40 -08:00
parent 6759ed1013
commit 9f45198516
2 changed files with 30 additions and 14 deletions

View File

@ -99,8 +99,8 @@ namespace OpenSim.ApplicationPlugins.LoadRegions
RegionInfo[] regionsToLoad = regionLoader.LoadRegions(); RegionInfo[] regionsToLoad = regionLoader.LoadRegions();
m_log.Info("[LOAD REGIONS PLUGIN]: Loading specific shared modules..."); m_log.Info("[LOAD REGIONS PLUGIN]: Loading specific shared modules...");
m_log.Info("[LOAD REGIONS PLUGIN]: DynamicTextureModule..."); //m_log.Info("[LOAD REGIONS PLUGIN]: DynamicTextureModule...");
m_openSim.ModuleLoader.LoadDefaultSharedModule(new DynamicTextureModule()); //m_openSim.ModuleLoader.LoadDefaultSharedModule(new DynamicTextureModule());
//m_log.Info("[LOAD REGIONS PLUGIN]: LoadImageURLModule..."); //m_log.Info("[LOAD REGIONS PLUGIN]: LoadImageURLModule...");
//m_openSim.ModuleLoader.LoadDefaultSharedModule(new LoadImageURLModule()); //m_openSim.ModuleLoader.LoadDefaultSharedModule(new LoadImageURLModule());
m_log.Info("[LOAD REGIONS PLUGIN]: XMLRPCModule..."); m_log.Info("[LOAD REGIONS PLUGIN]: XMLRPCModule...");

View File

@ -37,10 +37,12 @@ using OpenSim.Region.Framework.Interfaces;
using OpenSim.Region.Framework.Scenes; using OpenSim.Region.Framework.Scenes;
using log4net; using log4net;
using System.Reflection; using System.Reflection;
using Mono.Addins;
namespace OpenSim.Region.CoreModules.Scripting.DynamicTexture namespace OpenSim.Region.CoreModules.Scripting.DynamicTexture
{ {
public class DynamicTextureModule : IRegionModule, IDynamicTextureManager [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "DynamicTextureModule")]
public class DynamicTextureModule : ISharedRegionModule, IDynamicTextureManager
{ {
// private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); // private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
@ -323,17 +325,30 @@ namespace OpenSim.Region.CoreModules.Scripting.DynamicTexture
#endregion #endregion
#region IRegionModule Members #region ISharedRegionModule Members
public void Initialise(Scene scene, IConfigSource config) public void Initialise(IConfigSource config)
{ {
IConfig texturesConfig = config.Configs["Textures"]; IConfig texturesConfig = config.Configs["Textures"];
if (texturesConfig != null) if (texturesConfig != null)
{ {
ReuseTextures = texturesConfig.GetBoolean("ReuseDynamicTextures", false); ReuseTextures = texturesConfig.GetBoolean("ReuseDynamicTextures", false);
ReuseLowDataTextures = texturesConfig.GetBoolean("ReuseDynamicLowDataTextures", false); ReuseLowDataTextures = texturesConfig.GetBoolean("ReuseDynamicLowDataTextures", false);
if (ReuseTextures)
{
m_reuseableDynamicTextures = new Cache(CacheMedium.Memory, CacheStrategy.Conservative);
m_reuseableDynamicTextures.DefaultTTL = new TimeSpan(24, 0, 0);
}
}
} }
public void PostInitialise()
{
}
public void AddRegion(Scene scene)
{
if (!RegisteredScenes.ContainsKey(scene.RegionInfo.RegionID)) if (!RegisteredScenes.ContainsKey(scene.RegionInfo.RegionID))
{ {
RegisteredScenes.Add(scene.RegionInfo.RegionID, scene); RegisteredScenes.Add(scene.RegionInfo.RegionID, scene);
@ -341,13 +356,14 @@ namespace OpenSim.Region.CoreModules.Scripting.DynamicTexture
} }
} }
public void PostInitialise() public void RegionLoaded(Scene scene)
{ {
if (ReuseTextures)
{
m_reuseableDynamicTextures = new Cache(CacheMedium.Memory, CacheStrategy.Conservative);
m_reuseableDynamicTextures.DefaultTTL = new TimeSpan(24, 0, 0);
} }
public void RemoveRegion(Scene scene)
{
if (RegisteredScenes.ContainsKey(scene.RegionInfo.RegionID))
RegisteredScenes.Remove(scene.RegionInfo.RegionID);
} }
public void Close() public void Close()
@ -359,9 +375,9 @@ namespace OpenSim.Region.CoreModules.Scripting.DynamicTexture
get { return "DynamicTextureModule"; } get { return "DynamicTextureModule"; }
} }
public bool IsSharedModule public Type ReplaceableInterface
{ {
get { return true; } get { return null; }
} }
#endregion #endregion