AvatarAppearance.cs 53 KB

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