aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Modules
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/Modules
parentFixed it so "shutdown" command works when a region is set as the active conso... (diff)
downloadopensim-SC-c014ea1510137b103dfa9b98dc01bf2081dad382.zip
opensim-SC-c014ea1510137b103dfa9b98dc01bf2081dad382.tar.gz
opensim-SC-c014ea1510137b103dfa9b98dc01bf2081dad382.tar.bz2
opensim-SC-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/Modules')
-rw-r--r--OpenSim/Region/Environment/Modules/DynamicTextureModule.cs28
1 files changed, 26 insertions, 2 deletions
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)