From 115e1c2abb7755eb7b5ffeafbc0aecd255ccfc4e Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Fri, 18 Jan 2013 23:22:02 +0000 Subject: 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 --- .../Avatar/Animations/AnimationsCommandModule.cs | 23 ++++------------------ 1 file changed, 4 insertions(+), 19 deletions(-) (limited to 'OpenSim/Region/OptionalModules/Avatar/Animations/AnimationsCommandModule.cs') diff --git a/OpenSim/Region/OptionalModules/Avatar/Animations/AnimationsCommandModule.cs b/OpenSim/Region/OptionalModules/Avatar/Animations/AnimationsCommandModule.cs index e951d9e..84211a9 100644 --- a/OpenSim/Region/OptionalModules/Avatar/Animations/AnimationsCommandModule.cs +++ b/OpenSim/Region/OptionalModules/Avatar/Animations/AnimationsCommandModule.cs @@ -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; - } } } \ No newline at end of file -- cgit v1.1