aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment
diff options
context:
space:
mode:
authorMW2007-09-04 20:21:03 +0000
committerMW2007-09-04 20:21:03 +0000
commitc014ea1510137b103dfa9b98dc01bf2081dad382 (patch)
treeda417ac577b198c23dd0ddc1f0f779520a3ce790 /OpenSim/Region/Environment
parentFixed it so "shutdown" command works when a region is set as the active conso... (diff)
downloadopensim-SC_OLD-c014ea1510137b103dfa9b98dc01bf2081dad382.zip
opensim-SC_OLD-c014ea1510137b103dfa9b98dc01bf2081dad382.tar.gz
opensim-SC_OLD-c014ea1510137b103dfa9b98dc01bf2081dad382.tar.bz2
opensim-SC_OLD-c014ea1510137b103dfa9b98dc01bf2081dad382.tar.xz
Added partial help info when calling "help" command with a region set.
Added AddDynamicTextureData() to DynamicTextureModule, so that a script (or another module even) can create a dynamic texture by passing a string with the data in, rather than a url. This could be used for anything from a script passing a basic text string (and having it rendered to a texture) or the script building its own html document.
Diffstat (limited to 'OpenSim/Region/Environment')
-rw-r--r--OpenSim/Region/Environment/Interfaces/IDynamicTextureManager.cs3
-rw-r--r--OpenSim/Region/Environment/Modules/DynamicTextureModule.cs28
-rw-r--r--OpenSim/Region/Environment/Scenes/Scene.cs10
3 files changed, 38 insertions, 3 deletions
diff --git a/OpenSim/Region/Environment/Interfaces/IDynamicTextureManager.cs b/OpenSim/Region/Environment/Interfaces/IDynamicTextureManager.cs
index 4da5a7e..8fdfa8f 100644
--- a/OpenSim/Region/Environment/Interfaces/IDynamicTextureManager.cs
+++ b/OpenSim/Region/Environment/Interfaces/IDynamicTextureManager.cs
@@ -11,6 +11,7 @@ namespace OpenSim.Region.Environment.Interfaces
11 void RegisterRender(string handleType, IDynamicTextureRender render); 11 void RegisterRender(string handleType, IDynamicTextureRender render);
12 void ReturnData(LLUUID id, byte[] data); 12 void ReturnData(LLUUID id, byte[] data);
13 LLUUID AddDynamicTextureURL(LLUUID simID, LLUUID primID, string contentType, string url, string extraParams, int updateTimer); 13 LLUUID AddDynamicTextureURL(LLUUID simID, LLUUID primID, string contentType, string url, string extraParams, int updateTimer);
14 LLUUID AddDynamicTextureData(LLUUID simID, LLUUID primID, string contentType, string data, string extraParams, int updateTimer);
14 } 15 }
15 16
16 public interface IDynamicTextureRender 17 public interface IDynamicTextureRender
@@ -21,6 +22,6 @@ namespace OpenSim.Region.Environment.Interfaces
21 byte[] ConvertUrl(string url, string extraParams); 22 byte[] ConvertUrl(string url, string extraParams);
22 byte[] ConvertStream(Stream data, string extraParams); 23 byte[] ConvertStream(Stream data, string extraParams);
23 bool AsyncConvertUrl(LLUUID id, string url, string extraParams); 24 bool AsyncConvertUrl(LLUUID id, string url, string extraParams);
24 bool AsyncConvertStream(LLUUID id, Stream data, string extraParams); 25 bool AsyncConvertData(LLUUID id, string bodyData, string extraParams);
25 } 26 }
26} 27}
diff --git a/OpenSim/Region/Environment/Modules/DynamicTextureModule.cs b/OpenSim/Region/Environment/Modules/DynamicTextureModule.cs
index 6edebe7..3a03d48 100644
--- a/OpenSim/Region/Environment/Modules/DynamicTextureModule.cs
+++ b/OpenSim/Region/Environment/Modules/DynamicTextureModule.cs
@@ -95,13 +95,37 @@ namespace OpenSim.Region.Environment.Modules
95 return LLUUID.Zero; 95 return LLUUID.Zero;
96 } 96 }
97 97
98 public LLUUID AddDynamicTextureData(LLUUID simID, LLUUID primID, string contentType, string data, string extraParams, int updateTimer)
99 {
100 if (this.RenderPlugins.ContainsKey(contentType))
101 {
102 DynamicTextureUpdater updater = new DynamicTextureUpdater();
103 updater.SimUUID = simID;
104 updater.PrimID = primID;
105 updater.ContentType = contentType;
106 updater.BodyData = data;
107 updater.UpdateTimer = updateTimer;
108 updater.UpdaterID = LLUUID.Random();
109 updater.Params = extraParams;
110
111 if (!this.Updaters.ContainsKey(updater.UpdaterID))
112 {
113 Updaters.Add(updater.UpdaterID, updater);
114 }
115
116 RenderPlugins[contentType].AsyncConvertData(updater.UpdaterID, data, extraParams);
117 return updater.UpdaterID;
118 }
119 return LLUUID.Zero;
120 }
121
98 public class DynamicTextureUpdater 122 public class DynamicTextureUpdater
99 { 123 {
100 public LLUUID SimUUID; 124 public LLUUID SimUUID;
101 public LLUUID UpdaterID; 125 public LLUUID UpdaterID;
102 public string ContentType; 126 public string ContentType;
103 public string Url; 127 public string Url;
104 public Stream StreamData; 128 public string BodyData;
105 public LLUUID PrimID; 129 public LLUUID PrimID;
106 public int UpdateTimer; 130 public int UpdateTimer;
107 public LLUUID LastAssetID; 131 public LLUUID LastAssetID;
@@ -111,7 +135,7 @@ namespace OpenSim.Region.Environment.Modules
111 { 135 {
112 LastAssetID = LLUUID.Zero; 136 LastAssetID = LLUUID.Zero;
113 UpdateTimer = 0; 137 UpdateTimer = 0;
114 StreamData = null; 138 BodyData = null;
115 } 139 }
116 140
117 public void DataReceived(byte[] data, Scene scene) 141 public void DataReceived(byte[] data, Scene scene)
diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs
index dca4222..3ea9678 100644
--- a/OpenSim/Region/Environment/Scenes/Scene.cs
+++ b/OpenSim/Region/Environment/Scenes/Scene.cs
@@ -1233,6 +1233,16 @@ namespace OpenSim.Region.Environment.Scenes
1233 { 1233 {
1234 switch (command) 1234 switch (command)
1235 { 1235 {
1236 case "help":
1237 MainLog.Instance.Error("alert - send alert to a designated user or all users.");
1238 MainLog.Instance.Error(" alert [First] [Last] [Message] - send an alert to a user. Case sensitive.");
1239 MainLog.Instance.Error(" alert general [Message] - send an alert to all users.");
1240 MainLog.Instance.Error("backup - trigger a region backup");
1241 MainLog.Instance.Error("load-xml [filename] - load prims from a XML file into current region");
1242 MainLog.Instance.Error("save-xml [filename] - save prims from current region to a XML file");
1243 MainLog.Instance.Error("show users - show info about connected users in the current region.");
1244 MainLog.Instance.Error("shutdown - disconnect all clients and shutdown.");
1245 break;
1236 case "show": 1246 case "show":
1237 if (cmdparams.Length > 0) 1247 if (cmdparams.Length > 0)
1238 { 1248 {