Files
libremetaverse/Programs/examples/TestClient/Commands/Appearance/AvatarInfoCommand.cs
John Hurliman c1bc0b4af6 * Moved OpenMetaverse/Resources to bin/openmetaverse_data until we have a working xbuild and reorganize SVN
* Complete rewrite of AppearanceManager. Appearance editing has not been (re)implemented yet, but the normal appearance setting is much more reliable
* Added a setting (defaulted to true) for automatically setting appearance
* Various baking hacks to get slightly less ugly avatars
* Added baked texture uploading through CAPS in AssetManager.RequestUploadBakedTexture(). UDP fallback is not implemented yet
* Added Parallel.Invoke() and overloads for all three methods that take a threadCount

git-svn-id: http://libopenmetaverse.googlecode.com/svn/libopenmetaverse/trunk@3038 52acb1d6-8a22-11de-b505-999d5b087335
2009-07-31 17:43:01 +00:00

56 lines
1.8 KiB
C#

using System;
using System.Collections.Generic;
using System.Text;
using OpenMetaverse;
namespace OpenMetaverse.TestClient.Commands.Appearance
{
public class AvatarInfoCommand : Command
{
public AvatarInfoCommand(TestClient testClient)
{
Name = "avatarinfo";
Description = "Print out information on a nearby avatar. Usage: avatarinfo [firstname] [lastname]";
Category = CommandCategory.Appearance;
}
public override string Execute(string[] args, UUID fromAgentID)
{
if (args.Length != 2)
return "Usage: avatarinfo [firstname] [lastname]";
string targetName = String.Format("{0} {1}", args[0], args[1]);
Avatar foundAv = Client.Network.CurrentSim.ObjectsAvatars.Find(
delegate(Avatar avatar) { return (avatar.Name == targetName); }
);
if (foundAv != null)
{
StringBuilder output = new StringBuilder();
output.AppendFormat("{0} ({1})", targetName, foundAv.ID);
output.AppendLine();
for (int i = 0; i < foundAv.Textures.FaceTextures.Length; i++)
{
if (foundAv.Textures.FaceTextures[i] != null)
{
Primitive.TextureEntryFace face = foundAv.Textures.FaceTextures[i];
AvatarTextureIndex type = (AvatarTextureIndex)i;
output.AppendFormat("{0}: {1}", type, face.TextureID);
output.AppendLine();
}
}
return output.ToString();
}
else
{
return "No nearby avatar with the name " + targetName;
}
}
}
}