Improve "app rebake" command to return a better message if no uploaded texture ids were available for the rebake request
parent
eebcea22ba
commit
023023a5fc
|
@ -107,9 +107,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// m_log.DebugFormat(
|
m_log.DebugFormat(
|
||||||
// "[LL IMAGE MANAGER]: Received duplicate of existing request for {0}, start packet {1} from {2}",
|
"[LL IMAGE MANAGER]: Received duplicate of existing request for {0}, start packet {1} from {2}",
|
||||||
// newRequest.RequestedAssetID, newRequest.PacketNumber, m_client.Name);
|
newRequest.RequestedAssetID, newRequest.PacketNumber, m_client.Name);
|
||||||
|
|
||||||
//m_log.DebugFormat("[TEX]: (UPD) ID={0}: D={1}, S={2}, P={3}",
|
//m_log.DebugFormat("[TEX]: (UPD) ID={0}: D={1}, S={2}, P={3}",
|
||||||
// newRequest.RequestedAssetID, newRequest.DiscardLevel, newRequest.PacketNumber, newRequest.Priority);
|
// newRequest.RequestedAssetID, newRequest.DiscardLevel, newRequest.PacketNumber, newRequest.Priority);
|
||||||
|
@ -168,9 +168,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// m_log.DebugFormat(
|
m_log.DebugFormat(
|
||||||
// "[LL IMAGE MANAGER]: Received request for {0}, start packet {1} from {2}",
|
"[LL IMAGE MANAGER]: Received request for {0}, start packet {1} from {2}",
|
||||||
// newRequest.RequestedAssetID, newRequest.PacketNumber, m_client.Name);
|
newRequest.RequestedAssetID, newRequest.PacketNumber, m_client.Name);
|
||||||
|
|
||||||
//m_log.DebugFormat("[TEX]: (NEW) ID={0}: D={1}, S={2}, P={3}",
|
//m_log.DebugFormat("[TEX]: (NEW) ID={0}: D={1}, S={2}, P={3}",
|
||||||
// newRequest.RequestedAssetID, newRequest.DiscardLevel, newRequest.PacketNumber, newRequest.Priority);
|
// newRequest.RequestedAssetID, newRequest.DiscardLevel, newRequest.PacketNumber, newRequest.Priority);
|
||||||
|
|
|
@ -159,8 +159,10 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory
|
||||||
return (defonly ? false : true);
|
return (defonly ? false : true);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void RequestRebake(IScenePresence sp, bool missingTexturesOnly)
|
public int RequestRebake(IScenePresence sp, bool missingTexturesOnly)
|
||||||
{
|
{
|
||||||
|
int texturesRebaked = 0;
|
||||||
|
|
||||||
for (int i = 0; i < AvatarAppearance.BAKE_INDICES.Length; i++)
|
for (int i = 0; i < AvatarAppearance.BAKE_INDICES.Length; i++)
|
||||||
{
|
{
|
||||||
int idx = AvatarAppearance.BAKE_INDICES[i];
|
int idx = AvatarAppearance.BAKE_INDICES[i];
|
||||||
|
@ -197,8 +199,11 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory
|
||||||
face.TextureID, idx, sp.Name);
|
face.TextureID, idx, sp.Name);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
texturesRebaked++;
|
||||||
sp.ControllingClient.SendRebakeAvatarTextures(face.TextureID);
|
sp.ControllingClient.SendRebakeAvatarTextures(face.TextureID);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return texturesRebaked;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
|
@ -68,7 +68,10 @@ namespace OpenSim.Region.Framework.Interfaces
|
||||||
/// If true, only request a rebake for the textures that are missing.
|
/// If true, only request a rebake for the textures that are missing.
|
||||||
/// If false then we request a rebake of all textures for which we already have references.
|
/// If false then we request a rebake of all textures for which we already have references.
|
||||||
/// </param>
|
/// </param>
|
||||||
void RequestRebake(IScenePresence sp, bool missingTexturesOnly);
|
/// <returns>
|
||||||
|
/// Number of rebake requests made. This will depend upon whether we've previously received texture IDs.
|
||||||
|
/// </returns>
|
||||||
|
int RequestRebake(IScenePresence sp, bool missingTexturesOnly);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Validate that OpenSim can find the baked textures need to display a given avatar
|
/// Validate that OpenSim can find the baked textures need to display a given avatar
|
||||||
|
|
|
@ -273,11 +273,16 @@ namespace OpenSim.Region.OptionalModules.Avatar.Appearance
|
||||||
ScenePresence sp = scene.GetScenePresence(firstname, lastname);
|
ScenePresence sp = scene.GetScenePresence(firstname, lastname);
|
||||||
if (sp != null && !sp.IsChildAgent)
|
if (sp != null && !sp.IsChildAgent)
|
||||||
{
|
{
|
||||||
MainConsole.Instance.OutputFormat(
|
int rebakesRequested = scene.AvatarFactory.RequestRebake(sp, false);
|
||||||
"Requesting rebake of uploaded textures for {0}",
|
|
||||||
sp.Name, scene.RegionInfo.RegionName);
|
|
||||||
|
|
||||||
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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue