Add methods to Animation and AnimationSet for easier manipulation and

display of groups of animations (Equal(), ToString(), FromOSDArray(), ...).
No functional change to animations.
This commit is contained in:
Robert Adams
2013-05-30 14:30:45 -07:00
parent 439f11cc3c
commit 48a175eff7
3 changed files with 156 additions and 0 deletions

View File

@@ -104,5 +104,31 @@ namespace OpenSim.Region.Framework.Scenes.Animation
return UUID.Zero;
}
/// <summary>
/// Get the name of the animation given a UUID. If there is no matching animation
/// return the UUID as a string.
/// </summary>
public static string GetDefaultAnimationName(UUID uuid)
{
string ret = "unknown";
if (AnimsUUID.ContainsValue(uuid))
{
foreach (KeyValuePair<string, UUID> kvp in AnimsUUID)
{
if (kvp.Value == uuid)
{
ret = kvp.Key;
break;
}
}
}
else
{
ret = uuid.ToString();
}
return ret;
}
}
}