Improve "app rebake" command to return a better message if no uploaded texture ids were available for the rebake request

This commit is contained in:
Justin Clark-Casey (justincc)
2012-01-05 19:40:54 +00:00
parent da6c816204
commit c201b54b85
4 changed files with 25 additions and 12 deletions

View File

@@ -240,11 +240,16 @@ namespace OpenSim.Region.OptionalModules.Avatar.Appearance
ScenePresence sp = scene.GetScenePresence(firstname, lastname);
if (sp != null && !sp.IsChildAgent)
{
MainConsole.Instance.OutputFormat(
"Requesting rebake of uploaded textures for {0}",
sp.Name, scene.RegionInfo.RegionName);
int rebakesRequested = scene.AvatarFactory.RequestRebake(sp, false);
scene.AvatarFactory.RequestRebake(sp, false);
if (rebakesRequested > 0)
MainConsole.Instance.OutputFormat(
"Requesting rebake of {0} uploaded textures for {1} in {2}",
rebakesRequested, sp.Name, scene.RegionInfo.RegionName);
else
MainConsole.Instance.OutputFormat(
"No texture IDs available for rebake request for {0} in {1}",
sp.Name, scene.RegionInfo.RegionName);
}
}
}