29 using System.Reflection;
30 using System.Collections;
31 using System.Collections.Generic;
33 using OpenMetaverse.StructuredData;
36 namespace OpenSim.Framework
44 const float AVBOXAJUST = 0.2f;
46 const float AVBOXMINX = 0.2f;
47 const float AVBOXMINY = 0.3f;
48 const float AVBOXMINZ = 1.2f;
50 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
54 public readonly
static int VISUALPARAM_COUNT = 218;
59 public readonly
static int TEXTURE_COUNT = Primitive.TextureEntry.MAX_FACES;
61 public readonly
static byte[] BAKE_INDICES =
new byte[] { 8, 9, 10, 11, 19, 20 };
63 protected int m_serial = 0;
68 protected float m_avatarHeight = 0;
69 protected Vector3 m_avatarSize =
new Vector3(0.45f, 0.6f, 1.9f);
70 protected Vector3 m_avatarBoxSize =
new Vector3(0.45f, 0.6f, 1.9f);
71 protected float m_avatarFeetOffset = 0;
72 protected float m_avatarAnimOffset = 0;
74 protected bool m_cacheItemsDirty =
true;
76 public virtual int Serial
78 get {
return m_serial; }
79 set { m_serial = value; }
82 public virtual byte[] VisualParams
84 get {
return m_visualparams; }
85 set { m_visualparams = value; }
88 public virtual Vector3 AvatarSize
90 get {
return m_avatarSize; }
93 public virtual Vector3 AvatarBoxSize
95 get {
return m_avatarBoxSize; }
98 public virtual float AvatarFeetOffset
100 get {
return m_avatarFeetOffset + m_avatarAnimOffset; }
103 public virtual Primitive.TextureEntry
Texture
105 get {
return m_texture; }
115 get {
return m_wearables; }
116 set { m_wearables = value; }
119 public virtual float AvatarHeight
121 get {
return m_avatarHeight; }
122 set { m_avatarHeight = value; }
127 get {
return m_cacheitems; }
128 set { m_cacheitems = value; }
131 public virtual bool WearableCacheItemsDirty
133 get {
return m_cacheItemsDirty; }
134 set { m_cacheItemsDirty = value; }
142 SetDefaultWearables();
146 SetSize(
new Vector3(0.45f,0.6f,1.9f));
147 m_attachments =
new Dictionary<int, List<AvatarAttachment>>();
164 if (wearables != null)
165 m_wearables = wearables;
167 SetDefaultWearables();
169 if (textureEntry != null)
170 m_texture = textureEntry;
174 if (visualParams != null)
175 m_visualparams = visualParams;
180 if(m_avatarHeight == 0)
181 SetSize(
new Vector3(0.45f,0.6f,1.9f));
183 m_attachments =
new Dictionary<int, List<AvatarAttachment>>();
191 : this(appearance, copyWearables, true)
199 if (appearance == null)
202 SetDefaultWearables();
206 SetSize(
new Vector3(0.45f, 0.6f, 1.9f));
207 m_attachments =
new Dictionary<int, List<AvatarAttachment>>();
212 m_serial = appearance.Serial;
214 if (copyWearables && (appearance.
Wearables != null))
217 for (
int i = 0; i < appearance.Wearables.Length; i++)
221 for (
int j = 0; j < wearable.Count; j++)
222 m_wearables[i].Add(wearable[j].ItemID, wearable[j].AssetID);
229 if (appearance.
Texture != null)
231 byte[] tbytes = appearance.Texture.GetBytes();
232 m_texture =
new Primitive.TextureEntry(tbytes,0,tbytes.Length);
239 m_visualparams = null;
241 m_visualparams = (byte[])appearance.
VisualParams.Clone();
247 m_attachments =
new Dictionary<int, List<AvatarAttachment>>();
254 int len = m_wearables.Length;
256 len = app.m_wearables.Length;
258 for (
int i = 0; i < len; i++)
260 int count = m_wearables[i].Count;
262 count = app.m_wearables[i].Count;
264 for (
int j = 0; j < count; j++)
266 UUID itemID = m_wearables[i][j].ItemID;
267 UUID assetID = app.Wearables[i].GetAsset(itemID);
269 if (assetID != UUID.Zero)
270 m_wearables[i].Add(itemID, assetID);
277 m_wearables =
new AvatarWearable[AvatarWearable.LEGACY_VERSION_MAX_WEARABLES];
278 for (
int i = 0; i < AvatarWearable.LEGACY_VERSION_MAX_WEARABLES; i++)
284 m_wearables = AvatarWearable.DefaultWearables;
308 m_visualparams =
new byte[] { 33,61,85,23,58,127,63,85,63,42,0,85,63,36,85,95,153,63,34,0,63,109,88,132,63,136,81,85,103,136,127,0,150,150,150,127,0,0,0,0,0,127,0,0,255,127,114,127,99,63,127,140,127,127,0,0,0,191,0,104,0,0,0,0,0,0,0,0,0,145,216,133,0,127,0,127,170,0,0,127,127,109,85,127,127,63,85,42,150,150,150,150,150,150,150,25,150,150,150,0,127,0,0,144,85,127,132,127,85,0,127,127,127,127,127,127,59,127,85,127,127,106,47,79,127,127,204,2,141,66,0,0,127,127,0,0,0,0,127,0,159,0,0,178,127,36,85,131,127,127,127,153,95,0,140,75,27,127,127,0,150,150,198,0,0,63,30,127,165,209,198,127,127,153,204,51,51,255,255,255,204,0,255,150,150,150,150,150,150,150,150,150,150,0,150,150,150,150,150,0,127,127,150,150,150,150,150,150,150,150,0,0,150,51,132,150,150,150 };
332 m_texture =
new Primitive.TextureEntry(
new UUID(AppearanceManager.DEFAULT_AVATAR_TEXTURE));
347 if (textureEntry == null)
353 bool changed =
false;
354 for (uint i = 0; i < AvatarAppearance.TEXTURE_COUNT; i++)
356 Primitive.TextureEntryFace newface = textureEntry.FaceTextures[i];
357 Primitive.TextureEntryFace oldface = m_texture.FaceTextures[i];
366 if (oldface != null && oldface.TextureID == newface.TextureID)
373 m_texture = textureEntry;
387 if (visualParams == null)
393 bool changed =
false;
395 int newsize = visualParams.Length;
397 if (newsize != m_visualparams.Length)
400 m_visualparams = (byte[])visualParams.Clone();
405 for (
int i = 0; i < newsize; i++)
407 if (visualParams[i] != m_visualparams[i])
413 m_visualparams[i] = visualParams[i];
427 SetTextureEntries(textureEntry);
428 SetVisualParams(visualParams);
456 else if (avSize.X < 0.1f)
461 else if (avSize.Y < 0.1f)
465 else if (avSize.Z < 0.1f)
468 m_avatarSize = avSize;
469 m_avatarBoxSize = avSize;
470 m_avatarBoxSize.Z += AVBOXAJUST;
471 if (m_avatarBoxSize.X < AVBOXMINX)
472 m_avatarBoxSize.X = AVBOXMINX;
473 if (m_avatarBoxSize.Y < AVBOXMINY)
474 m_avatarBoxSize.Y = AVBOXMINY;
475 if (m_avatarBoxSize.Z < AVBOXMINZ)
476 m_avatarBoxSize.Z = AVBOXMINZ;
477 m_avatarHeight = m_avatarSize.Z;
485 if (wearableId >= m_wearables.Length)
487 int currentLength = m_wearables.Length;
488 Array.Resize(ref m_wearables, wearableId + 1);
489 for (
int i = currentLength ; i < m_wearables.Length ; i++)
492 m_wearables[wearableId].Clear();
493 for (
int i = 0; i < wearable.Count; i++)
494 m_wearables[wearableId].Add(wearable[i].ItemID, wearable[i].AssetID);
502 s += String.Format(
"Serial: {0}\n",m_serial);
504 for (uint i = 0; i < AvatarAppearance.TEXTURE_COUNT; i++)
505 if (m_texture.FaceTextures[i] != null)
506 s += String.Format(
"Texture: {0} --> {1}\n",i,m_texture.FaceTextures[i].TextureID);
510 for (
int i = 0; i < awear.Count; i++)
511 s += String.Format(
"Wearable: item={0}, asset={1}\n",awear[i].ItemID,awear[i].AssetID);
514 s +=
"Visual Params: ";
516 for (uint j = 0; j < m_visualparams.Length; j++)
517 s += String.Format(
"{0},",m_visualparams[j]);
534 List<AvatarAttachment> alist =
new List<AvatarAttachment>();
535 foreach (KeyValuePair<
int, List<AvatarAttachment>> kvp
in m_attachments)
552 if (!m_attachments.ContainsKey(attach.
AttachPoint))
553 m_attachments[attach.
AttachPoint] =
new List<AvatarAttachment>();
561 m_attachments[attach.AttachPoint].Add(attach);
565 internal void ReplaceAttachment(AvatarAttachment attach)
573 m_attachments[attach.AttachPoint] =
new List<AvatarAttachment>();
574 m_attachments[attach.AttachPoint].Add(attach);
599 if (attachpoint == 0)
604 if (item == UUID.Zero)
606 if (m_attachments.ContainsKey(attachpoint))
608 m_attachments.Remove(attachpoint);
622 if (existingAttachment != null)
628 if (existingAttachment.
AssetID != UUID.Zero && existingAttachment.
AttachPoint == (attachpoint & 0x7F))
631 "[AVATAR APPEARANCE]: Ignoring attempt to attach an already attached item {0} at point {1}",
640 DetachAttachment(existingAttachment.
ItemID);
645 if ((attachpoint & 0x80) > 0)
648 int point = attachpoint & 0x7F;
669 foreach (KeyValuePair<
int, List<AvatarAttachment>> kvp
in m_attachments)
671 int index = kvp.Value.FindIndex(delegate(
AvatarAttachment a) {
return a.ItemID == itemID; });
673 return kvp.Value[index];
684 foreach (KeyValuePair<
int, List<AvatarAttachment>> kvp
in m_attachments)
686 int index = kvp.Value.FindIndex(delegate(
AvatarAttachment a) {
return a.ItemID == itemID; });
698 foreach (KeyValuePair<
int, List<AvatarAttachment>> kvp
in m_attachments)
700 int index = kvp.Value.FindIndex(delegate(
AvatarAttachment a) {
return a.ItemID == itemID; });
708 m_attachments[kvp.Key].RemoveAt(index);
711 if (m_attachments[kvp.Key].Count == 0)
712 m_attachments.Remove(kvp.Key);
725 m_attachments.Clear();
728 #region Packing Functions
737 data[
"serial"] = OSD.FromInteger(m_serial);
738 data[
"height"] = OSD.FromReal(m_avatarHeight);
744 int count = ctx.WearablesCount;
746 count = m_wearables.Length;
748 for (
int i = 0; i < count; i++)
752 if (i < m_wearables.Length)
753 wears.Add(m_wearables[i].Pack());
755 wears.Add(dummyWearable.Pack());
757 data[
"wearables"] = wears;
761 for (uint i = 0; i < AvatarAppearance.TEXTURE_COUNT; i++)
763 if (m_texture.FaceTextures[i] != null)
764 textures.Add(OSD.FromUUID(m_texture.FaceTextures[i].TextureID));
766 textures.Add(OSD.FromUUID(AppearanceManager.DEFAULT_AVATAR_TEXTURE));
768 data[
"textures"] = textures;
770 if (m_cacheitems != null)
772 OSDArray baked = WearableCacheItem.BakedToOSD(m_cacheitems);
774 data[
"bakedcache"] = baked;
778 OSDBinary visualparams =
new OSDBinary(m_visualparams);
779 data[
"visualparams"] = visualparams;
786 attachs.Add(attach.Pack());
787 data[
"attachments"] = attachs;
799 if ((data != null) && (data[
"serial"] != null))
800 m_serial = data[
"serial"].AsInteger();
801 if ((data != null) && (data[
"height"] != null))
803 SetSize(
new Vector3(0.45f,0.6f, (
float)data[
"height"].AsReal()));
808 SetDefaultWearables();
809 if ((data != null) && (data[
"wearables"] != null) && (data[
"wearables"]).
Type == OSDType.Array)
813 int count = wears.Count;
817 for (
int i = 0; i < count; i++)
822 m_log.Warn(
"[AVATAR APPEARANCE]: failed to unpack wearables");
827 if ((data != null) && (data[
"textures"] != null) && (data[
"textures"]).
Type == OSDType.Array)
830 for (
int i = 0; i < AvatarAppearance.TEXTURE_COUNT && i < textures.Count; i++)
832 UUID textureID = AppearanceManager.DEFAULT_AVATAR_TEXTURE;
833 if (textures[i] != null)
834 textureID = textures[i].AsUUID();
835 m_texture.CreateFace((uint)i).TextureID =
new UUID(textureID);
840 m_log.Warn(
"[AVATAR APPEARANCE]: failed to unpack textures");
843 if ((data != null) && (data[
"bakedcache"] != null) && (data[
"bakedcache"]).Type == OSDType.Array)
846 m_cacheitems = WearableCacheItem.BakedFromOSD(bakedOSDArray);
851 if ((data != null) && (data[
"visualparams"] != null))
853 if ((data[
"visualparams"].
Type == OSDType.Binary) || (data[
"visualparams"].Type == OSDType.Array))
854 m_visualparams = data[
"visualparams"].AsBinary();
858 m_log.Warn(
"[AVATAR APPEARANCE]: failed to unpack visual parameters");
862 m_attachments =
new Dictionary<int, List<AvatarAttachment>>();
863 if ((data != null) && (data[
"attachments"] != null) && (data[
"attachments"]).Type == OSDType.Array)
866 for (
int i = 0; i < attachs.Count; i++)
869 AppendAttachment(att);
879 m_log.ErrorFormat(
"[AVATAR APPEARANCE]: unpack failed badly: {0}{1}", e.Message, e.StackTrace);
900 SHAPE_NOSE_BIG_OUT = 1,
904 SHAPE_BROAD_NOSTRILS = 2,
908 SHAPE_CLEFT_CHIN = 3,
912 SHAPE_BULBOUS_NOSE_TIP = 4,
920 SHAPE_DOUBLE_CHIN = 6,
924 SHAPE_SUNKEN_CHEEKS = 7,
928 SHAPE_NOBLE_NOSE_BRIDGE = 8,
936 SHAPE_CLEFT_CHIN_UPPER = 10,
940 SHAPE_HIGH_CHEEK_BONES = 11,
948 HAIR_POINTY_EYEBROWS = 13,
952 SHAPE_SQUARE_JAW = 14,
956 SHAPE_PUFFY_UPPER_CHEEKS = 15,
960 SHAPE_UPTURNED_NOSE_TIP = 16,
964 SHAPE_BULBOUS_NOSE = 17,
968 SHAPE_UPPER_EYELID_FOLD = 18,
972 SHAPE_ATTACHED_EARLOBES = 19,
976 SHAPE_BAGGY_EYES = 20,
980 SHAPE_WIDE_EYES = 21,
984 SHAPE_WIDE_LIP_CLEFT = 22,
988 SHAPE_WIDE_NOSE_BRIDGE = 23,
992 HAIR_ARCED_EYEBROWS = 24,
1000 SHAPE_THICKNESS = 26,
1004 SHAPE_BIG_EARS = 27,
1008 SHAPE_SHOULDERS = 28,
1012 SHAPE_HIP_WIDTH = 29,
1016 SHAPE_TORSO_LENGTH = 30,
1021 GLOVES_GLOVE_LENGTH = 32,
1025 EYES_EYE_LIGHTNESS = 33,
1029 EYES_EYE_COLOR = 34,
1033 SHAPE_BREAST_SIZE = 35,
1037 SKIN_RAINBOW_COLOR = 36,
1046 HAIR_RAINBOW_COLOR_39 = 39,
1054 HAIR_BLONDE_HAIR = 41,
1058 HAIR_WHITE_HAIR = 42,
1062 SKIN_ROSY_COMPLEXION = 43,
1066 SKIN_LIP_PINKNESS = 44,
1070 HAIR_EYEBROW_SIZE = 45,
1074 HAIR_FRONT_FRINGE = 46,
1078 HAIR_SIDE_FRINGE = 47,
1082 HAIR_BACK_FRINGE = 48,
1086 HAIR_HAIR_FRONT = 49,
1090 HAIR_HAIR_SIDES = 50,
1094 HAIR_HAIR_BACK = 51,
1098 HAIR_HAIR_SWEEP = 52,
1102 HAIR_HAIR_TILT = 53,
1106 HAIR_HAIR_PART_MIDDLE = 54,
1110 HAIR_HAIR_PART_RIGHT = 55,
1114 HAIR_HAIR_PART_LEFT = 56,
1118 HAIR_HAIR_SIDES_FULL = 57,
1122 SKIN_BODY_DEFINITION = 58,
1126 SHAPE_LIP_WIDTH = 59,
1130 SHAPE_BELLY_SIZE = 60,
1134 SKIN_FACIAL_DEFINITION = 61,
1146 HAIR_SIDEBURNS = 64,
1150 HAIR_MOUSTACHE = 65,
1154 HAIR_SOULPATCH = 66,
1158 HAIR_CHIN_CURTAINS = 67,
1162 HAIR_HAIR_RUMPLED = 68,
1166 HAIR_HAIR_BIG_FRONT = 69,
1170 HAIR_HAIR_BIG_TOP = 70,
1174 HAIR_HAIR_BIG_BACK = 71,
1178 HAIR_HAIR_SPIKED = 72,
1182 SHAPE_DEEP_CHIN = 73,
1186 HAIR_BANGS_PART_MIDDLE = 74,
1190 SHAPE_HEAD_SHAPE = 75,
1194 SHAPE_EYE_SPACING = 76,
1198 SHOES_HEEL_HEIGHT = 77,
1202 SHOES_PLATFORM_HEIGHT = 78,
1206 SHAPE_LIP_THICKNESS = 79,
1210 SHAPE_MOUTH_HEIGHT = 80,
1214 SHAPE_BREAST_GRAVITY = 81,
1218 SHOES_SHOE_PLATFORM_WIDTH = 82,
1222 SHOES_HEEL_SHAPE = 83,
1226 SHOES_TOE_SHAPE = 84,
1230 SHAPE_FOOT_SIZE = 85,
1234 SHAPE_WIDE_NOSE = 86,
1238 SHAPE_EYELASHES_LONG = 87,
1242 UNDERSHIRT_SLEEVE_LENGTH = 88,
1246 UNDERSHIRT_BOTTOM = 89,
1250 UNDERSHIRT_COLLAR_FRONT = 90,
1251 JACKET_SLEEVE_LENGTH_91 = 91,
1252 JACKET_COLLAR_FRONT_92 = 92,
1256 JACKET_BOTTOM_LENGTH_LOWER = 93,
1260 JACKET_OPEN_JACKET = 94,
1264 SHOES_SHOE_HEIGHT = 95,
1268 SOCKS_SOCKS_LENGTH = 96,
1272 UNDERPANTS_PANTS_LENGTH = 97,
1276 UNDERPANTS_PANTS_WAIST = 98,
1280 PANTS_LEG_PANTFLAIR = 99,
1284 SHAPE_FOREHEAD_ANGLE = 100,
1288 SHAPE_BODY_FAT = 101,
1292 PANTS_LOW_CROTCH = 102,
1296 SHAPE_EGG_HEAD = 103,
1300 SHAPE_SQUASH_STRETCH_HEAD = 104,
1304 SHAPE_TORSO_MUSCLES = 105,
1308 SHAPE_EYELID_CORNER_UP = 106,
1312 SHAPE_LEG_MUSCLES = 107,
1316 SHAPE_TALL_LIPS = 108,
1320 SHOES_SHOE_TOE_THICK = 109,
1324 SHAPE_CROOKED_NOSE = 110,
1328 SHAPE_MOUTH_CORNER = 111,
1332 SHAPE_FACE_SHEAR = 112,
1336 SHAPE_SHIFT_MOUTH = 113,
1340 SHAPE_POP_EYE = 114,
1344 SHAPE_JAW_JUT = 115,
1348 HAIR_HAIR_SHEAR_BACK = 116,
1352 SHAPE_HAND_SIZE = 117,
1356 SHAPE_LOVE_HANDLES = 118,
1357 SHAPE_TORSO_MUSCLES_119 = 119,
1361 SHAPE_HEAD_SIZE = 120,
1365 SHAPE_NECK_THICKNESS = 121,
1369 SHAPE_BREAST_FEMALE_CLEAVAGE = 122,
1373 SHAPE_CHEST_MALE_NO_PECS = 123,
1377 SHAPE_EYE_SIZE = 124,
1381 SHAPE_LEG_LENGTH = 125,
1385 SHAPE_ARM_LENGTH = 126,
1389 SKIN_LIPSTICK_COLOR = 127,
1393 SKIN_LIPSTICK = 128,
1397 SKIN_LIPGLOSS = 129,
1401 SKIN_EYELINER = 130,
1409 SKIN_BLUSH_COLOR = 132,
1413 SKIN_OUT_SHDW_OPACITY = 133,
1417 SKIN_OUTER_SHADOW = 134,
1421 SKIN_OUT_SHDW_COLOR = 135,
1425 SKIN_INNER_SHADOW = 136,
1429 SKIN_NAIL_POLISH = 137,
1433 SKIN_BLUSH_OPACITY = 138,
1437 SKIN_IN_SHDW_COLOR = 139,
1441 SKIN_IN_SHDW_OPACITY = 140,
1445 SKIN_EYELINER_COLOR = 141,
1449 SKIN_NAIL_POLISH_COLOR = 142,
1453 HAIR_EYEBROW_DENSITY = 143,
1457 HAIR_HAIR_THICKNESS = 144,
1461 SHAPE_SADDLEBAGS = 145,
1465 HAIR_HAIR_TAPER_BACK = 146,
1469 HAIR_HAIR_TAPER_FRONT = 147,
1473 SHAPE_NECK_LENGTH = 148,
1477 HAIR_LOWER_EYEBROWS = 149,
1481 SHAPE_LOWER_BRIDGE_NOSE = 150,
1485 SHAPE_LOW_SEPTUM_NOSE = 151,
1489 SHAPE_JAW_ANGLE = 152,
1493 HAIR_HAIR_SHEAR_FRONT = 153,
1497 HAIR_HAIR_VOLUME = 154,
1501 SHAPE_LIP_CLEFT_DEEP = 155,
1505 SHAPE_PUFFY_LOWER_LIDS = 156,
1509 SHAPE_EYE_DEPTH = 157,
1513 SHAPE_HEAD_LENGTH = 158,
1517 SKIN_BODY_FRECKLES = 159,
1521 UNDERSHIRT_COLLAR_BACK = 160,
1522 JACKET_COLLAR_BACK_161 = 161,
1523 SHIRT_COLLAR_BACK_162 = 162,
1527 HAIR_PIGTAILS = 163,
1531 HAIR_PONYTAIL = 164,
1535 SHAPE_BUTT_SIZE = 165,
1539 SHAPE_POINTY_EARS = 166,
1543 SHAPE_LIP_RATIO = 167,
1544 SHIRT_SLEEVE_LENGTH_168 = 168,
1548 SHIRT_SHIRT_BOTTOM = 169,
1549 SHIRT_COLLAR_FRONT_170 = 170,
1550 SHIRT_SHIRT_RED = 171,
1551 SHIRT_SHIRT_GREEN = 172,
1552 SHIRT_SHIRT_BLUE = 173,
1553 PANTS_PANTS_RED = 174,
1554 PANTS_PANTS_GREEN = 175,
1555 PANTS_PANTS_BLUE = 176,
1556 SHOES_SHOES_RED = 177,
1557 SHOES_SHOES_GREEN = 178,
1561 PANTS_WAIST_HEIGHT = 179,
1562 PANTS_PANTS_LENGTH_180 = 180,
1566 PANTS_LOOSE_LOWER_CLOTHING = 181,
1567 SHOES_SHOES_BLUE = 182,
1568 SOCKS_SOCKS_RED = 183,
1569 SOCKS_SOCKS_GREEN = 184,
1570 SOCKS_SOCKS_BLUE = 185,
1571 UNDERSHIRT_UNDERSHIRT_RED = 186,
1572 UNDERSHIRT_UNDERSHIRT_GREEN = 187,
1573 UNDERSHIRT_UNDERSHIRT_BLUE = 188,
1574 UNDERPANTS_UNDERPANTS_RED = 189,
1575 UNDERPANTS_UNDERPANTS_GREEN = 190,
1576 UNDERPANTS_UNDERPANTS_BLUE = 191,
1577 GLOVES_GLOVES_RED = 192,
1581 SHIRT_LOOSE_UPPER_CLOTHING = 193,
1582 GLOVES_GLOVES_GREEN = 194,
1583 GLOVES_GLOVES_BLUE = 195,
1584 JACKET_JACKET_RED = 196,
1585 JACKET_JACKET_GREEN = 197,
1586 JACKET_JACKET_BLUE = 198,
1590 SHIRT_SHIRTSLEEVE_FLAIR = 199,
1594 SHAPE_BOWED_LEGS = 200,
1598 SHAPE_HIP_LENGTH = 201,
1602 GLOVES_GLOVE_FINGERS = 202,
1606 SKIRT_SKIRT_BUSTLE = 203,
1610 SKIRT_SKIRT_LENGTH = 204,
1614 SKIRT_SLIT_FRONT = 205,
1618 SKIRT_SLIT_BACK = 206,
1622 SKIRT_SLIT_LEFT = 207,
1626 SKIRT_SLIT_RIGHT = 208,
1630 SKIRT_SKIRT_LOOSENESS = 209,
1631 SHIRT_SHIRT_WRINKLES = 210,
1632 PANTS_PANTS_WRINKLES = 211,
1636 JACKET_JACKET_WRINKLES = 212,
1640 SHAPE_MALE_PACKAGE = 213,
1644 SHAPE_EYELID_INNER_CORNER_UP = 214,
1645 SKIRT_SKIRT_RED = 215,
1646 SKIRT_SKIRT_GREEN = 216,
1647 SKIRT_SKIRT_BLUE = 217,
1656 BREAST_PHYSICS_MASS = 218,
1657 BREAST_PHYSICS_GRAVITY = 219,
1658 BREAST_PHYSICS_DRAG = 220,
1659 BREAST_PHYSICS_UPDOWN_MAX_EFFECT = 221,
1660 BREAST_PHYSICS_UPDOWN_SPRING = 222,
1661 BREAST_PHYSICS_UPDOWN_GAIN = 223,
1662 BREAST_PHYSICS_UPDOWN_DAMPING = 224,
1663 BREAST_PHYSICS_INOUT_MAX_EFFECT = 225,
1664 BREAST_PHYSICS_INOUT_SPRING = 226,
1665 BREAST_PHYSICS_INOUT_GAIN = 227,
1666 BREAST_PHYSICS_INOUT_DAMPING = 228,
1670 BELLY_PHYISCS_MASS = 229,
1671 BELLY_PHYSICS_GRAVITY = 230,
1672 BELLY_PHYSICS_DRAG = 231,
1673 BELLY_PHYISCS_UPDOWN_MAX_EFFECT = 232,
1674 BELLY_PHYSICS_UPDOWN_SPRING = 233,
1675 BELLY_PHYSICS_UPDOWN_GAIN = 234,
1676 BELLY_PHYSICS_UPDOWN_DAMPING = 235,
1681 BUTT_PHYSICS_MASS = 236,
1682 BUTT_PHYSICS_GRAVITY = 237,
1683 BUTT_PHYSICS_DRAG = 238,
1684 BUTT_PHYSICS_UPDOWN_MAX_EFFECT = 239,
1685 BUTT_PHYSICS_UPDOWN_SPRING = 240,
1686 BUTT_PHYSICS_UPDOWN_GAIN = 241,
1687 BUTT_PHYSICS_UPDOWN_DAMPING = 242,
1688 BUTT_PHYSICS_LEFTRIGHT_MAX_EFFECT = 243,
1689 BUTT_PHYSICS_LEFTRIGHT_SPRING = 244,
1690 BUTT_PHYSICS_LEFTRIGHT_GAIN = 245,
1691 BUTT_PHYSICS_LEFTRIGHT_DAMPING = 246,
1695 BREAST_PHYSICS_LEFTRIGHT_MAX_EFFECT = 247,
1696 BREAST_PHYSICS_LEFTRIGHT_SPRING= 248,
1697 BREAST_PHYSICS_LEFTRIGHT_GAIN = 249,
1698 BREAST_PHYSICS_LEFTRIGHT_DAMPING = 250,
1701 _APPEARANCEMESSAGE_VERSION = 251,
virtual Primitive.TextureEntry Texture
override String ToString()
void Unpack(OSDMap data)
Unpack and OSDMap and initialize the appearance from it
void SetSize(Vector3 avSize)
OpenMetaverse.StructuredData.OSDArray OSDArray
static readonly int TEXTURE_COUNT
virtual void SetDefaultTexture()
virtual void SetAppearance(Primitive.TextureEntry textureEntry, byte[] visualParams)
Contains the Avatar's Appearance and methods to manipulate the appearance.
virtual void ResetBakedTextures()
Invalidate all of the baked textures in the appearance, useful if you know that none are valid ...
AvatarAppearance(AvatarAppearance appearance, bool copyWearables)
OpenMetaverse.StructuredData.OSDMap OSDMap
AvatarAppearance(AvatarAppearance appearance, bool copyWearables, bool copyBaked)
AvatarAttachment GetAttachmentForItem(UUID itemID)
If the item is already attached, return it.
Dictionary< int, List< AvatarAttachment > > m_attachments
void GetAssetsFrom(AvatarAppearance app)
AvatarAppearance(AvatarWearable[] wearables, Primitive.TextureEntry textureEntry, byte[] visualParams)
virtual Vector3 AvatarSize
virtual void SetDefaultParams()
virtual AvatarWearable[] Wearables
virtual bool SetTextureEntries(Primitive.TextureEntry textureEntry)
Set up appearance texture ids.
virtual byte[] VisualParams
OSDMap Pack(EntityTransferContext ctx)
Create an OSDMap from the appearance data
AvatarWearable[] m_wearables
List< AvatarAttachment > GetAttachments()
Get a list of the attachments.
virtual void SetWearable(int wearableId, AvatarWearable wearable)
virtual void ResetAppearance()
Invalidate all of the baked textures in the appearance, useful if you know that none are valid ...
int GetAttachpoint(UUID itemID)
virtual bool SetVisualParams(byte[] visualParams)
Set up visual parameters for the avatar and refresh the avatar height
Primitive.TextureEntry m_texture
AvatarAppearance(AvatarAppearance appearance)
bool SetAttachment(int attachpoint, UUID item, UUID asset)
Set an attachment
VPElement
Viewer Params Array Element for AgentSetAppearance Generated from LibOMV's Visual Params list ...
bool DetachAttachment(UUID itemID)
virtual void SetHeight()
Set avatar height by a calculation based on their visual parameters.
WearableCacheItem[] m_cacheitems
AvatarAppearance(OSDMap map)
virtual void SetDefaultWearables()