mirror of
https://github.com/opensim/opensim.git
synced 2026-07-14 19:55:35 +08:00
Add "debug set set animations true|false" region console command.
Setting this logs extra information about animation add/remove, such as uuid and animation name Unfortunately cannot be done per client yet
This commit is contained in:
@@ -161,12 +161,13 @@ namespace OpenSim.Region.OptionalModules.Avatar.Animations
|
||||
UUID defaultAnimId = anims.DefaultAnimation.AnimID;
|
||||
cdl.AddRow(
|
||||
"Default anim",
|
||||
string.Format("{0}, {1}", defaultAnimId, GetAnimName(sp.Scene.AssetService, defaultAnimId)));
|
||||
string.Format("{0}, {1}", defaultAnimId, sp.Animator.GetAnimName(defaultAnimId)));
|
||||
|
||||
UUID implicitDefaultAnimId = anims.ImplicitDefaultAnimation.AnimID;
|
||||
cdl.AddRow(
|
||||
"Implicit default anim",
|
||||
string.Format("{0}, {1}", implicitDefaultAnimId, GetAnimName(sp.Scene.AssetService, implicitDefaultAnimId)));
|
||||
string.Format("{0}, {1}",
|
||||
implicitDefaultAnimId, sp.Animator.GetAnimName(implicitDefaultAnimId)));
|
||||
|
||||
cdl.AddToStringBuilder(sb);
|
||||
|
||||
@@ -185,7 +186,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Animations
|
||||
for (int i = 0; i < animIds.Length; i++)
|
||||
{
|
||||
UUID animId = animIds[i];
|
||||
string animName = GetAnimName(sp.Scene.AssetService, animId);
|
||||
string animName = sp.Animator.GetAnimName(animId);
|
||||
int seq = sequenceNumbers[i];
|
||||
UUID objectId = objectIds[i];
|
||||
|
||||
@@ -195,21 +196,5 @@ namespace OpenSim.Region.OptionalModules.Avatar.Animations
|
||||
cdt.AddToStringBuilder(sb);
|
||||
sb.Append("\n");
|
||||
}
|
||||
|
||||
private string GetAnimName(IAssetService assetService, UUID animId)
|
||||
{
|
||||
string animName;
|
||||
|
||||
if (!DefaultAvatarAnimations.AnimsNames.TryGetValue(animId, out animName))
|
||||
{
|
||||
AssetMetadata amd = assetService.GetMetadata(animId.ToString());
|
||||
if (amd != null)
|
||||
animName = amd.Name;
|
||||
else
|
||||
animName = "Unknown";
|
||||
}
|
||||
|
||||
return animName;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user