Changed UploadBakedTextureModule so that it uses the same pattern as the others, in preparation for experiments to direct baked texture uploads to a robust instance. No functional or configuration changes -- should work exactly as before.
parent
83d1680057
commit
29f6ae199e
|
@ -63,9 +63,16 @@ namespace OpenSim.Region.ClientStack.Linden
|
|||
|
||||
private Scene m_scene;
|
||||
private bool m_persistBakedTextures;
|
||||
private string m_URL;
|
||||
|
||||
public void Initialise(IConfigSource source)
|
||||
{
|
||||
IConfig config = source.Configs["ClientStack.LindenCaps"];
|
||||
if (config == null)
|
||||
return;
|
||||
|
||||
m_URL = config.GetString("Cap_UploadBakedTexture", string.Empty);
|
||||
|
||||
IConfig appearanceConfig = source.Configs["Appearance"];
|
||||
if (appearanceConfig != null)
|
||||
m_persistBakedTextures = appearanceConfig.GetBoolean("PersistBakedTextures", m_persistBakedTextures);
|
||||
|
@ -99,6 +106,11 @@ namespace OpenSim.Region.ClientStack.Linden
|
|||
}
|
||||
|
||||
public void RegisterCaps(UUID agentID, Caps caps)
|
||||
{
|
||||
UUID capID = UUID.Random();
|
||||
|
||||
//caps.RegisterHandler("GetTexture", new StreamHandler("GET", "/CAPS/" + capID, ProcessGetTexture));
|
||||
if (m_URL == "localhost")
|
||||
{
|
||||
caps.RegisterHandler(
|
||||
"UploadBakedTexture",
|
||||
|
@ -109,6 +121,13 @@ namespace OpenSim.Region.ClientStack.Linden
|
|||
caps, m_scene.AssetService, m_persistBakedTextures).UploadBakedTexture,
|
||||
"UploadBakedTexture",
|
||||
agentID.ToString()));
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
caps.RegisterHandler("UploadBakedTexture", m_URL);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue