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.afrisby
parent
e58a5c7a95
commit
c014ea1510
|
@ -11,6 +11,7 @@ namespace OpenSim.Region.Environment.Interfaces
|
||||||
void RegisterRender(string handleType, IDynamicTextureRender render);
|
void RegisterRender(string handleType, IDynamicTextureRender render);
|
||||||
void ReturnData(LLUUID id, byte[] data);
|
void ReturnData(LLUUID id, byte[] data);
|
||||||
LLUUID AddDynamicTextureURL(LLUUID simID, LLUUID primID, string contentType, string url, string extraParams, int updateTimer);
|
LLUUID AddDynamicTextureURL(LLUUID simID, LLUUID primID, string contentType, string url, string extraParams, int updateTimer);
|
||||||
|
LLUUID AddDynamicTextureData(LLUUID simID, LLUUID primID, string contentType, string data, string extraParams, int updateTimer);
|
||||||
}
|
}
|
||||||
|
|
||||||
public interface IDynamicTextureRender
|
public interface IDynamicTextureRender
|
||||||
|
@ -21,6 +22,6 @@ namespace OpenSim.Region.Environment.Interfaces
|
||||||
byte[] ConvertUrl(string url, string extraParams);
|
byte[] ConvertUrl(string url, string extraParams);
|
||||||
byte[] ConvertStream(Stream data, string extraParams);
|
byte[] ConvertStream(Stream data, string extraParams);
|
||||||
bool AsyncConvertUrl(LLUUID id, string url, string extraParams);
|
bool AsyncConvertUrl(LLUUID id, string url, string extraParams);
|
||||||
bool AsyncConvertStream(LLUUID id, Stream data, string extraParams);
|
bool AsyncConvertData(LLUUID id, string bodyData, string extraParams);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -95,13 +95,37 @@ namespace OpenSim.Region.Environment.Modules
|
||||||
return LLUUID.Zero;
|
return LLUUID.Zero;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public LLUUID AddDynamicTextureData(LLUUID simID, LLUUID primID, string contentType, string data, string extraParams, int updateTimer)
|
||||||
|
{
|
||||||
|
if (this.RenderPlugins.ContainsKey(contentType))
|
||||||
|
{
|
||||||
|
DynamicTextureUpdater updater = new DynamicTextureUpdater();
|
||||||
|
updater.SimUUID = simID;
|
||||||
|
updater.PrimID = primID;
|
||||||
|
updater.ContentType = contentType;
|
||||||
|
updater.BodyData = data;
|
||||||
|
updater.UpdateTimer = updateTimer;
|
||||||
|
updater.UpdaterID = LLUUID.Random();
|
||||||
|
updater.Params = extraParams;
|
||||||
|
|
||||||
|
if (!this.Updaters.ContainsKey(updater.UpdaterID))
|
||||||
|
{
|
||||||
|
Updaters.Add(updater.UpdaterID, updater);
|
||||||
|
}
|
||||||
|
|
||||||
|
RenderPlugins[contentType].AsyncConvertData(updater.UpdaterID, data, extraParams);
|
||||||
|
return updater.UpdaterID;
|
||||||
|
}
|
||||||
|
return LLUUID.Zero;
|
||||||
|
}
|
||||||
|
|
||||||
public class DynamicTextureUpdater
|
public class DynamicTextureUpdater
|
||||||
{
|
{
|
||||||
public LLUUID SimUUID;
|
public LLUUID SimUUID;
|
||||||
public LLUUID UpdaterID;
|
public LLUUID UpdaterID;
|
||||||
public string ContentType;
|
public string ContentType;
|
||||||
public string Url;
|
public string Url;
|
||||||
public Stream StreamData;
|
public string BodyData;
|
||||||
public LLUUID PrimID;
|
public LLUUID PrimID;
|
||||||
public int UpdateTimer;
|
public int UpdateTimer;
|
||||||
public LLUUID LastAssetID;
|
public LLUUID LastAssetID;
|
||||||
|
@ -111,7 +135,7 @@ namespace OpenSim.Region.Environment.Modules
|
||||||
{
|
{
|
||||||
LastAssetID = LLUUID.Zero;
|
LastAssetID = LLUUID.Zero;
|
||||||
UpdateTimer = 0;
|
UpdateTimer = 0;
|
||||||
StreamData = null;
|
BodyData = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void DataReceived(byte[] data, Scene scene)
|
public void DataReceived(byte[] data, Scene scene)
|
||||||
|
|
|
@ -1233,6 +1233,16 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
{
|
{
|
||||||
switch (command)
|
switch (command)
|
||||||
{
|
{
|
||||||
|
case "help":
|
||||||
|
MainLog.Instance.Error("alert - send alert to a designated user or all users.");
|
||||||
|
MainLog.Instance.Error(" alert [First] [Last] [Message] - send an alert to a user. Case sensitive.");
|
||||||
|
MainLog.Instance.Error(" alert general [Message] - send an alert to all users.");
|
||||||
|
MainLog.Instance.Error("backup - trigger a region backup");
|
||||||
|
MainLog.Instance.Error("load-xml [filename] - load prims from a XML file into current region");
|
||||||
|
MainLog.Instance.Error("save-xml [filename] - save prims from current region to a XML file");
|
||||||
|
MainLog.Instance.Error("show users - show info about connected users in the current region.");
|
||||||
|
MainLog.Instance.Error("shutdown - disconnect all clients and shutdown.");
|
||||||
|
break;
|
||||||
case "show":
|
case "show":
|
||||||
if (cmdparams.Length > 0)
|
if (cmdparams.Length > 0)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue