mirror of
https://github.com/opensim/opensim.git
synced 2026-07-31 13:55:35 +08:00
From: Alan Webb <alan_webb@us.ibm.com>
Changes to support client-side image pre-caching in the region. This commit adds an additional calling sequence to the DynamicTexture data and URL calls. The new interface allows a dynamic image to be loaded into a specific object face (rather than the mandatory ALL_SIDES supported today. This is in part fulfilment of ticket #458.
This commit is contained in:
@@ -427,6 +427,28 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
return UUID.Zero.ToString();
|
||||
}
|
||||
|
||||
public string osSetDynamicTextureURLBlendFace(string dynamicID, string contentType, string url, string extraParams,
|
||||
bool blend, int timer, int alpha, int face)
|
||||
{
|
||||
CheckThreatLevel(ThreatLevel.VeryLow, "osSetDynamicTextureURLBlendFace");
|
||||
|
||||
m_host.AddScriptLPS(1);
|
||||
if (dynamicID == String.Empty)
|
||||
{
|
||||
IDynamicTextureManager textureManager = World.RequestModuleInterface<IDynamicTextureManager>();
|
||||
UUID createdTexture =
|
||||
textureManager.AddDynamicTextureURL(World.RegionInfo.RegionID, m_host.UUID, contentType, url,
|
||||
extraParams, timer, blend, (byte) alpha, face);
|
||||
return createdTexture.ToString();
|
||||
}
|
||||
else
|
||||
{
|
||||
//TODO update existing dynamic textures
|
||||
}
|
||||
|
||||
return UUID.Zero.ToString();
|
||||
}
|
||||
|
||||
public string osSetDynamicTextureData(string dynamicID, string contentType, string data, string extraParams,
|
||||
int timer)
|
||||
{
|
||||
@@ -485,6 +507,35 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
return UUID.Zero.ToString();
|
||||
}
|
||||
|
||||
public string osSetDynamicTextureDataBlendFace(string dynamicID, string contentType, string data, string extraParams,
|
||||
bool blend, int timer, int alpha, int face)
|
||||
{
|
||||
CheckThreatLevel(ThreatLevel.VeryLow, "osSetDynamicTextureDataBlendFace");
|
||||
|
||||
m_host.AddScriptLPS(1);
|
||||
if (dynamicID == String.Empty)
|
||||
{
|
||||
IDynamicTextureManager textureManager = World.RequestModuleInterface<IDynamicTextureManager>();
|
||||
if (textureManager != null)
|
||||
{
|
||||
if (extraParams == String.Empty)
|
||||
{
|
||||
extraParams = "256";
|
||||
}
|
||||
UUID createdTexture =
|
||||
textureManager.AddDynamicTextureData(World.RegionInfo.RegionID, m_host.UUID, contentType, data,
|
||||
extraParams, timer, blend, (byte) alpha, face);
|
||||
return createdTexture.ToString();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
//TODO update existing dynamic textures
|
||||
}
|
||||
|
||||
return UUID.Zero.ToString();
|
||||
}
|
||||
|
||||
public bool osConsoleCommand(string command)
|
||||
{
|
||||
CheckThreatLevel(ThreatLevel.Severe, "osConsoleCommand");
|
||||
|
||||
Reference in New Issue
Block a user