Print out one log message for every missing baked texture, rather than two.

iar_mods
Justin Clark-Casey (justincc) 2011-12-09 23:54:39 +00:00
parent 0daa5d8b4d
commit 5f276c3212
1 changed files with 4 additions and 22 deletions

View File

@ -320,14 +320,14 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory
defonly = false; // found a non-default texture reference defonly = false; // found a non-default texture reference
if (!CheckBakedTextureAsset(sp, face.TextureID, idx)) if (m_scene.AssetService.Get(face.TextureID.ToString()) == null)
{ {
// the asset didn't exist if we are only checking, then we found a bad
// one and we're done otherwise, ask for a rebake
if (checkonly) if (checkonly)
return false; return false;
m_log.InfoFormat("[AVFACTORY]: missing baked texture {0}, requesting rebake", face.TextureID); m_log.DebugFormat(
"[AVFACTORY]: Missing baked texture {0} ({1}) for {2}, requesting rebake.",
face.TextureID, idx, sp.Name);
sp.ControllingClient.SendRebakeAvatarTextures(face.TextureID); sp.ControllingClient.SendRebakeAvatarTextures(face.TextureID);
} }
@ -339,24 +339,6 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory
return (defonly ? false : true); return (defonly ? false : true);
} }
/// <summary>
/// Checks for the existance of a baked texture asset and
/// requests the viewer rebake if the asset is not found
/// </summary>
/// <param name="sp"></param>
/// <param name="textureID"></param>
/// <param name="idx"></param>
private bool CheckBakedTextureAsset(IScenePresence sp, UUID textureID, int idx)
{
if (m_scene.AssetService.Get(textureID.ToString()) == null)
{
m_log.WarnFormat("[AVFACTORY]: Missing baked texture {0} ({1}) for avatar {2}",
textureID, idx, sp.Name);
return false;
}
return true;
}
private Dictionary<BakeType, Primitive.TextureEntryFace> GetBakedTextureFaces(ScenePresence sp) private Dictionary<BakeType, Primitive.TextureEntryFace> GetBakedTextureFaces(ScenePresence sp)
{ {
if (sp.IsChildAgent) if (sp.IsChildAgent)