make asset checker default inactive
parent
789d658f4a
commit
334039f22c
|
@ -22,7 +22,10 @@ namespace OpenSim.Modules.TextureFetcher
|
|||
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||
Scene m_scene = null;
|
||||
|
||||
private IConfigSource m_config;
|
||||
|
||||
List<UUID> m_textureBlackList = new List<UUID>();
|
||||
bool m_checkTexture = false;
|
||||
|
||||
public string Name
|
||||
{
|
||||
|
@ -43,7 +46,12 @@ namespace OpenSim.Modules.TextureFetcher
|
|||
|
||||
public void Initialise(IConfigSource source)
|
||||
{
|
||||
m_config = source;
|
||||
|
||||
if (m_config.Configs["Startup"] != null)
|
||||
{
|
||||
m_checkTexture = m_config.Configs["Startup"].GetBoolean("TextureFetcherCheckAssets", m_checkTexture);
|
||||
}
|
||||
}
|
||||
|
||||
public Type ReplaceableInterface
|
||||
|
@ -140,17 +148,20 @@ namespace OpenSim.Modules.TextureFetcher
|
|||
}
|
||||
|
||||
//Remove not existing textures
|
||||
String[] _assetIDs = new string[allTextures.Count];
|
||||
for (int i = 0; i < allTextures.Count; i++)
|
||||
_assetIDs[i] = allTextures[i].ToString();
|
||||
if(m_checkTexture == true)
|
||||
{
|
||||
String[] _assetIDs = new string[allTextures.Count];
|
||||
for (int i = 0; i < allTextures.Count; i++)
|
||||
_assetIDs[i] = allTextures[i].ToString();
|
||||
|
||||
bool[] existing = m_scene.AssetService.AssetsExist(_assetIDs);
|
||||
for (int i = 0; i < existing.Length; i++)
|
||||
if (existing[i] == false)
|
||||
{
|
||||
m_textureBlackList.Add(allTextures[i]);
|
||||
allTextures[i] = UUID.Zero;
|
||||
}
|
||||
bool[] existing = m_scene.AssetService.AssetsExist(_assetIDs);
|
||||
for (int i = 0; i < existing.Length; i++)
|
||||
if (existing[i] == false)
|
||||
{
|
||||
m_textureBlackList.Add(allTextures[i]);
|
||||
allTextures[i] = UUID.Zero;
|
||||
}
|
||||
}
|
||||
|
||||
//Convert texture uuid list to inventar items.
|
||||
foreach (UUID texture in allTextures)
|
||||
|
|
Loading…
Reference in New Issue