aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--OpenSim/ApplicationPlugins/LoadRegions/LoadRegionsPlugin.cs4
-rw-r--r--OpenSim/Region/CoreModules/Scripting/LoadImageURL/LoadImageURLModule.cs57
2 files changed, 40 insertions, 21 deletions
diff --git a/OpenSim/ApplicationPlugins/LoadRegions/LoadRegionsPlugin.cs b/OpenSim/ApplicationPlugins/LoadRegions/LoadRegionsPlugin.cs
index 0065702..e7b12be 100644
--- a/OpenSim/ApplicationPlugins/LoadRegions/LoadRegionsPlugin.cs
+++ b/OpenSim/ApplicationPlugins/LoadRegions/LoadRegionsPlugin.cs
@@ -101,8 +101,8 @@ namespace OpenSim.ApplicationPlugins.LoadRegions
101 m_log.Info("[LOAD REGIONS PLUGIN]: Loading specific shared modules..."); 101 m_log.Info("[LOAD REGIONS PLUGIN]: Loading specific shared modules...");
102 m_log.Info("[LOAD REGIONS PLUGIN]: DynamicTextureModule..."); 102 m_log.Info("[LOAD REGIONS PLUGIN]: DynamicTextureModule...");
103 m_openSim.ModuleLoader.LoadDefaultSharedModule(new DynamicTextureModule()); 103 m_openSim.ModuleLoader.LoadDefaultSharedModule(new DynamicTextureModule());
104 m_log.Info("[LOAD REGIONS PLUGIN]: LoadImageURLModule..."); 104 //m_log.Info("[LOAD REGIONS PLUGIN]: LoadImageURLModule...");
105 m_openSim.ModuleLoader.LoadDefaultSharedModule(new LoadImageURLModule()); 105 //m_openSim.ModuleLoader.LoadDefaultSharedModule(new LoadImageURLModule());
106 m_log.Info("[LOAD REGIONS PLUGIN]: XMLRPCModule..."); 106 m_log.Info("[LOAD REGIONS PLUGIN]: XMLRPCModule...");
107 m_openSim.ModuleLoader.LoadDefaultSharedModule(new XMLRPCModule()); 107 m_openSim.ModuleLoader.LoadDefaultSharedModule(new XMLRPCModule());
108// m_log.Info("[LOADREGIONSPLUGIN]: AssetTransactionModule..."); 108// m_log.Info("[LOADREGIONSPLUGIN]: AssetTransactionModule...");
diff --git a/OpenSim/Region/CoreModules/Scripting/LoadImageURL/LoadImageURLModule.cs b/OpenSim/Region/CoreModules/Scripting/LoadImageURL/LoadImageURLModule.cs
index 45e6527..a08a183 100644
--- a/OpenSim/Region/CoreModules/Scripting/LoadImageURL/LoadImageURLModule.cs
+++ b/OpenSim/Region/CoreModules/Scripting/LoadImageURL/LoadImageURLModule.cs
@@ -37,16 +37,33 @@ using OpenSim.Region.Framework.Interfaces;
37using OpenSim.Region.Framework.Scenes; 37using OpenSim.Region.Framework.Scenes;
38using log4net; 38using log4net;
39using System.Reflection; 39using System.Reflection;
40using Mono.Addins;
40 41
41namespace OpenSim.Region.CoreModules.Scripting.LoadImageURL 42namespace OpenSim.Region.CoreModules.Scripting.LoadImageURL
42{ 43{
43 public class LoadImageURLModule : IRegionModule, IDynamicTextureRender 44 [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "LoadImageURLModule")]
45 public class LoadImageURLModule : ISharedRegionModule, IDynamicTextureRender
44 { 46 {
45 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 47 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
46 48
47 private string m_name = "LoadImageURL"; 49 private string m_name = "LoadImageURL";
48 private Scene m_scene; 50 private Scene m_scene;
49 private IDynamicTextureManager m_textureManager; 51 private IDynamicTextureManager m_textureManager;
52 private IDynamicTextureManager TextureManager
53 {
54 get
55 {
56 if (m_textureManager == null && m_scene != null)
57 {
58 m_textureManager = m_scene.RequestModuleInterface<IDynamicTextureManager>();
59 if (m_textureManager != null)
60 {
61 m_textureManager.RegisterRender(GetContentType(), this);
62 }
63 }
64 return m_textureManager;
65 }
66 }
50 67
51 private string m_proxyurl = ""; 68 private string m_proxyurl = "";
52 private string m_proxyexcepts = ""; 69 private string m_proxyexcepts = "";
@@ -104,29 +121,31 @@ namespace OpenSim.Region.CoreModules.Scripting.LoadImageURL
104 121
105 #endregion 122 #endregion
106 123
107 #region IRegionModule Members 124 #region ISharedRegionModule Members
108 125
109 public void Initialise(Scene scene, IConfigSource config) 126 public void Initialise(IConfigSource config)
110 { 127 {
111 if (m_scene == null)
112 {
113 m_scene = scene;
114 }
115
116 m_proxyurl = config.Configs["Startup"].GetString("HttpProxy"); 128 m_proxyurl = config.Configs["Startup"].GetString("HttpProxy");
117 m_proxyexcepts = config.Configs["Startup"].GetString("HttpProxyExceptions"); 129 m_proxyexcepts = config.Configs["Startup"].GetString("HttpProxyExceptions");
118 } 130 }
119 131
120 public void PostInitialise() 132 public void PostInitialise()
121 { 133 {
122 if (m_scene != null) 134 }
123 { 135
124 m_textureManager = m_scene.RequestModuleInterface<IDynamicTextureManager>(); 136 public void AddRegion(Scene scene)
125 if (m_textureManager != null) 137 {
126 { 138 if (m_scene == null)
127 m_textureManager.RegisterRender(GetContentType(), this); 139 m_scene = scene;
128 } 140
129 } 141 }
142
143 public void RemoveRegion(Scene scene)
144 {
145 }
146
147 public void RegionLoaded(Scene scene)
148 {
130 } 149 }
131 150
132 public void Close() 151 public void Close()
@@ -138,9 +157,9 @@ namespace OpenSim.Region.CoreModules.Scripting.LoadImageURL
138 get { return m_name; } 157 get { return m_name; }
139 } 158 }
140 159
141 public bool IsSharedModule 160 public Type ReplaceableInterface
142 { 161 {
143 get { return true; } 162 get { return null; }
144 } 163 }
145 164
146 #endregion 165 #endregion
@@ -252,7 +271,7 @@ namespace OpenSim.Region.CoreModules.Scripting.LoadImageURL
252 m_log.DebugFormat("[LOADIMAGEURLMODULE]: Returning {0} bytes of image data for request {1}", 271 m_log.DebugFormat("[LOADIMAGEURLMODULE]: Returning {0} bytes of image data for request {1}",
253 imageJ2000.Length, state.RequestID); 272 imageJ2000.Length, state.RequestID);
254 273
255 m_textureManager.ReturnData( 274 TextureManager.ReturnData(
256 state.RequestID, 275 state.RequestID,
257 new OpenSim.Region.CoreModules.Scripting.DynamicTexture.DynamicTexture( 276 new OpenSim.Region.CoreModules.Scripting.DynamicTexture.DynamicTexture(
258 request.RequestUri, null, imageJ2000, newSize, false)); 277 request.RequestUri, null, imageJ2000, newSize, false));