AvatarAppearance.cs 53 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477
  1. /*
  2. * Copyright (c) Contributors, http://opensimulator.org/
  3. * See CONTRIBUTORS.TXT for a full list of copyright holders.
  4. *
  5. * Redistribution and use in source and binary forms, with or without
  6. * modification, are permitted provided that the following conditions are met:
  7. * * Redistributions of source code must retain the above copyright
  8. * notice, this list of conditions and the following disclaimer.
  9. * * Redistributions in binary form must reproduce the above copyright
  10. * notice, this list of conditions and the following disclaimer in the
  11. * documentation and/or other materials provided with the distribution.
  12. * * Neither the name of the OpenSimulator Project nor the
  13. * names of its contributors may be used to endorse or promote products
  14. * derived from this software without specific prior written permission.
  15. *
  16. * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
  17. * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
  18. * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
  19. * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
  20. * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
  21. * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
  22. * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
  23. * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  24. * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
  25. * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  26. */
  27. using System;
  28. using System.Collections;
  29. using System.Collections.Generic;
  30. using OpenMetaverse;
  31. namespace OpenSim.Framework
  32. {
  33. /// <summary>
  34. /// Contains the Avatar's Appearance and methods to manipulate the appearance.
  35. /// </summary>
  36. public class AvatarAppearance
  37. {
  38. //private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
  39. // these are guessed at by the list here -
  40. // http://wiki.secondlife.com/wiki/Avatar_Appearance. We'll
  41. // correct them over time for when were are wrong.
  42. public readonly static int BODY = 0;
  43. public readonly static int SKIN = 1;
  44. public readonly static int HAIR = 2;
  45. public readonly static int EYES = 3;
  46. public readonly static int SHIRT = 4;
  47. public readonly static int PANTS = 5;
  48. public readonly static int SHOES = 6;
  49. public readonly static int SOCKS = 7;
  50. public readonly static int JACKET = 8;
  51. public readonly static int GLOVES = 9;
  52. public readonly static int UNDERSHIRT = 10;
  53. public readonly static int UNDERPANTS = 11;
  54. public readonly static int SKIRT = 12;
  55. private readonly static int MAX_WEARABLES = 13;
  56. private static UUID BODY_ASSET = new UUID("66c41e39-38f9-f75a-024e-585989bfab73");
  57. private static UUID BODY_ITEM = new UUID("66c41e39-38f9-f75a-024e-585989bfaba9");
  58. private static UUID SKIN_ASSET = new UUID("77c41e39-38f9-f75a-024e-585989bbabbb");
  59. private static UUID SKIN_ITEM = new UUID("77c41e39-38f9-f75a-024e-585989bfabc9");
  60. private static UUID SHIRT_ASSET = new UUID("00000000-38f9-1111-024e-222222111110");
  61. private static UUID SHIRT_ITEM = new UUID("77c41e39-38f9-f75a-0000-585989bf0000");
  62. private static UUID PANTS_ASSET = new UUID("00000000-38f9-1111-024e-222222111120");
  63. private static UUID PANTS_ITEM = new UUID("77c41e39-38f9-f75a-0000-5859892f1111");
  64. private static UUID HAIR_ASSET = new UUID("d342e6c0-b9d2-11dc-95ff-0800200c9a66");
  65. private static UUID HAIR_ITEM = new UUID("d342e6c1-b9d2-11dc-95ff-0800200c9a66");
  66. public readonly static int VISUALPARAM_COUNT = 218;
  67. protected UUID m_owner;
  68. public virtual UUID Owner
  69. {
  70. get { return m_owner; }
  71. set { m_owner = value; }
  72. }
  73. protected int m_serial = 1;
  74. public virtual int Serial
  75. {
  76. get { return m_serial; }
  77. set { m_serial = value; }
  78. }
  79. protected byte[] m_visualparams;
  80. public virtual byte[] VisualParams
  81. {
  82. get { return m_visualparams; }
  83. set { m_visualparams = value; }
  84. }
  85. protected AvatarWearable[] m_wearables;
  86. public virtual AvatarWearable[] Wearables
  87. {
  88. get { return m_wearables; }
  89. set { m_wearables = value; }
  90. }
  91. public virtual UUID BodyItem {
  92. get { return m_wearables[BODY].ItemID; }
  93. set { m_wearables[BODY].ItemID = value; }
  94. }
  95. public virtual UUID BodyAsset {
  96. get { return m_wearables[BODY].AssetID; }
  97. set { m_wearables[BODY].AssetID = value; }
  98. }
  99. public virtual UUID SkinItem {
  100. get { return m_wearables[SKIN].ItemID; }
  101. set { m_wearables[SKIN].ItemID = value; }
  102. }
  103. public virtual UUID SkinAsset {
  104. get { return m_wearables[SKIN].AssetID; }
  105. set { m_wearables[SKIN].AssetID = value; }
  106. }
  107. public virtual UUID HairItem {
  108. get { return m_wearables[HAIR].ItemID; }
  109. set { m_wearables[HAIR].ItemID = value; }
  110. }
  111. public virtual UUID HairAsset {
  112. get { return m_wearables[HAIR].AssetID; }
  113. set { m_wearables[HAIR].AssetID = value; }
  114. }
  115. public virtual UUID EyesItem {
  116. get { return m_wearables[EYES].ItemID; }
  117. set { m_wearables[EYES].ItemID = value; }
  118. }
  119. public virtual UUID EyesAsset {
  120. get { return m_wearables[EYES].AssetID; }
  121. set { m_wearables[EYES].AssetID = value; }
  122. }
  123. public virtual UUID ShirtItem {
  124. get { return m_wearables[SHIRT].ItemID; }
  125. set { m_wearables[SHIRT].ItemID = value; }
  126. }
  127. public virtual UUID ShirtAsset {
  128. get { return m_wearables[SHIRT].AssetID; }
  129. set { m_wearables[SHIRT].AssetID = value; }
  130. }
  131. public virtual UUID PantsItem {
  132. get { return m_wearables[PANTS].ItemID; }
  133. set { m_wearables[PANTS].ItemID = value; }
  134. }
  135. public virtual UUID PantsAsset {
  136. get { return m_wearables[PANTS].AssetID; }
  137. set { m_wearables[PANTS].AssetID = value; }
  138. }
  139. public virtual UUID ShoesItem {
  140. get { return m_wearables[SHOES].ItemID; }
  141. set { m_wearables[SHOES].ItemID = value; }
  142. }
  143. public virtual UUID ShoesAsset {
  144. get { return m_wearables[SHOES].AssetID; }
  145. set { m_wearables[SHOES].AssetID = value; }
  146. }
  147. public virtual UUID SocksItem {
  148. get { return m_wearables[SOCKS].ItemID; }
  149. set { m_wearables[SOCKS].ItemID = value; }
  150. }
  151. public virtual UUID SocksAsset {
  152. get { return m_wearables[SOCKS].AssetID; }
  153. set { m_wearables[SOCKS].AssetID = value; }
  154. }
  155. public virtual UUID JacketItem {
  156. get { return m_wearables[JACKET].ItemID; }
  157. set { m_wearables[JACKET].ItemID = value; }
  158. }
  159. public virtual UUID JacketAsset {
  160. get { return m_wearables[JACKET].AssetID; }
  161. set { m_wearables[JACKET].AssetID = value; }
  162. }
  163. public virtual UUID GlovesItem {
  164. get { return m_wearables[GLOVES].ItemID; }
  165. set { m_wearables[GLOVES].ItemID = value; }
  166. }
  167. public virtual UUID GlovesAsset {
  168. get { return m_wearables[GLOVES].AssetID; }
  169. set { m_wearables[GLOVES].AssetID = value; }
  170. }
  171. public virtual UUID UnderShirtItem {
  172. get { return m_wearables[UNDERSHIRT].ItemID; }
  173. set { m_wearables[UNDERSHIRT].ItemID = value; }
  174. }
  175. public virtual UUID UnderShirtAsset {
  176. get { return m_wearables[UNDERSHIRT].AssetID; }
  177. set { m_wearables[UNDERSHIRT].AssetID = value; }
  178. }
  179. public virtual UUID UnderPantsItem {
  180. get { return m_wearables[UNDERPANTS].ItemID; }
  181. set { m_wearables[UNDERPANTS].ItemID = value; }
  182. }
  183. public virtual UUID UnderPantsAsset {
  184. get { return m_wearables[UNDERPANTS].AssetID; }
  185. set { m_wearables[UNDERPANTS].AssetID = value; }
  186. }
  187. public virtual UUID SkirtItem {
  188. get { return m_wearables[SKIRT].ItemID; }
  189. set { m_wearables[SKIRT].ItemID = value; }
  190. }
  191. public virtual UUID SkirtAsset {
  192. get { return m_wearables[SKIRT].AssetID; }
  193. set { m_wearables[SKIRT].AssetID = value; }
  194. }
  195. public virtual void SetDefaultWearables()
  196. {
  197. m_wearables[BODY].AssetID = BODY_ASSET;
  198. m_wearables[BODY].ItemID = BODY_ITEM;
  199. m_wearables[SKIN].AssetID = SKIN_ASSET;
  200. m_wearables[SKIN].ItemID = SKIN_ITEM;
  201. m_wearables[HAIR].AssetID = HAIR_ASSET;
  202. m_wearables[HAIR].ItemID = HAIR_ITEM;
  203. m_wearables[SHIRT].AssetID = SHIRT_ASSET;
  204. m_wearables[SHIRT].ItemID = SHIRT_ITEM;
  205. m_wearables[PANTS].AssetID = PANTS_ASSET;
  206. m_wearables[PANTS].ItemID = PANTS_ITEM;
  207. }
  208. public virtual void ClearWearables()
  209. {
  210. for (int i = 0; i < 13; i++)
  211. {
  212. m_wearables[i].AssetID = UUID.Zero;
  213. m_wearables[i].ItemID = UUID.Zero;
  214. }
  215. }
  216. public virtual void SetDefaultParams(byte[] vparams)
  217. {
  218. // TODO: Figure out better values then 'fat scientist 150' or 'alien 0'
  219. for (int i = 0; i < VISUALPARAM_COUNT; i++)
  220. {
  221. vparams[i] = 150;
  222. }
  223. }
  224. protected Primitive.TextureEntry m_texture;
  225. public virtual Primitive.TextureEntry Texture
  226. {
  227. get { return m_texture; }
  228. set { m_texture = value; }
  229. }
  230. protected float m_avatarHeight = 0;
  231. protected float m_hipOffset = 0;
  232. public virtual float AvatarHeight
  233. {
  234. get { return m_avatarHeight; }
  235. set { m_avatarHeight = value; }
  236. }
  237. public virtual float HipOffset
  238. {
  239. get { return m_hipOffset; }
  240. }
  241. //Builds the VisualParam Enum using LIBOMV's Visual Param NameValues
  242. /*
  243. public void BuildVisualParamEnum()
  244. {
  245. Dictionary<string, int> IndexedParams = new Dictionary<string, int>();
  246. int vpIndex = 0;
  247. IndexedParams = new Dictionary<string, int>();
  248. System.Text.StringBuilder sb = new System.Text.StringBuilder();
  249. sb.Append("public enum VPElement: int\n");
  250. sb.Append("{\n");
  251. foreach (KeyValuePair<int, VisualParam> kvp in OpenMetaverse.VisualParams.Params)
  252. {
  253. VisualParam vp = kvp.Value;
  254. // Only Group-0 parameters are sent in AgentSetAppearance packets
  255. if (kvp.Value.Group == 0)
  256. {
  257. if (!IndexedParams.ContainsKey(vp.Name))
  258. {
  259. if (vp.Label.Length > 0 || vp.LabelMin.Length > 0 || vp.LabelMax.Length > 0)
  260. {
  261. sb.Append("/// <summary>\n");
  262. if (vp.LabelMin.Length > 0 && vp.LabelMax.Length > 0)
  263. sb.Append(string.Format("/// {0} - {1} 0--+255 {2}\n", vp.Label, vp.LabelMin,
  264. vp.LabelMax));
  265. else
  266. sb.Append(string.Format("/// {0}\n", vp.Label));
  267. sb.Append("/// </summary>\n");
  268. }
  269. sb.Append(string.Format(" {0}_{1} = {2}", vp.Wearable.ToUpper(), vp.Name.ToUpper().Replace(" ", "_"),vpIndex));
  270. IndexedParams.Add(vp.Name, vpIndex++);
  271. }
  272. else
  273. {
  274. sb.Append(string.Format(" {0}_{1}_{2} = {2}", vp.Wearable.ToUpper(), vp.Name.ToUpper().Replace(" ", "_"), vpIndex));
  275. vpIndex++;
  276. //int i = 0;
  277. }
  278. }
  279. if (vpIndex < 217)
  280. sb.Append(",\n");
  281. else
  282. sb.Append("\n");
  283. }
  284. sb.Append("}\n");
  285. }
  286. */
  287. public AvatarAppearance() : this(UUID.Zero) {}
  288. public AvatarAppearance(UUID owner)
  289. {
  290. m_wearables = new AvatarWearable[MAX_WEARABLES];
  291. for (int i = 0; i < MAX_WEARABLES; i++)
  292. {
  293. // this makes them all null
  294. m_wearables[i] = new AvatarWearable();
  295. }
  296. m_serial = 0;
  297. m_owner = owner;
  298. //BuildVisualParamEnum()
  299. m_visualparams = new byte[VISUALPARAM_COUNT];
  300. // This sets Visual Params with *less* weirder values then default. Instead of a ugly alien, it looks like a fat scientist
  301. SetDefaultParams(m_visualparams);
  302. SetDefaultWearables();
  303. m_texture = GetDefaultTexture();
  304. }
  305. public AvatarAppearance(UUID avatarID, AvatarWearable[] wearables, byte[] visualParams)
  306. {
  307. m_owner = avatarID;
  308. m_serial = 1;
  309. m_wearables = wearables;
  310. m_visualparams = visualParams;
  311. m_texture = GetDefaultTexture();
  312. }
  313. /// <summary>
  314. /// Set up appearance textures and avatar parameters, including a height calculation
  315. /// </summary>
  316. public virtual void SetAppearance(Primitive.TextureEntry textureEntry, byte[] visualParams)
  317. {
  318. if (textureEntry != null)
  319. m_texture = textureEntry;
  320. if (visualParams != null)
  321. m_visualparams = visualParams;
  322. m_avatarHeight = 1.23077f // Shortest possible avatar height
  323. + 0.516945f * (float)m_visualparams[(int)VPElement.SHAPE_HEIGHT] / 255.0f // Body height
  324. + 0.072514f * (float)m_visualparams[(int)VPElement.SHAPE_HEAD_SIZE] / 255.0f // Head size
  325. + 0.3836f * (float)m_visualparams[(int)VPElement.SHAPE_LEG_LENGTH] / 255.0f // Leg length
  326. + 0.08f * (float)m_visualparams[(int)VPElement.SHOES_PLATFORM_HEIGHT] / 255.0f // Shoe platform height
  327. + 0.07f * (float)m_visualparams[(int)VPElement.SHOES_HEEL_HEIGHT] / 255.0f // Shoe heel height
  328. + 0.076f * (float)m_visualparams[(int)VPElement.SHAPE_NECK_LENGTH] / 255.0f; // Neck length
  329. m_hipOffset = (((1.23077f // Half of avatar
  330. + 0.516945f * (float)m_visualparams[(int)VPElement.SHAPE_HEIGHT] / 255.0f // Body height
  331. + 0.3836f * (float)m_visualparams[(int)VPElement.SHAPE_LEG_LENGTH] / 255.0f // Leg length
  332. + 0.08f * (float)m_visualparams[(int)VPElement.SHOES_PLATFORM_HEIGHT] / 255.0f // Shoe platform height
  333. + 0.07f * (float)m_visualparams[(int)VPElement.SHOES_HEEL_HEIGHT] / 255.0f // Shoe heel height
  334. ) / 2) - m_avatarHeight / 2) * 0.31f - 0.0425f;
  335. //System.Console.WriteLine(">>>>>>> [APPEARANCE]: Height {0} Hip offset {1}" + m_avatarHeight + " " + m_hipOffset);
  336. //m_log.Debug("------------- Set Appearance Texture ---------------");
  337. //Primitive.TextureEntryFace[] faces = Texture.FaceTextures;
  338. //foreach (Primitive.TextureEntryFace face in faces)
  339. //{
  340. // if (face != null)
  341. // m_log.Debug(" ++ " + face.TextureID);
  342. // else
  343. // m_log.Debug(" ++ NULL ");
  344. //}
  345. //m_log.Debug("----------------------------");
  346. }
  347. public virtual void SetWearable(int wearableId, AvatarWearable wearable)
  348. {
  349. m_wearables[wearableId] = wearable;
  350. }
  351. public static Primitive.TextureEntry GetDefaultTexture()
  352. {
  353. Primitive.TextureEntry textu = new Primitive.TextureEntry(new UUID("C228D1CF-4B5D-4BA8-84F4-899A0796AA97"));
  354. textu.CreateFace(0).TextureID = new UUID("00000000-0000-1111-9999-000000000012");
  355. textu.CreateFace(1).TextureID = Util.BLANK_TEXTURE_UUID;
  356. textu.CreateFace(2).TextureID = Util.BLANK_TEXTURE_UUID;
  357. textu.CreateFace(3).TextureID = new UUID("6522E74D-1660-4E7F-B601-6F48C1659A77");
  358. textu.CreateFace(4).TextureID = new UUID("7CA39B4C-BD19-4699-AFF7-F93FD03D3E7B");
  359. textu.CreateFace(5).TextureID = new UUID("00000000-0000-1111-9999-000000000010");
  360. textu.CreateFace(6).TextureID = new UUID("00000000-0000-1111-9999-000000000011");
  361. return textu;
  362. }
  363. public static byte[] GetDefaultVisualParams()
  364. {
  365. byte[] visualParams;
  366. visualParams = new byte[VISUALPARAM_COUNT];
  367. for (int i = 0; i < VISUALPARAM_COUNT; i++)
  368. {
  369. visualParams[i] = 100;
  370. }
  371. return visualParams;
  372. }
  373. public override String ToString()
  374. {
  375. String s = "[Wearables] =>";
  376. s += " Body Item: " + BodyItem.ToString() + ";";
  377. s += " Skin Item: " + SkinItem.ToString() + ";";
  378. s += " Shirt Item: " + ShirtItem.ToString() + ";";
  379. s += " Pants Item: " + PantsItem.ToString() + ";";
  380. return s;
  381. }
  382. // this is used for OGS1
  383. public virtual Hashtable ToHashTable()
  384. {
  385. Hashtable h = new Hashtable();
  386. h["owner"] = Owner.ToString();
  387. h["serial"] = Serial.ToString();
  388. h["visual_params"] = VisualParams;
  389. h["texture"] = Texture.GetBytes();
  390. h["avatar_height"] = AvatarHeight.ToString();
  391. h["body_item"] = BodyItem.ToString();
  392. h["body_asset"] = BodyAsset.ToString();
  393. h["skin_item"] = SkinItem.ToString();
  394. h["skin_asset"] = SkinAsset.ToString();
  395. h["hair_item"] = HairItem.ToString();
  396. h["hair_asset"] = HairAsset.ToString();
  397. h["eyes_item"] = EyesItem.ToString();
  398. h["eyes_asset"] = EyesAsset.ToString();
  399. h["shirt_item"] = ShirtItem.ToString();
  400. h["shirt_asset"] = ShirtAsset.ToString();
  401. h["pants_item"] = PantsItem.ToString();
  402. h["pants_asset"] = PantsAsset.ToString();
  403. h["shoes_item"] = ShoesItem.ToString();
  404. h["shoes_asset"] = ShoesAsset.ToString();
  405. h["socks_item"] = SocksItem.ToString();
  406. h["socks_asset"] = SocksAsset.ToString();
  407. h["jacket_item"] = JacketItem.ToString();
  408. h["jacket_asset"] = JacketAsset.ToString();
  409. h["gloves_item"] = GlovesItem.ToString();
  410. h["gloves_asset"] = GlovesAsset.ToString();
  411. h["undershirt_item"] = UnderShirtItem.ToString();
  412. h["undershirt_asset"] = UnderShirtAsset.ToString();
  413. h["underpants_item"] = UnderPantsItem.ToString();
  414. h["underpants_asset"] = UnderPantsAsset.ToString();
  415. h["skirt_item"] = SkirtItem.ToString();
  416. h["skirt_asset"] = SkirtAsset.ToString();
  417. string attachments = GetAttachmentsString();
  418. if (attachments != String.Empty)
  419. h["attachments"] = attachments;
  420. return h;
  421. }
  422. public AvatarAppearance(Hashtable h)
  423. {
  424. Owner = new UUID((string)h["owner"]);
  425. Serial = Convert.ToInt32((string)h["serial"]);
  426. VisualParams = (byte[])h["visual_params"];
  427. if (h.Contains("texture"))
  428. {
  429. byte[] te = h["texture"] as byte[];
  430. if (te != null && te.Length > 0)
  431. Texture = new Primitive.TextureEntry(te, 0, te.Length);
  432. }
  433. else
  434. {
  435. // We shouldn't be receiving appearance hashtables without a TextureEntry,
  436. // but in case we do this will prevent a failure when saving to the database
  437. Texture = GetDefaultTexture();
  438. }
  439. AvatarHeight = (float)Convert.ToDouble((string)h["avatar_height"]);
  440. m_wearables = new AvatarWearable[MAX_WEARABLES];
  441. for (int i = 0; i < MAX_WEARABLES; i++)
  442. {
  443. // this makes them all null
  444. m_wearables[i] = new AvatarWearable();
  445. }
  446. BodyItem = new UUID((string)h["body_item"]);
  447. BodyAsset = new UUID((string)h["body_asset"]);
  448. SkinItem = new UUID((string)h["skin_item"]);
  449. SkinAsset = new UUID((string)h["skin_asset"]);
  450. HairItem = new UUID((string)h["hair_item"]);
  451. HairAsset = new UUID((string)h["hair_asset"]);
  452. EyesItem = new UUID((string)h["eyes_item"]);
  453. EyesAsset = new UUID((string)h["eyes_asset"]);
  454. ShirtItem = new UUID((string)h["shirt_item"]);
  455. ShirtAsset = new UUID((string)h["shirt_asset"]);
  456. PantsItem = new UUID((string)h["pants_item"]);
  457. PantsAsset = new UUID((string)h["pants_asset"]);
  458. ShoesItem = new UUID((string)h["shoes_item"]);
  459. ShoesAsset = new UUID((string)h["shoes_asset"]);
  460. SocksItem = new UUID((string)h["socks_item"]);
  461. SocksAsset = new UUID((string)h["socks_asset"]);
  462. JacketItem = new UUID((string)h["jacket_item"]);
  463. JacketAsset = new UUID((string)h["jacket_asset"]);
  464. GlovesItem = new UUID((string)h["gloves_item"]);
  465. GlovesAsset = new UUID((string)h["gloves_asset"]);
  466. UnderShirtItem = new UUID((string)h["undershirt_item"]);
  467. UnderShirtAsset = new UUID((string)h["undershirt_asset"]);
  468. UnderPantsItem = new UUID((string)h["underpants_item"]);
  469. UnderPantsAsset = new UUID((string)h["underpants_asset"]);
  470. SkirtItem = new UUID((string)h["skirt_item"]);
  471. SkirtAsset = new UUID((string)h["skirt_asset"]);
  472. if (h.ContainsKey("attachments"))
  473. {
  474. SetAttachmentsString(h["attachments"].ToString());
  475. }
  476. }
  477. private Dictionary<int, UUID[]> m_attachments = new Dictionary<int, UUID[]>();
  478. public void SetAttachments(Hashtable data)
  479. {
  480. m_attachments.Clear();
  481. if (data == null)
  482. return;
  483. foreach (DictionaryEntry e in data)
  484. {
  485. int attachpoint = Convert.ToInt32(e.Key);
  486. if (m_attachments.ContainsKey(attachpoint))
  487. continue;
  488. UUID item;
  489. UUID asset;
  490. Hashtable uuids = (Hashtable) e.Value;
  491. UUID.TryParse(uuids["item"].ToString(), out item);
  492. UUID.TryParse(uuids["asset"].ToString(), out asset);
  493. UUID[] attachment = new UUID[2];
  494. attachment[0] = item;
  495. attachment[1] = asset;
  496. m_attachments[attachpoint] = attachment;
  497. }
  498. }
  499. public Hashtable GetAttachments()
  500. {
  501. if (m_attachments.Count == 0)
  502. return null;
  503. Hashtable ret = new Hashtable();
  504. foreach (KeyValuePair<int, UUID[]> kvp in m_attachments)
  505. {
  506. int attachpoint = kvp.Key;
  507. UUID[] uuids = kvp.Value;
  508. Hashtable data = new Hashtable();
  509. data["item"] = uuids[0].ToString();
  510. data["asset"] = uuids[1].ToString();
  511. ret[attachpoint] = data;
  512. }
  513. return ret;
  514. }
  515. public List<int> GetAttachedPoints()
  516. {
  517. return new List<int>(m_attachments.Keys);
  518. }
  519. public UUID GetAttachedItem(int attachpoint)
  520. {
  521. if (!m_attachments.ContainsKey(attachpoint))
  522. return UUID.Zero;
  523. return m_attachments[attachpoint][0];
  524. }
  525. public UUID GetAttachedAsset(int attachpoint)
  526. {
  527. if (!m_attachments.ContainsKey(attachpoint))
  528. return UUID.Zero;
  529. return m_attachments[attachpoint][1];
  530. }
  531. public void SetAttachment(int attachpoint, UUID item, UUID asset)
  532. {
  533. if (attachpoint == 0)
  534. return;
  535. if (item == UUID.Zero)
  536. {
  537. if (m_attachments.ContainsKey(attachpoint))
  538. m_attachments.Remove(attachpoint);
  539. return;
  540. }
  541. if (!m_attachments.ContainsKey(attachpoint))
  542. m_attachments[attachpoint] = new UUID[2];
  543. m_attachments[attachpoint][0] = item;
  544. m_attachments[attachpoint][1] = asset;
  545. }
  546. public int GetAttachpoint(UUID itemID)
  547. {
  548. foreach (KeyValuePair<int, UUID[]> kvp in m_attachments)
  549. {
  550. if (kvp.Value[0] == itemID)
  551. {
  552. return kvp.Key;
  553. }
  554. }
  555. return 0;
  556. }
  557. public void DetachAttachment(UUID itemID)
  558. {
  559. int attachpoint = GetAttachpoint(itemID);
  560. if (attachpoint > 0)
  561. m_attachments.Remove(attachpoint);
  562. }
  563. public void ClearAttachments()
  564. {
  565. m_attachments.Clear();
  566. }
  567. string GetAttachmentsString()
  568. {
  569. List<string> strings = new List<string>();
  570. foreach (KeyValuePair<int, UUID[]> e in m_attachments)
  571. {
  572. strings.Add(e.Key.ToString());
  573. strings.Add(e.Value[0].ToString());
  574. strings.Add(e.Value[1].ToString());
  575. }
  576. return String.Join(",", strings.ToArray());
  577. }
  578. void SetAttachmentsString(string data)
  579. {
  580. string[] strings = data.Split(new char[] {','});
  581. int i = 0;
  582. m_attachments.Clear();
  583. while (strings.Length - i > 2)
  584. {
  585. int attachpoint = Int32.Parse(strings[i]);
  586. UUID item = new UUID(strings[i+1]);
  587. UUID asset = new UUID(strings[i+2]);
  588. i += 3;
  589. if (!m_attachments.ContainsKey(attachpoint))
  590. {
  591. m_attachments[attachpoint] = new UUID[2];
  592. m_attachments[attachpoint][0] = item;
  593. m_attachments[attachpoint][1] = asset;
  594. }
  595. }
  596. }
  597. /// <summary>
  598. /// Viewer Params Array Element for AgentSetAppearance
  599. /// Generated from LibOMV's Visual Params list
  600. /// </summary>
  601. public enum VPElement : int
  602. {
  603. /// <summary>
  604. /// Brow Size - Small 0--+255 Large
  605. /// </summary>
  606. SHAPE_BIG_BROW = 0,
  607. /// <summary>
  608. /// Nose Size - Small 0--+255 Large
  609. /// </summary>
  610. SHAPE_NOSE_BIG_OUT = 1,
  611. /// <summary>
  612. /// Nostril Width - Narrow 0--+255 Broad
  613. /// </summary>
  614. SHAPE_BROAD_NOSTRILS = 2,
  615. /// <summary>
  616. /// Chin Cleft - Round 0--+255 Cleft
  617. /// </summary>
  618. SHAPE_CLEFT_CHIN = 3,
  619. /// <summary>
  620. /// Nose Tip Shape - Pointy 0--+255 Bulbous
  621. /// </summary>
  622. SHAPE_BULBOUS_NOSE_TIP = 4,
  623. /// <summary>
  624. /// Chin Angle - Chin Out 0--+255 Chin In
  625. /// </summary>
  626. SHAPE_WEAK_CHIN = 5,
  627. /// <summary>
  628. /// Chin-Neck - Tight Chin 0--+255 Double Chin
  629. /// </summary>
  630. SHAPE_DOUBLE_CHIN = 6,
  631. /// <summary>
  632. /// Lower Cheeks - Well-Fed 0--+255 Sunken
  633. /// </summary>
  634. SHAPE_SUNKEN_CHEEKS = 7,
  635. /// <summary>
  636. /// Upper Bridge - Low 0--+255 High
  637. /// </summary>
  638. SHAPE_NOBLE_NOSE_BRIDGE = 8,
  639. /// <summary>
  640. /// - Less 0--+255 More
  641. /// </summary>
  642. SHAPE_JOWLS = 9,
  643. /// <summary>
  644. /// Upper Chin Cleft - Round 0--+255 Cleft
  645. /// </summary>
  646. SHAPE_CLEFT_CHIN_UPPER = 10,
  647. /// <summary>
  648. /// Cheek Bones - Low 0--+255 High
  649. /// </summary>
  650. SHAPE_HIGH_CHEEK_BONES = 11,
  651. /// <summary>
  652. /// Ear Angle - In 0--+255 Out
  653. /// </summary>
  654. SHAPE_EARS_OUT = 12,
  655. /// <summary>
  656. /// Eyebrow Points - Smooth 0--+255 Pointy
  657. /// </summary>
  658. HAIR_POINTY_EYEBROWS = 13,
  659. /// <summary>
  660. /// Jaw Shape - Pointy 0--+255 Square
  661. /// </summary>
  662. SHAPE_SQUARE_JAW = 14,
  663. /// <summary>
  664. /// Upper Cheeks - Thin 0--+255 Puffy
  665. /// </summary>
  666. SHAPE_PUFFY_UPPER_CHEEKS = 15,
  667. /// <summary>
  668. /// Nose Tip Angle - Downturned 0--+255 Upturned
  669. /// </summary>
  670. SHAPE_UPTURNED_NOSE_TIP = 16,
  671. /// <summary>
  672. /// Nose Thickness - Thin Nose 0--+255 Bulbous Nose
  673. /// </summary>
  674. SHAPE_BULBOUS_NOSE = 17,
  675. /// <summary>
  676. /// Upper Eyelid Fold - Uncreased 0--+255 Creased
  677. /// </summary>
  678. SHAPE_UPPER_EYELID_FOLD = 18,
  679. /// <summary>
  680. /// Attached Earlobes - Unattached 0--+255 Attached
  681. /// </summary>
  682. SHAPE_ATTACHED_EARLOBES = 19,
  683. /// <summary>
  684. /// Eye Bags - Smooth 0--+255 Baggy
  685. /// </summary>
  686. SHAPE_BAGGY_EYES = 20,
  687. /// <summary>
  688. /// Eye Opening - Narrow 0--+255 Wide
  689. /// </summary>
  690. SHAPE_WIDE_EYES = 21,
  691. /// <summary>
  692. /// Lip Cleft - Narrow 0--+255 Wide
  693. /// </summary>
  694. SHAPE_WIDE_LIP_CLEFT = 22,
  695. /// <summary>
  696. /// Bridge Width - Narrow 0--+255 Wide
  697. /// </summary>
  698. SHAPE_WIDE_NOSE_BRIDGE = 23,
  699. /// <summary>
  700. /// Eyebrow Arc - Flat 0--+255 Arced
  701. /// </summary>
  702. HAIR_ARCED_EYEBROWS = 24,
  703. /// <summary>
  704. /// Height - Short 0--+255 Tall
  705. /// </summary>
  706. SHAPE_HEIGHT = 25,
  707. /// <summary>
  708. /// Body Thickness - Body Thin 0--+255 Body Thick
  709. /// </summary>
  710. SHAPE_THICKNESS = 26,
  711. /// <summary>
  712. /// Ear Size - Small 0--+255 Large
  713. /// </summary>
  714. SHAPE_BIG_EARS = 27,
  715. /// <summary>
  716. /// Shoulders - Narrow 0--+255 Broad
  717. /// </summary>
  718. SHAPE_SHOULDERS = 28,
  719. /// <summary>
  720. /// Hip Width - Narrow 0--+255 Wide
  721. /// </summary>
  722. SHAPE_HIP_WIDTH = 29,
  723. /// <summary>
  724. /// - Short Torso 0--+255 Long Torso
  725. /// </summary>
  726. SHAPE_TORSO_LENGTH = 30,
  727. SHAPE_MALE = 31,
  728. /// <summary>
  729. /// - Short 0--+255 Long
  730. /// </summary>
  731. GLOVES_GLOVE_LENGTH = 32,
  732. /// <summary>
  733. /// - Darker 0--+255 Lighter
  734. /// </summary>
  735. EYES_EYE_LIGHTNESS = 33,
  736. /// <summary>
  737. /// - Natural 0--+255 Unnatural
  738. /// </summary>
  739. EYES_EYE_COLOR = 34,
  740. /// <summary>
  741. /// - Small 0--+255 Large
  742. /// </summary>
  743. SHAPE_BREAST_SIZE = 35,
  744. /// <summary>
  745. /// - None 0--+255 Wild
  746. /// </summary>
  747. SKIN_RAINBOW_COLOR = 36,
  748. /// <summary>
  749. /// Ruddiness - Pale 0--+255 Ruddy
  750. /// </summary>
  751. SKIN_RED_SKIN = 37,
  752. /// <summary>
  753. /// - Light 0--+255 Dark
  754. /// </summary>
  755. SKIN_PIGMENT = 38,
  756. HAIR_RAINBOW_COLOR_39 = 39,
  757. /// <summary>
  758. /// - No Red 0--+255 Very Red
  759. /// </summary>
  760. HAIR_RED_HAIR = 40,
  761. /// <summary>
  762. /// - Black 0--+255 Blonde
  763. /// </summary>
  764. HAIR_BLONDE_HAIR = 41,
  765. /// <summary>
  766. /// - No White 0--+255 All White
  767. /// </summary>
  768. HAIR_WHITE_HAIR = 42,
  769. /// <summary>
  770. /// - Less Rosy 0--+255 More Rosy
  771. /// </summary>
  772. SKIN_ROSY_COMPLEXION = 43,
  773. /// <summary>
  774. /// - Darker 0--+255 Pinker
  775. /// </summary>
  776. SKIN_LIP_PINKNESS = 44,
  777. /// <summary>
  778. /// - Thin Eyebrows 0--+255 Bushy Eyebrows
  779. /// </summary>
  780. HAIR_EYEBROW_SIZE = 45,
  781. /// <summary>
  782. /// - Short 0--+255 Long
  783. /// </summary>
  784. HAIR_FRONT_FRINGE = 46,
  785. /// <summary>
  786. /// - Short 0--+255 Long
  787. /// </summary>
  788. HAIR_SIDE_FRINGE = 47,
  789. /// <summary>
  790. /// - Short 0--+255 Long
  791. /// </summary>
  792. HAIR_BACK_FRINGE = 48,
  793. /// <summary>
  794. /// - Short 0--+255 Long
  795. /// </summary>
  796. HAIR_HAIR_FRONT = 49,
  797. /// <summary>
  798. /// - Short 0--+255 Long
  799. /// </summary>
  800. HAIR_HAIR_SIDES = 50,
  801. /// <summary>
  802. /// - Short 0--+255 Long
  803. /// </summary>
  804. HAIR_HAIR_BACK = 51,
  805. /// <summary>
  806. /// - Sweep Forward 0--+255 Sweep Back
  807. /// </summary>
  808. HAIR_HAIR_SWEEP = 52,
  809. /// <summary>
  810. /// - Left 0--+255 Right
  811. /// </summary>
  812. HAIR_HAIR_TILT = 53,
  813. /// <summary>
  814. /// Middle Part - No Part 0--+255 Part
  815. /// </summary>
  816. HAIR_HAIR_PART_MIDDLE = 54,
  817. /// <summary>
  818. /// Right Part - No Part 0--+255 Part
  819. /// </summary>
  820. HAIR_HAIR_PART_RIGHT = 55,
  821. /// <summary>
  822. /// Left Part - No Part 0--+255 Part
  823. /// </summary>
  824. HAIR_HAIR_PART_LEFT = 56,
  825. /// <summary>
  826. /// Full Hair Sides - Mowhawk 0--+255 Full Sides
  827. /// </summary>
  828. HAIR_HAIR_SIDES_FULL = 57,
  829. /// <summary>
  830. /// - Less 0--+255 More
  831. /// </summary>
  832. SKIN_BODY_DEFINITION = 58,
  833. /// <summary>
  834. /// Lip Width - Narrow Lips 0--+255 Wide Lips
  835. /// </summary>
  836. SHAPE_LIP_WIDTH = 59,
  837. /// <summary>
  838. /// - Small 0--+255 Big
  839. /// </summary>
  840. SHAPE_BELLY_SIZE = 60,
  841. /// <summary>
  842. /// - Less 0--+255 More
  843. /// </summary>
  844. SKIN_FACIAL_DEFINITION = 61,
  845. /// <summary>
  846. /// - Less 0--+255 More
  847. /// </summary>
  848. SKIN_WRINKLES = 62,
  849. /// <summary>
  850. /// - Less 0--+255 More
  851. /// </summary>
  852. SKIN_FRECKLES = 63,
  853. /// <summary>
  854. /// - Short Sideburns 0--+255 Mutton Chops
  855. /// </summary>
  856. HAIR_SIDEBURNS = 64,
  857. /// <summary>
  858. /// - Chaplin 0--+255 Handlebars
  859. /// </summary>
  860. HAIR_MOUSTACHE = 65,
  861. /// <summary>
  862. /// - Less soul 0--+255 More soul
  863. /// </summary>
  864. HAIR_SOULPATCH = 66,
  865. /// <summary>
  866. /// - Less Curtains 0--+255 More Curtains
  867. /// </summary>
  868. HAIR_CHIN_CURTAINS = 67,
  869. /// <summary>
  870. /// Rumpled Hair - Smooth Hair 0--+255 Rumpled Hair
  871. /// </summary>
  872. HAIR_HAIR_RUMPLED = 68,
  873. /// <summary>
  874. /// Big Hair Front - Less 0--+255 More
  875. /// </summary>
  876. HAIR_HAIR_BIG_FRONT = 69,
  877. /// <summary>
  878. /// Big Hair Top - Less 0--+255 More
  879. /// </summary>
  880. HAIR_HAIR_BIG_TOP = 70,
  881. /// <summary>
  882. /// Big Hair Back - Less 0--+255 More
  883. /// </summary>
  884. HAIR_HAIR_BIG_BACK = 71,
  885. /// <summary>
  886. /// Spiked Hair - No Spikes 0--+255 Big Spikes
  887. /// </summary>
  888. HAIR_HAIR_SPIKED = 72,
  889. /// <summary>
  890. /// Chin Depth - Shallow 0--+255 Deep
  891. /// </summary>
  892. SHAPE_DEEP_CHIN = 73,
  893. /// <summary>
  894. /// Part Bangs - No Part 0--+255 Part Bangs
  895. /// </summary>
  896. HAIR_BANGS_PART_MIDDLE = 74,
  897. /// <summary>
  898. /// Head Shape - More Square 0--+255 More Round
  899. /// </summary>
  900. SHAPE_HEAD_SHAPE = 75,
  901. /// <summary>
  902. /// Eye Spacing - Close Set Eyes 0--+255 Far Set Eyes
  903. /// </summary>
  904. SHAPE_EYE_SPACING = 76,
  905. /// <summary>
  906. /// - Low Heels 0--+255 High Heels
  907. /// </summary>
  908. SHOES_HEEL_HEIGHT = 77,
  909. /// <summary>
  910. /// - Low Platforms 0--+255 High Platforms
  911. /// </summary>
  912. SHOES_PLATFORM_HEIGHT = 78,
  913. /// <summary>
  914. /// - Thin Lips 0--+255 Fat Lips
  915. /// </summary>
  916. SHAPE_LIP_THICKNESS = 79,
  917. /// <summary>
  918. /// Mouth Position - High 0--+255 Low
  919. /// </summary>
  920. SHAPE_MOUTH_HEIGHT = 80,
  921. /// <summary>
  922. /// Breast Buoyancy - Less Gravity 0--+255 More Gravity
  923. /// </summary>
  924. SHAPE_BREAST_GRAVITY = 81,
  925. /// <summary>
  926. /// Platform Width - Narrow 0--+255 Wide
  927. /// </summary>
  928. SHOES_SHOE_PLATFORM_WIDTH = 82,
  929. /// <summary>
  930. /// - Pointy Heels 0--+255 Thick Heels
  931. /// </summary>
  932. SHOES_HEEL_SHAPE = 83,
  933. /// <summary>
  934. /// - Pointy 0--+255 Square
  935. /// </summary>
  936. SHOES_TOE_SHAPE = 84,
  937. /// <summary>
  938. /// Foot Size - Small 0--+255 Big
  939. /// </summary>
  940. SHAPE_FOOT_SIZE = 85,
  941. /// <summary>
  942. /// Nose Width - Narrow 0--+255 Wide
  943. /// </summary>
  944. SHAPE_WIDE_NOSE = 86,
  945. /// <summary>
  946. /// Eyelash Length - Short 0--+255 Long
  947. /// </summary>
  948. SHAPE_EYELASHES_LONG = 87,
  949. /// <summary>
  950. /// - Short 0--+255 Long
  951. /// </summary>
  952. UNDERSHIRT_SLEEVE_LENGTH = 88,
  953. /// <summary>
  954. /// - Short 0--+255 Long
  955. /// </summary>
  956. UNDERSHIRT_BOTTOM = 89,
  957. /// <summary>
  958. /// - Low 0--+255 High
  959. /// </summary>
  960. UNDERSHIRT_COLLAR_FRONT = 90,
  961. JACKET_SLEEVE_LENGTH_91 = 91,
  962. JACKET_COLLAR_FRONT_92 = 92,
  963. /// <summary>
  964. /// Jacket Length - Short 0--+255 Long
  965. /// </summary>
  966. JACKET_BOTTOM_LENGTH_LOWER = 93,
  967. /// <summary>
  968. /// Open Front - Open 0--+255 Closed
  969. /// </summary>
  970. JACKET_OPEN_JACKET = 94,
  971. /// <summary>
  972. /// - Short 0--+255 Tall
  973. /// </summary>
  974. SHOES_SHOE_HEIGHT = 95,
  975. /// <summary>
  976. /// - Short 0--+255 Long
  977. /// </summary>
  978. SOCKS_SOCKS_LENGTH = 96,
  979. /// <summary>
  980. /// - Short 0--+255 Long
  981. /// </summary>
  982. UNDERPANTS_PANTS_LENGTH = 97,
  983. /// <summary>
  984. /// - Low 0--+255 High
  985. /// </summary>
  986. UNDERPANTS_PANTS_WAIST = 98,
  987. /// <summary>
  988. /// Cuff Flare - Tight Cuffs 0--+255 Flared Cuffs
  989. /// </summary>
  990. PANTS_LEG_PANTFLAIR = 99,
  991. /// <summary>
  992. /// - More Vertical 0--+255 More Sloped
  993. /// </summary>
  994. SHAPE_FOREHEAD_ANGLE = 100,
  995. /// <summary>
  996. /// - Less Body Fat 0--+255 More Body Fat
  997. /// </summary>
  998. SHAPE_BODY_FAT = 101,
  999. /// <summary>
  1000. /// Pants Crotch - High and Tight 0--+255 Low and Loose
  1001. /// </summary>
  1002. PANTS_LOW_CROTCH = 102,
  1003. /// <summary>
  1004. /// Egg Head - Chin Heavy 0--+255 Forehead Heavy
  1005. /// </summary>
  1006. SHAPE_EGG_HEAD = 103,
  1007. /// <summary>
  1008. /// Head Stretch - Squash Head 0--+255 Stretch Head
  1009. /// </summary>
  1010. SHAPE_SQUASH_STRETCH_HEAD = 104,
  1011. /// <summary>
  1012. /// Torso Muscles - Less Muscular 0--+255 More Muscular
  1013. /// </summary>
  1014. SHAPE_TORSO_MUSCLES = 105,
  1015. /// <summary>
  1016. /// Outer Eye Corner - Corner Down 0--+255 Corner Up
  1017. /// </summary>
  1018. SHAPE_EYELID_CORNER_UP = 106,
  1019. /// <summary>
  1020. /// - Less Muscular 0--+255 More Muscular
  1021. /// </summary>
  1022. SHAPE_LEG_MUSCLES = 107,
  1023. /// <summary>
  1024. /// Lip Fullness - Less Full 0--+255 More Full
  1025. /// </summary>
  1026. SHAPE_TALL_LIPS = 108,
  1027. /// <summary>
  1028. /// Toe Thickness - Flat Toe 0--+255 Thick Toe
  1029. /// </summary>
  1030. SHOES_SHOE_TOE_THICK = 109,
  1031. /// <summary>
  1032. /// Crooked Nose - Nose Left 0--+255 Nose Right
  1033. /// </summary>
  1034. SHAPE_CROOKED_NOSE = 110,
  1035. /// <summary>
  1036. /// - Corner Down 0--+255 Corner Up
  1037. /// </summary>
  1038. SHAPE_MOUTH_CORNER = 111,
  1039. /// <summary>
  1040. /// - Shear Right Up 0--+255 Shear Left Up
  1041. /// </summary>
  1042. SHAPE_FACE_SHEAR = 112,
  1043. /// <summary>
  1044. /// Shift Mouth - Shift Left 0--+255 Shift Right
  1045. /// </summary>
  1046. SHAPE_SHIFT_MOUTH = 113,
  1047. /// <summary>
  1048. /// Eye Pop - Pop Right Eye 0--+255 Pop Left Eye
  1049. /// </summary>
  1050. SHAPE_POP_EYE = 114,
  1051. /// <summary>
  1052. /// Jaw Jut - Overbite 0--+255 Underbite
  1053. /// </summary>
  1054. SHAPE_JAW_JUT = 115,
  1055. /// <summary>
  1056. /// Shear Back - Full Back 0--+255 Sheared Back
  1057. /// </summary>
  1058. HAIR_HAIR_SHEAR_BACK = 116,
  1059. /// <summary>
  1060. /// - Small Hands 0--+255 Large Hands
  1061. /// </summary>
  1062. SHAPE_HAND_SIZE = 117,
  1063. /// <summary>
  1064. /// Love Handles - Less Love 0--+255 More Love
  1065. /// </summary>
  1066. SHAPE_LOVE_HANDLES = 118,
  1067. SHAPE_TORSO_MUSCLES_119 = 119,
  1068. /// <summary>
  1069. /// Head Size - Small Head 0--+255 Big Head
  1070. /// </summary>
  1071. SHAPE_HEAD_SIZE = 120,
  1072. /// <summary>
  1073. /// - Skinny Neck 0--+255 Thick Neck
  1074. /// </summary>
  1075. SHAPE_NECK_THICKNESS = 121,
  1076. /// <summary>
  1077. /// Breast Cleavage - Separate 0--+255 Join
  1078. /// </summary>
  1079. SHAPE_BREAST_FEMALE_CLEAVAGE = 122,
  1080. /// <summary>
  1081. /// Pectorals - Big Pectorals 0--+255 Sunken Chest
  1082. /// </summary>
  1083. SHAPE_CHEST_MALE_NO_PECS = 123,
  1084. /// <summary>
  1085. /// Eye Size - Beady Eyes 0--+255 Anime Eyes
  1086. /// </summary>
  1087. SHAPE_EYE_SIZE = 124,
  1088. /// <summary>
  1089. /// - Short Legs 0--+255 Long Legs
  1090. /// </summary>
  1091. SHAPE_LEG_LENGTH = 125,
  1092. /// <summary>
  1093. /// - Short Arms 0--+255 Long arms
  1094. /// </summary>
  1095. SHAPE_ARM_LENGTH = 126,
  1096. /// <summary>
  1097. /// - Pink 0--+255 Black
  1098. /// </summary>
  1099. SKIN_LIPSTICK_COLOR = 127,
  1100. /// <summary>
  1101. /// - No Lipstick 0--+255 More Lipstick
  1102. /// </summary>
  1103. SKIN_LIPSTICK = 128,
  1104. /// <summary>
  1105. /// - No Lipgloss 0--+255 Glossy
  1106. /// </summary>
  1107. SKIN_LIPGLOSS = 129,
  1108. /// <summary>
  1109. /// - No Eyeliner 0--+255 Full Eyeliner
  1110. /// </summary>
  1111. SKIN_EYELINER = 130,
  1112. /// <summary>
  1113. /// - No Blush 0--+255 More Blush
  1114. /// </summary>
  1115. SKIN_BLUSH = 131,
  1116. /// <summary>
  1117. /// - Pink 0--+255 Orange
  1118. /// </summary>
  1119. SKIN_BLUSH_COLOR = 132,
  1120. /// <summary>
  1121. /// - Clear 0--+255 Opaque
  1122. /// </summary>
  1123. SKIN_OUT_SHDW_OPACITY = 133,
  1124. /// <summary>
  1125. /// - No Eyeshadow 0--+255 More Eyeshadow
  1126. /// </summary>
  1127. SKIN_OUTER_SHADOW = 134,
  1128. /// <summary>
  1129. /// - Light 0--+255 Dark
  1130. /// </summary>
  1131. SKIN_OUT_SHDW_COLOR = 135,
  1132. /// <summary>
  1133. /// - No Eyeshadow 0--+255 More Eyeshadow
  1134. /// </summary>
  1135. SKIN_INNER_SHADOW = 136,
  1136. /// <summary>
  1137. /// - No Polish 0--+255 Painted Nails
  1138. /// </summary>
  1139. SKIN_NAIL_POLISH = 137,
  1140. /// <summary>
  1141. /// - Clear 0--+255 Opaque
  1142. /// </summary>
  1143. SKIN_BLUSH_OPACITY = 138,
  1144. /// <summary>
  1145. /// - Light 0--+255 Dark
  1146. /// </summary>
  1147. SKIN_IN_SHDW_COLOR = 139,
  1148. /// <summary>
  1149. /// - Clear 0--+255 Opaque
  1150. /// </summary>
  1151. SKIN_IN_SHDW_OPACITY = 140,
  1152. /// <summary>
  1153. /// - Dark Green 0--+255 Black
  1154. /// </summary>
  1155. SKIN_EYELINER_COLOR = 141,
  1156. /// <summary>
  1157. /// - Pink 0--+255 Black
  1158. /// </summary>
  1159. SKIN_NAIL_POLISH_COLOR = 142,
  1160. /// <summary>
  1161. /// - Sparse 0--+255 Dense
  1162. /// </summary>
  1163. HAIR_EYEBROW_DENSITY = 143,
  1164. /// <summary>
  1165. /// - 5 O'Clock Shadow 0--+255 Bushy Hair
  1166. /// </summary>
  1167. HAIR_HAIR_THICKNESS = 144,
  1168. /// <summary>
  1169. /// Saddle Bags - Less Saddle 0--+255 More Saddle
  1170. /// </summary>
  1171. SHAPE_SADDLEBAGS = 145,
  1172. /// <summary>
  1173. /// Taper Back - Wide Back 0--+255 Narrow Back
  1174. /// </summary>
  1175. HAIR_HAIR_TAPER_BACK = 146,
  1176. /// <summary>
  1177. /// Taper Front - Wide Front 0--+255 Narrow Front
  1178. /// </summary>
  1179. HAIR_HAIR_TAPER_FRONT = 147,
  1180. /// <summary>
  1181. /// - Short Neck 0--+255 Long Neck
  1182. /// </summary>
  1183. SHAPE_NECK_LENGTH = 148,
  1184. /// <summary>
  1185. /// Eyebrow Height - Higher 0--+255 Lower
  1186. /// </summary>
  1187. HAIR_LOWER_EYEBROWS = 149,
  1188. /// <summary>
  1189. /// Lower Bridge - Low 0--+255 High
  1190. /// </summary>
  1191. SHAPE_LOWER_BRIDGE_NOSE = 150,
  1192. /// <summary>
  1193. /// Nostril Division - High 0--+255 Low
  1194. /// </summary>
  1195. SHAPE_LOW_SEPTUM_NOSE = 151,
  1196. /// <summary>
  1197. /// Jaw Angle - Low Jaw 0--+255 High Jaw
  1198. /// </summary>
  1199. SHAPE_JAW_ANGLE = 152,
  1200. /// <summary>
  1201. /// Shear Front - Full Front 0--+255 Sheared Front
  1202. /// </summary>
  1203. HAIR_HAIR_SHEAR_FRONT = 153,
  1204. /// <summary>
  1205. /// - Less Volume 0--+255 More Volume
  1206. /// </summary>
  1207. HAIR_HAIR_VOLUME = 154,
  1208. /// <summary>
  1209. /// Lip Cleft Depth - Shallow 0--+255 Deep
  1210. /// </summary>
  1211. SHAPE_LIP_CLEFT_DEEP = 155,
  1212. /// <summary>
  1213. /// Puffy Eyelids - Flat 0--+255 Puffy
  1214. /// </summary>
  1215. SHAPE_PUFFY_LOWER_LIDS = 156,
  1216. /// <summary>
  1217. /// - Sunken Eyes 0--+255 Bugged Eyes
  1218. /// </summary>
  1219. SHAPE_EYE_DEPTH = 157,
  1220. /// <summary>
  1221. /// - Flat Head 0--+255 Long Head
  1222. /// </summary>
  1223. SHAPE_HEAD_LENGTH = 158,
  1224. /// <summary>
  1225. /// - Less Freckles 0--+255 More Freckles
  1226. /// </summary>
  1227. SKIN_BODY_FRECKLES = 159,
  1228. /// <summary>
  1229. /// - Low 0--+255 High
  1230. /// </summary>
  1231. UNDERSHIRT_COLLAR_BACK = 160,
  1232. JACKET_COLLAR_BACK_161 = 161,
  1233. SHIRT_COLLAR_BACK_162 = 162,
  1234. /// <summary>
  1235. /// - Short Pigtails 0--+255 Long Pigtails
  1236. /// </summary>
  1237. HAIR_PIGTAILS = 163,
  1238. /// <summary>
  1239. /// - Short Ponytail 0--+255 Long Ponytail
  1240. /// </summary>
  1241. HAIR_PONYTAIL = 164,
  1242. /// <summary>
  1243. /// Butt Size - Flat Butt 0--+255 Big Butt
  1244. /// </summary>
  1245. SHAPE_BUTT_SIZE = 165,
  1246. /// <summary>
  1247. /// Ear Tips - Flat 0--+255 Pointy
  1248. /// </summary>
  1249. SHAPE_POINTY_EARS = 166,
  1250. /// <summary>
  1251. /// Lip Ratio - More Upper Lip 0--+255 More Lower Lip
  1252. /// </summary>
  1253. SHAPE_LIP_RATIO = 167,
  1254. SHIRT_SLEEVE_LENGTH_168 = 168,
  1255. /// <summary>
  1256. /// - Short 0--+255 Long
  1257. /// </summary>
  1258. SHIRT_SHIRT_BOTTOM = 169,
  1259. SHIRT_COLLAR_FRONT_170 = 170,
  1260. SHIRT_SHIRT_RED = 171,
  1261. SHIRT_SHIRT_GREEN = 172,
  1262. SHIRT_SHIRT_BLUE = 173,
  1263. PANTS_PANTS_RED = 174,
  1264. PANTS_PANTS_GREEN = 175,
  1265. PANTS_PANTS_BLUE = 176,
  1266. SHOES_SHOES_RED = 177,
  1267. SHOES_SHOES_GREEN = 178,
  1268. /// <summary>
  1269. /// - Low 0--+255 High
  1270. /// </summary>
  1271. PANTS_WAIST_HEIGHT = 179,
  1272. PANTS_PANTS_LENGTH_180 = 180,
  1273. /// <summary>
  1274. /// Pants Fit - Tight Pants 0--+255 Loose Pants
  1275. /// </summary>
  1276. PANTS_LOOSE_LOWER_CLOTHING = 181,
  1277. SHOES_SHOES_BLUE = 182,
  1278. SOCKS_SOCKS_RED = 183,
  1279. SOCKS_SOCKS_GREEN = 184,
  1280. SOCKS_SOCKS_BLUE = 185,
  1281. UNDERSHIRT_UNDERSHIRT_RED = 186,
  1282. UNDERSHIRT_UNDERSHIRT_GREEN = 187,
  1283. UNDERSHIRT_UNDERSHIRT_BLUE = 188,
  1284. UNDERPANTS_UNDERPANTS_RED = 189,
  1285. UNDERPANTS_UNDERPANTS_GREEN = 190,
  1286. UNDERPANTS_UNDERPANTS_BLUE = 191,
  1287. GLOVES_GLOVES_RED = 192,
  1288. /// <summary>
  1289. /// Shirt Fit - Tight Shirt 0--+255 Loose Shirt
  1290. /// </summary>
  1291. SHIRT_LOOSE_UPPER_CLOTHING = 193,
  1292. GLOVES_GLOVES_GREEN = 194,
  1293. GLOVES_GLOVES_BLUE = 195,
  1294. JACKET_JACKET_RED = 196,
  1295. JACKET_JACKET_GREEN = 197,
  1296. JACKET_JACKET_BLUE = 198,
  1297. /// <summary>
  1298. /// Sleeve Looseness - Tight Sleeves 0--+255 Loose Sleeves
  1299. /// </summary>
  1300. SHIRT_SHIRTSLEEVE_FLAIR = 199,
  1301. /// <summary>
  1302. /// Knee Angle - Knock Kneed 0--+255 Bow Legged
  1303. /// </summary>
  1304. SHAPE_BOWED_LEGS = 200,
  1305. /// <summary>
  1306. /// - Short hips 0--+255 Long Hips
  1307. /// </summary>
  1308. SHAPE_HIP_LENGTH = 201,
  1309. /// <summary>
  1310. /// - Fingerless 0--+255 Fingers
  1311. /// </summary>
  1312. GLOVES_GLOVE_FINGERS = 202,
  1313. /// <summary>
  1314. /// bustle skirt - no bustle 0--+255 more bustle
  1315. /// </summary>
  1316. SKIRT_SKIRT_BUSTLE = 203,
  1317. /// <summary>
  1318. /// - Short 0--+255 Long
  1319. /// </summary>
  1320. SKIRT_SKIRT_LENGTH = 204,
  1321. /// <summary>
  1322. /// - Open Front 0--+255 Closed Front
  1323. /// </summary>
  1324. SKIRT_SLIT_FRONT = 205,
  1325. /// <summary>
  1326. /// - Open Back 0--+255 Closed Back
  1327. /// </summary>
  1328. SKIRT_SLIT_BACK = 206,
  1329. /// <summary>
  1330. /// - Open Left 0--+255 Closed Left
  1331. /// </summary>
  1332. SKIRT_SLIT_LEFT = 207,
  1333. /// <summary>
  1334. /// - Open Right 0--+255 Closed Right
  1335. /// </summary>
  1336. SKIRT_SLIT_RIGHT = 208,
  1337. /// <summary>
  1338. /// Skirt Fit - Tight Skirt 0--+255 Poofy Skirt
  1339. /// </summary>
  1340. SKIRT_SKIRT_LOOSENESS = 209,
  1341. SHIRT_SHIRT_WRINKLES = 210,
  1342. PANTS_PANTS_WRINKLES = 211,
  1343. /// <summary>
  1344. /// Jacket Wrinkles - No Wrinkles 0--+255 Wrinkles
  1345. /// </summary>
  1346. JACKET_JACKET_WRINKLES = 212,
  1347. /// <summary>
  1348. /// Package - Coin Purse 0--+255 Duffle Bag
  1349. /// </summary>
  1350. SHAPE_MALE_PACKAGE = 213,
  1351. /// <summary>
  1352. /// Inner Eye Corner - Corner Down 0--+255 Corner Up
  1353. /// </summary>
  1354. SHAPE_EYELID_INNER_CORNER_UP = 214,
  1355. SKIRT_SKIRT_RED = 215,
  1356. SKIRT_SKIRT_GREEN = 216,
  1357. SKIRT_SKIRT_BLUE = 217
  1358. }
  1359. }
  1360. }