1
0

AvatarAppearance.cs 53 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492
  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(AttachmentData[] data)
  479. {
  480. foreach (AttachmentData a in data)
  481. {
  482. m_attachments[a.AttachPoint] = new UUID[2];
  483. m_attachments[a.AttachPoint][0] = a.ItemID;
  484. m_attachments[a.AttachPoint][1] = a.AssetID;
  485. }
  486. }
  487. public void SetAttachments(Hashtable data)
  488. {
  489. m_attachments.Clear();
  490. if (data == null)
  491. return;
  492. foreach (DictionaryEntry e in data)
  493. {
  494. int attachpoint = Convert.ToInt32(e.Key);
  495. if (m_attachments.ContainsKey(attachpoint))
  496. continue;
  497. UUID item;
  498. UUID asset;
  499. Hashtable uuids = (Hashtable) e.Value;
  500. UUID.TryParse(uuids["item"].ToString(), out item);
  501. UUID.TryParse(uuids["asset"].ToString(), out asset);
  502. UUID[] attachment = new UUID[2];
  503. attachment[0] = item;
  504. attachment[1] = asset;
  505. m_attachments[attachpoint] = attachment;
  506. }
  507. }
  508. public Dictionary<int, UUID[]> GetAttachmentDictionary()
  509. {
  510. return m_attachments;
  511. }
  512. public Hashtable GetAttachments()
  513. {
  514. if (m_attachments.Count == 0)
  515. return null;
  516. Hashtable ret = new Hashtable();
  517. foreach (KeyValuePair<int, UUID[]> kvp in m_attachments)
  518. {
  519. int attachpoint = kvp.Key;
  520. UUID[] uuids = kvp.Value;
  521. Hashtable data = new Hashtable();
  522. data["item"] = uuids[0].ToString();
  523. data["asset"] = uuids[1].ToString();
  524. ret[attachpoint] = data;
  525. }
  526. return ret;
  527. }
  528. public List<int> GetAttachedPoints()
  529. {
  530. return new List<int>(m_attachments.Keys);
  531. }
  532. public UUID GetAttachedItem(int attachpoint)
  533. {
  534. if (!m_attachments.ContainsKey(attachpoint))
  535. return UUID.Zero;
  536. return m_attachments[attachpoint][0];
  537. }
  538. public UUID GetAttachedAsset(int attachpoint)
  539. {
  540. if (!m_attachments.ContainsKey(attachpoint))
  541. return UUID.Zero;
  542. return m_attachments[attachpoint][1];
  543. }
  544. public void SetAttachment(int attachpoint, UUID item, UUID asset)
  545. {
  546. if (attachpoint == 0)
  547. return;
  548. if (item == UUID.Zero)
  549. {
  550. if (m_attachments.ContainsKey(attachpoint))
  551. m_attachments.Remove(attachpoint);
  552. return;
  553. }
  554. if (!m_attachments.ContainsKey(attachpoint))
  555. m_attachments[attachpoint] = new UUID[2];
  556. m_attachments[attachpoint][0] = item;
  557. m_attachments[attachpoint][1] = asset;
  558. }
  559. public int GetAttachpoint(UUID itemID)
  560. {
  561. foreach (KeyValuePair<int, UUID[]> kvp in m_attachments)
  562. {
  563. if (kvp.Value[0] == itemID)
  564. {
  565. return kvp.Key;
  566. }
  567. }
  568. return 0;
  569. }
  570. public void DetachAttachment(UUID itemID)
  571. {
  572. int attachpoint = GetAttachpoint(itemID);
  573. if (attachpoint > 0)
  574. m_attachments.Remove(attachpoint);
  575. }
  576. public void ClearAttachments()
  577. {
  578. m_attachments.Clear();
  579. }
  580. string GetAttachmentsString()
  581. {
  582. List<string> strings = new List<string>();
  583. foreach (KeyValuePair<int, UUID[]> e in m_attachments)
  584. {
  585. strings.Add(e.Key.ToString());
  586. strings.Add(e.Value[0].ToString());
  587. strings.Add(e.Value[1].ToString());
  588. }
  589. return String.Join(",", strings.ToArray());
  590. }
  591. void SetAttachmentsString(string data)
  592. {
  593. string[] strings = data.Split(new char[] {','});
  594. int i = 0;
  595. m_attachments.Clear();
  596. while (strings.Length - i > 2)
  597. {
  598. int attachpoint = Int32.Parse(strings[i]);
  599. UUID item = new UUID(strings[i+1]);
  600. UUID asset = new UUID(strings[i+2]);
  601. i += 3;
  602. if (!m_attachments.ContainsKey(attachpoint))
  603. {
  604. m_attachments[attachpoint] = new UUID[2];
  605. m_attachments[attachpoint][0] = item;
  606. m_attachments[attachpoint][1] = asset;
  607. }
  608. }
  609. }
  610. /// <summary>
  611. /// Viewer Params Array Element for AgentSetAppearance
  612. /// Generated from LibOMV's Visual Params list
  613. /// </summary>
  614. public enum VPElement : int
  615. {
  616. /// <summary>
  617. /// Brow Size - Small 0--+255 Large
  618. /// </summary>
  619. SHAPE_BIG_BROW = 0,
  620. /// <summary>
  621. /// Nose Size - Small 0--+255 Large
  622. /// </summary>
  623. SHAPE_NOSE_BIG_OUT = 1,
  624. /// <summary>
  625. /// Nostril Width - Narrow 0--+255 Broad
  626. /// </summary>
  627. SHAPE_BROAD_NOSTRILS = 2,
  628. /// <summary>
  629. /// Chin Cleft - Round 0--+255 Cleft
  630. /// </summary>
  631. SHAPE_CLEFT_CHIN = 3,
  632. /// <summary>
  633. /// Nose Tip Shape - Pointy 0--+255 Bulbous
  634. /// </summary>
  635. SHAPE_BULBOUS_NOSE_TIP = 4,
  636. /// <summary>
  637. /// Chin Angle - Chin Out 0--+255 Chin In
  638. /// </summary>
  639. SHAPE_WEAK_CHIN = 5,
  640. /// <summary>
  641. /// Chin-Neck - Tight Chin 0--+255 Double Chin
  642. /// </summary>
  643. SHAPE_DOUBLE_CHIN = 6,
  644. /// <summary>
  645. /// Lower Cheeks - Well-Fed 0--+255 Sunken
  646. /// </summary>
  647. SHAPE_SUNKEN_CHEEKS = 7,
  648. /// <summary>
  649. /// Upper Bridge - Low 0--+255 High
  650. /// </summary>
  651. SHAPE_NOBLE_NOSE_BRIDGE = 8,
  652. /// <summary>
  653. /// - Less 0--+255 More
  654. /// </summary>
  655. SHAPE_JOWLS = 9,
  656. /// <summary>
  657. /// Upper Chin Cleft - Round 0--+255 Cleft
  658. /// </summary>
  659. SHAPE_CLEFT_CHIN_UPPER = 10,
  660. /// <summary>
  661. /// Cheek Bones - Low 0--+255 High
  662. /// </summary>
  663. SHAPE_HIGH_CHEEK_BONES = 11,
  664. /// <summary>
  665. /// Ear Angle - In 0--+255 Out
  666. /// </summary>
  667. SHAPE_EARS_OUT = 12,
  668. /// <summary>
  669. /// Eyebrow Points - Smooth 0--+255 Pointy
  670. /// </summary>
  671. HAIR_POINTY_EYEBROWS = 13,
  672. /// <summary>
  673. /// Jaw Shape - Pointy 0--+255 Square
  674. /// </summary>
  675. SHAPE_SQUARE_JAW = 14,
  676. /// <summary>
  677. /// Upper Cheeks - Thin 0--+255 Puffy
  678. /// </summary>
  679. SHAPE_PUFFY_UPPER_CHEEKS = 15,
  680. /// <summary>
  681. /// Nose Tip Angle - Downturned 0--+255 Upturned
  682. /// </summary>
  683. SHAPE_UPTURNED_NOSE_TIP = 16,
  684. /// <summary>
  685. /// Nose Thickness - Thin Nose 0--+255 Bulbous Nose
  686. /// </summary>
  687. SHAPE_BULBOUS_NOSE = 17,
  688. /// <summary>
  689. /// Upper Eyelid Fold - Uncreased 0--+255 Creased
  690. /// </summary>
  691. SHAPE_UPPER_EYELID_FOLD = 18,
  692. /// <summary>
  693. /// Attached Earlobes - Unattached 0--+255 Attached
  694. /// </summary>
  695. SHAPE_ATTACHED_EARLOBES = 19,
  696. /// <summary>
  697. /// Eye Bags - Smooth 0--+255 Baggy
  698. /// </summary>
  699. SHAPE_BAGGY_EYES = 20,
  700. /// <summary>
  701. /// Eye Opening - Narrow 0--+255 Wide
  702. /// </summary>
  703. SHAPE_WIDE_EYES = 21,
  704. /// <summary>
  705. /// Lip Cleft - Narrow 0--+255 Wide
  706. /// </summary>
  707. SHAPE_WIDE_LIP_CLEFT = 22,
  708. /// <summary>
  709. /// Bridge Width - Narrow 0--+255 Wide
  710. /// </summary>
  711. SHAPE_WIDE_NOSE_BRIDGE = 23,
  712. /// <summary>
  713. /// Eyebrow Arc - Flat 0--+255 Arced
  714. /// </summary>
  715. HAIR_ARCED_EYEBROWS = 24,
  716. /// <summary>
  717. /// Height - Short 0--+255 Tall
  718. /// </summary>
  719. SHAPE_HEIGHT = 25,
  720. /// <summary>
  721. /// Body Thickness - Body Thin 0--+255 Body Thick
  722. /// </summary>
  723. SHAPE_THICKNESS = 26,
  724. /// <summary>
  725. /// Ear Size - Small 0--+255 Large
  726. /// </summary>
  727. SHAPE_BIG_EARS = 27,
  728. /// <summary>
  729. /// Shoulders - Narrow 0--+255 Broad
  730. /// </summary>
  731. SHAPE_SHOULDERS = 28,
  732. /// <summary>
  733. /// Hip Width - Narrow 0--+255 Wide
  734. /// </summary>
  735. SHAPE_HIP_WIDTH = 29,
  736. /// <summary>
  737. /// - Short Torso 0--+255 Long Torso
  738. /// </summary>
  739. SHAPE_TORSO_LENGTH = 30,
  740. SHAPE_MALE = 31,
  741. /// <summary>
  742. /// - Short 0--+255 Long
  743. /// </summary>
  744. GLOVES_GLOVE_LENGTH = 32,
  745. /// <summary>
  746. /// - Darker 0--+255 Lighter
  747. /// </summary>
  748. EYES_EYE_LIGHTNESS = 33,
  749. /// <summary>
  750. /// - Natural 0--+255 Unnatural
  751. /// </summary>
  752. EYES_EYE_COLOR = 34,
  753. /// <summary>
  754. /// - Small 0--+255 Large
  755. /// </summary>
  756. SHAPE_BREAST_SIZE = 35,
  757. /// <summary>
  758. /// - None 0--+255 Wild
  759. /// </summary>
  760. SKIN_RAINBOW_COLOR = 36,
  761. /// <summary>
  762. /// Ruddiness - Pale 0--+255 Ruddy
  763. /// </summary>
  764. SKIN_RED_SKIN = 37,
  765. /// <summary>
  766. /// - Light 0--+255 Dark
  767. /// </summary>
  768. SKIN_PIGMENT = 38,
  769. HAIR_RAINBOW_COLOR_39 = 39,
  770. /// <summary>
  771. /// - No Red 0--+255 Very Red
  772. /// </summary>
  773. HAIR_RED_HAIR = 40,
  774. /// <summary>
  775. /// - Black 0--+255 Blonde
  776. /// </summary>
  777. HAIR_BLONDE_HAIR = 41,
  778. /// <summary>
  779. /// - No White 0--+255 All White
  780. /// </summary>
  781. HAIR_WHITE_HAIR = 42,
  782. /// <summary>
  783. /// - Less Rosy 0--+255 More Rosy
  784. /// </summary>
  785. SKIN_ROSY_COMPLEXION = 43,
  786. /// <summary>
  787. /// - Darker 0--+255 Pinker
  788. /// </summary>
  789. SKIN_LIP_PINKNESS = 44,
  790. /// <summary>
  791. /// - Thin Eyebrows 0--+255 Bushy Eyebrows
  792. /// </summary>
  793. HAIR_EYEBROW_SIZE = 45,
  794. /// <summary>
  795. /// - Short 0--+255 Long
  796. /// </summary>
  797. HAIR_FRONT_FRINGE = 46,
  798. /// <summary>
  799. /// - Short 0--+255 Long
  800. /// </summary>
  801. HAIR_SIDE_FRINGE = 47,
  802. /// <summary>
  803. /// - Short 0--+255 Long
  804. /// </summary>
  805. HAIR_BACK_FRINGE = 48,
  806. /// <summary>
  807. /// - Short 0--+255 Long
  808. /// </summary>
  809. HAIR_HAIR_FRONT = 49,
  810. /// <summary>
  811. /// - Short 0--+255 Long
  812. /// </summary>
  813. HAIR_HAIR_SIDES = 50,
  814. /// <summary>
  815. /// - Short 0--+255 Long
  816. /// </summary>
  817. HAIR_HAIR_BACK = 51,
  818. /// <summary>
  819. /// - Sweep Forward 0--+255 Sweep Back
  820. /// </summary>
  821. HAIR_HAIR_SWEEP = 52,
  822. /// <summary>
  823. /// - Left 0--+255 Right
  824. /// </summary>
  825. HAIR_HAIR_TILT = 53,
  826. /// <summary>
  827. /// Middle Part - No Part 0--+255 Part
  828. /// </summary>
  829. HAIR_HAIR_PART_MIDDLE = 54,
  830. /// <summary>
  831. /// Right Part - No Part 0--+255 Part
  832. /// </summary>
  833. HAIR_HAIR_PART_RIGHT = 55,
  834. /// <summary>
  835. /// Left Part - No Part 0--+255 Part
  836. /// </summary>
  837. HAIR_HAIR_PART_LEFT = 56,
  838. /// <summary>
  839. /// Full Hair Sides - Mowhawk 0--+255 Full Sides
  840. /// </summary>
  841. HAIR_HAIR_SIDES_FULL = 57,
  842. /// <summary>
  843. /// - Less 0--+255 More
  844. /// </summary>
  845. SKIN_BODY_DEFINITION = 58,
  846. /// <summary>
  847. /// Lip Width - Narrow Lips 0--+255 Wide Lips
  848. /// </summary>
  849. SHAPE_LIP_WIDTH = 59,
  850. /// <summary>
  851. /// - Small 0--+255 Big
  852. /// </summary>
  853. SHAPE_BELLY_SIZE = 60,
  854. /// <summary>
  855. /// - Less 0--+255 More
  856. /// </summary>
  857. SKIN_FACIAL_DEFINITION = 61,
  858. /// <summary>
  859. /// - Less 0--+255 More
  860. /// </summary>
  861. SKIN_WRINKLES = 62,
  862. /// <summary>
  863. /// - Less 0--+255 More
  864. /// </summary>
  865. SKIN_FRECKLES = 63,
  866. /// <summary>
  867. /// - Short Sideburns 0--+255 Mutton Chops
  868. /// </summary>
  869. HAIR_SIDEBURNS = 64,
  870. /// <summary>
  871. /// - Chaplin 0--+255 Handlebars
  872. /// </summary>
  873. HAIR_MOUSTACHE = 65,
  874. /// <summary>
  875. /// - Less soul 0--+255 More soul
  876. /// </summary>
  877. HAIR_SOULPATCH = 66,
  878. /// <summary>
  879. /// - Less Curtains 0--+255 More Curtains
  880. /// </summary>
  881. HAIR_CHIN_CURTAINS = 67,
  882. /// <summary>
  883. /// Rumpled Hair - Smooth Hair 0--+255 Rumpled Hair
  884. /// </summary>
  885. HAIR_HAIR_RUMPLED = 68,
  886. /// <summary>
  887. /// Big Hair Front - Less 0--+255 More
  888. /// </summary>
  889. HAIR_HAIR_BIG_FRONT = 69,
  890. /// <summary>
  891. /// Big Hair Top - Less 0--+255 More
  892. /// </summary>
  893. HAIR_HAIR_BIG_TOP = 70,
  894. /// <summary>
  895. /// Big Hair Back - Less 0--+255 More
  896. /// </summary>
  897. HAIR_HAIR_BIG_BACK = 71,
  898. /// <summary>
  899. /// Spiked Hair - No Spikes 0--+255 Big Spikes
  900. /// </summary>
  901. HAIR_HAIR_SPIKED = 72,
  902. /// <summary>
  903. /// Chin Depth - Shallow 0--+255 Deep
  904. /// </summary>
  905. SHAPE_DEEP_CHIN = 73,
  906. /// <summary>
  907. /// Part Bangs - No Part 0--+255 Part Bangs
  908. /// </summary>
  909. HAIR_BANGS_PART_MIDDLE = 74,
  910. /// <summary>
  911. /// Head Shape - More Square 0--+255 More Round
  912. /// </summary>
  913. SHAPE_HEAD_SHAPE = 75,
  914. /// <summary>
  915. /// Eye Spacing - Close Set Eyes 0--+255 Far Set Eyes
  916. /// </summary>
  917. SHAPE_EYE_SPACING = 76,
  918. /// <summary>
  919. /// - Low Heels 0--+255 High Heels
  920. /// </summary>
  921. SHOES_HEEL_HEIGHT = 77,
  922. /// <summary>
  923. /// - Low Platforms 0--+255 High Platforms
  924. /// </summary>
  925. SHOES_PLATFORM_HEIGHT = 78,
  926. /// <summary>
  927. /// - Thin Lips 0--+255 Fat Lips
  928. /// </summary>
  929. SHAPE_LIP_THICKNESS = 79,
  930. /// <summary>
  931. /// Mouth Position - High 0--+255 Low
  932. /// </summary>
  933. SHAPE_MOUTH_HEIGHT = 80,
  934. /// <summary>
  935. /// Breast Buoyancy - Less Gravity 0--+255 More Gravity
  936. /// </summary>
  937. SHAPE_BREAST_GRAVITY = 81,
  938. /// <summary>
  939. /// Platform Width - Narrow 0--+255 Wide
  940. /// </summary>
  941. SHOES_SHOE_PLATFORM_WIDTH = 82,
  942. /// <summary>
  943. /// - Pointy Heels 0--+255 Thick Heels
  944. /// </summary>
  945. SHOES_HEEL_SHAPE = 83,
  946. /// <summary>
  947. /// - Pointy 0--+255 Square
  948. /// </summary>
  949. SHOES_TOE_SHAPE = 84,
  950. /// <summary>
  951. /// Foot Size - Small 0--+255 Big
  952. /// </summary>
  953. SHAPE_FOOT_SIZE = 85,
  954. /// <summary>
  955. /// Nose Width - Narrow 0--+255 Wide
  956. /// </summary>
  957. SHAPE_WIDE_NOSE = 86,
  958. /// <summary>
  959. /// Eyelash Length - Short 0--+255 Long
  960. /// </summary>
  961. SHAPE_EYELASHES_LONG = 87,
  962. /// <summary>
  963. /// - Short 0--+255 Long
  964. /// </summary>
  965. UNDERSHIRT_SLEEVE_LENGTH = 88,
  966. /// <summary>
  967. /// - Short 0--+255 Long
  968. /// </summary>
  969. UNDERSHIRT_BOTTOM = 89,
  970. /// <summary>
  971. /// - Low 0--+255 High
  972. /// </summary>
  973. UNDERSHIRT_COLLAR_FRONT = 90,
  974. JACKET_SLEEVE_LENGTH_91 = 91,
  975. JACKET_COLLAR_FRONT_92 = 92,
  976. /// <summary>
  977. /// Jacket Length - Short 0--+255 Long
  978. /// </summary>
  979. JACKET_BOTTOM_LENGTH_LOWER = 93,
  980. /// <summary>
  981. /// Open Front - Open 0--+255 Closed
  982. /// </summary>
  983. JACKET_OPEN_JACKET = 94,
  984. /// <summary>
  985. /// - Short 0--+255 Tall
  986. /// </summary>
  987. SHOES_SHOE_HEIGHT = 95,
  988. /// <summary>
  989. /// - Short 0--+255 Long
  990. /// </summary>
  991. SOCKS_SOCKS_LENGTH = 96,
  992. /// <summary>
  993. /// - Short 0--+255 Long
  994. /// </summary>
  995. UNDERPANTS_PANTS_LENGTH = 97,
  996. /// <summary>
  997. /// - Low 0--+255 High
  998. /// </summary>
  999. UNDERPANTS_PANTS_WAIST = 98,
  1000. /// <summary>
  1001. /// Cuff Flare - Tight Cuffs 0--+255 Flared Cuffs
  1002. /// </summary>
  1003. PANTS_LEG_PANTFLAIR = 99,
  1004. /// <summary>
  1005. /// - More Vertical 0--+255 More Sloped
  1006. /// </summary>
  1007. SHAPE_FOREHEAD_ANGLE = 100,
  1008. /// <summary>
  1009. /// - Less Body Fat 0--+255 More Body Fat
  1010. /// </summary>
  1011. SHAPE_BODY_FAT = 101,
  1012. /// <summary>
  1013. /// Pants Crotch - High and Tight 0--+255 Low and Loose
  1014. /// </summary>
  1015. PANTS_LOW_CROTCH = 102,
  1016. /// <summary>
  1017. /// Egg Head - Chin Heavy 0--+255 Forehead Heavy
  1018. /// </summary>
  1019. SHAPE_EGG_HEAD = 103,
  1020. /// <summary>
  1021. /// Head Stretch - Squash Head 0--+255 Stretch Head
  1022. /// </summary>
  1023. SHAPE_SQUASH_STRETCH_HEAD = 104,
  1024. /// <summary>
  1025. /// Torso Muscles - Less Muscular 0--+255 More Muscular
  1026. /// </summary>
  1027. SHAPE_TORSO_MUSCLES = 105,
  1028. /// <summary>
  1029. /// Outer Eye Corner - Corner Down 0--+255 Corner Up
  1030. /// </summary>
  1031. SHAPE_EYELID_CORNER_UP = 106,
  1032. /// <summary>
  1033. /// - Less Muscular 0--+255 More Muscular
  1034. /// </summary>
  1035. SHAPE_LEG_MUSCLES = 107,
  1036. /// <summary>
  1037. /// Lip Fullness - Less Full 0--+255 More Full
  1038. /// </summary>
  1039. SHAPE_TALL_LIPS = 108,
  1040. /// <summary>
  1041. /// Toe Thickness - Flat Toe 0--+255 Thick Toe
  1042. /// </summary>
  1043. SHOES_SHOE_TOE_THICK = 109,
  1044. /// <summary>
  1045. /// Crooked Nose - Nose Left 0--+255 Nose Right
  1046. /// </summary>
  1047. SHAPE_CROOKED_NOSE = 110,
  1048. /// <summary>
  1049. /// - Corner Down 0--+255 Corner Up
  1050. /// </summary>
  1051. SHAPE_MOUTH_CORNER = 111,
  1052. /// <summary>
  1053. /// - Shear Right Up 0--+255 Shear Left Up
  1054. /// </summary>
  1055. SHAPE_FACE_SHEAR = 112,
  1056. /// <summary>
  1057. /// Shift Mouth - Shift Left 0--+255 Shift Right
  1058. /// </summary>
  1059. SHAPE_SHIFT_MOUTH = 113,
  1060. /// <summary>
  1061. /// Eye Pop - Pop Right Eye 0--+255 Pop Left Eye
  1062. /// </summary>
  1063. SHAPE_POP_EYE = 114,
  1064. /// <summary>
  1065. /// Jaw Jut - Overbite 0--+255 Underbite
  1066. /// </summary>
  1067. SHAPE_JAW_JUT = 115,
  1068. /// <summary>
  1069. /// Shear Back - Full Back 0--+255 Sheared Back
  1070. /// </summary>
  1071. HAIR_HAIR_SHEAR_BACK = 116,
  1072. /// <summary>
  1073. /// - Small Hands 0--+255 Large Hands
  1074. /// </summary>
  1075. SHAPE_HAND_SIZE = 117,
  1076. /// <summary>
  1077. /// Love Handles - Less Love 0--+255 More Love
  1078. /// </summary>
  1079. SHAPE_LOVE_HANDLES = 118,
  1080. SHAPE_TORSO_MUSCLES_119 = 119,
  1081. /// <summary>
  1082. /// Head Size - Small Head 0--+255 Big Head
  1083. /// </summary>
  1084. SHAPE_HEAD_SIZE = 120,
  1085. /// <summary>
  1086. /// - Skinny Neck 0--+255 Thick Neck
  1087. /// </summary>
  1088. SHAPE_NECK_THICKNESS = 121,
  1089. /// <summary>
  1090. /// Breast Cleavage - Separate 0--+255 Join
  1091. /// </summary>
  1092. SHAPE_BREAST_FEMALE_CLEAVAGE = 122,
  1093. /// <summary>
  1094. /// Pectorals - Big Pectorals 0--+255 Sunken Chest
  1095. /// </summary>
  1096. SHAPE_CHEST_MALE_NO_PECS = 123,
  1097. /// <summary>
  1098. /// Eye Size - Beady Eyes 0--+255 Anime Eyes
  1099. /// </summary>
  1100. SHAPE_EYE_SIZE = 124,
  1101. /// <summary>
  1102. /// - Short Legs 0--+255 Long Legs
  1103. /// </summary>
  1104. SHAPE_LEG_LENGTH = 125,
  1105. /// <summary>
  1106. /// - Short Arms 0--+255 Long arms
  1107. /// </summary>
  1108. SHAPE_ARM_LENGTH = 126,
  1109. /// <summary>
  1110. /// - Pink 0--+255 Black
  1111. /// </summary>
  1112. SKIN_LIPSTICK_COLOR = 127,
  1113. /// <summary>
  1114. /// - No Lipstick 0--+255 More Lipstick
  1115. /// </summary>
  1116. SKIN_LIPSTICK = 128,
  1117. /// <summary>
  1118. /// - No Lipgloss 0--+255 Glossy
  1119. /// </summary>
  1120. SKIN_LIPGLOSS = 129,
  1121. /// <summary>
  1122. /// - No Eyeliner 0--+255 Full Eyeliner
  1123. /// </summary>
  1124. SKIN_EYELINER = 130,
  1125. /// <summary>
  1126. /// - No Blush 0--+255 More Blush
  1127. /// </summary>
  1128. SKIN_BLUSH = 131,
  1129. /// <summary>
  1130. /// - Pink 0--+255 Orange
  1131. /// </summary>
  1132. SKIN_BLUSH_COLOR = 132,
  1133. /// <summary>
  1134. /// - Clear 0--+255 Opaque
  1135. /// </summary>
  1136. SKIN_OUT_SHDW_OPACITY = 133,
  1137. /// <summary>
  1138. /// - No Eyeshadow 0--+255 More Eyeshadow
  1139. /// </summary>
  1140. SKIN_OUTER_SHADOW = 134,
  1141. /// <summary>
  1142. /// - Light 0--+255 Dark
  1143. /// </summary>
  1144. SKIN_OUT_SHDW_COLOR = 135,
  1145. /// <summary>
  1146. /// - No Eyeshadow 0--+255 More Eyeshadow
  1147. /// </summary>
  1148. SKIN_INNER_SHADOW = 136,
  1149. /// <summary>
  1150. /// - No Polish 0--+255 Painted Nails
  1151. /// </summary>
  1152. SKIN_NAIL_POLISH = 137,
  1153. /// <summary>
  1154. /// - Clear 0--+255 Opaque
  1155. /// </summary>
  1156. SKIN_BLUSH_OPACITY = 138,
  1157. /// <summary>
  1158. /// - Light 0--+255 Dark
  1159. /// </summary>
  1160. SKIN_IN_SHDW_COLOR = 139,
  1161. /// <summary>
  1162. /// - Clear 0--+255 Opaque
  1163. /// </summary>
  1164. SKIN_IN_SHDW_OPACITY = 140,
  1165. /// <summary>
  1166. /// - Dark Green 0--+255 Black
  1167. /// </summary>
  1168. SKIN_EYELINER_COLOR = 141,
  1169. /// <summary>
  1170. /// - Pink 0--+255 Black
  1171. /// </summary>
  1172. SKIN_NAIL_POLISH_COLOR = 142,
  1173. /// <summary>
  1174. /// - Sparse 0--+255 Dense
  1175. /// </summary>
  1176. HAIR_EYEBROW_DENSITY = 143,
  1177. /// <summary>
  1178. /// - 5 O'Clock Shadow 0--+255 Bushy Hair
  1179. /// </summary>
  1180. HAIR_HAIR_THICKNESS = 144,
  1181. /// <summary>
  1182. /// Saddle Bags - Less Saddle 0--+255 More Saddle
  1183. /// </summary>
  1184. SHAPE_SADDLEBAGS = 145,
  1185. /// <summary>
  1186. /// Taper Back - Wide Back 0--+255 Narrow Back
  1187. /// </summary>
  1188. HAIR_HAIR_TAPER_BACK = 146,
  1189. /// <summary>
  1190. /// Taper Front - Wide Front 0--+255 Narrow Front
  1191. /// </summary>
  1192. HAIR_HAIR_TAPER_FRONT = 147,
  1193. /// <summary>
  1194. /// - Short Neck 0--+255 Long Neck
  1195. /// </summary>
  1196. SHAPE_NECK_LENGTH = 148,
  1197. /// <summary>
  1198. /// Eyebrow Height - Higher 0--+255 Lower
  1199. /// </summary>
  1200. HAIR_LOWER_EYEBROWS = 149,
  1201. /// <summary>
  1202. /// Lower Bridge - Low 0--+255 High
  1203. /// </summary>
  1204. SHAPE_LOWER_BRIDGE_NOSE = 150,
  1205. /// <summary>
  1206. /// Nostril Division - High 0--+255 Low
  1207. /// </summary>
  1208. SHAPE_LOW_SEPTUM_NOSE = 151,
  1209. /// <summary>
  1210. /// Jaw Angle - Low Jaw 0--+255 High Jaw
  1211. /// </summary>
  1212. SHAPE_JAW_ANGLE = 152,
  1213. /// <summary>
  1214. /// Shear Front - Full Front 0--+255 Sheared Front
  1215. /// </summary>
  1216. HAIR_HAIR_SHEAR_FRONT = 153,
  1217. /// <summary>
  1218. /// - Less Volume 0--+255 More Volume
  1219. /// </summary>
  1220. HAIR_HAIR_VOLUME = 154,
  1221. /// <summary>
  1222. /// Lip Cleft Depth - Shallow 0--+255 Deep
  1223. /// </summary>
  1224. SHAPE_LIP_CLEFT_DEEP = 155,
  1225. /// <summary>
  1226. /// Puffy Eyelids - Flat 0--+255 Puffy
  1227. /// </summary>
  1228. SHAPE_PUFFY_LOWER_LIDS = 156,
  1229. /// <summary>
  1230. /// - Sunken Eyes 0--+255 Bugged Eyes
  1231. /// </summary>
  1232. SHAPE_EYE_DEPTH = 157,
  1233. /// <summary>
  1234. /// - Flat Head 0--+255 Long Head
  1235. /// </summary>
  1236. SHAPE_HEAD_LENGTH = 158,
  1237. /// <summary>
  1238. /// - Less Freckles 0--+255 More Freckles
  1239. /// </summary>
  1240. SKIN_BODY_FRECKLES = 159,
  1241. /// <summary>
  1242. /// - Low 0--+255 High
  1243. /// </summary>
  1244. UNDERSHIRT_COLLAR_BACK = 160,
  1245. JACKET_COLLAR_BACK_161 = 161,
  1246. SHIRT_COLLAR_BACK_162 = 162,
  1247. /// <summary>
  1248. /// - Short Pigtails 0--+255 Long Pigtails
  1249. /// </summary>
  1250. HAIR_PIGTAILS = 163,
  1251. /// <summary>
  1252. /// - Short Ponytail 0--+255 Long Ponytail
  1253. /// </summary>
  1254. HAIR_PONYTAIL = 164,
  1255. /// <summary>
  1256. /// Butt Size - Flat Butt 0--+255 Big Butt
  1257. /// </summary>
  1258. SHAPE_BUTT_SIZE = 165,
  1259. /// <summary>
  1260. /// Ear Tips - Flat 0--+255 Pointy
  1261. /// </summary>
  1262. SHAPE_POINTY_EARS = 166,
  1263. /// <summary>
  1264. /// Lip Ratio - More Upper Lip 0--+255 More Lower Lip
  1265. /// </summary>
  1266. SHAPE_LIP_RATIO = 167,
  1267. SHIRT_SLEEVE_LENGTH_168 = 168,
  1268. /// <summary>
  1269. /// - Short 0--+255 Long
  1270. /// </summary>
  1271. SHIRT_SHIRT_BOTTOM = 169,
  1272. SHIRT_COLLAR_FRONT_170 = 170,
  1273. SHIRT_SHIRT_RED = 171,
  1274. SHIRT_SHIRT_GREEN = 172,
  1275. SHIRT_SHIRT_BLUE = 173,
  1276. PANTS_PANTS_RED = 174,
  1277. PANTS_PANTS_GREEN = 175,
  1278. PANTS_PANTS_BLUE = 176,
  1279. SHOES_SHOES_RED = 177,
  1280. SHOES_SHOES_GREEN = 178,
  1281. /// <summary>
  1282. /// - Low 0--+255 High
  1283. /// </summary>
  1284. PANTS_WAIST_HEIGHT = 179,
  1285. PANTS_PANTS_LENGTH_180 = 180,
  1286. /// <summary>
  1287. /// Pants Fit - Tight Pants 0--+255 Loose Pants
  1288. /// </summary>
  1289. PANTS_LOOSE_LOWER_CLOTHING = 181,
  1290. SHOES_SHOES_BLUE = 182,
  1291. SOCKS_SOCKS_RED = 183,
  1292. SOCKS_SOCKS_GREEN = 184,
  1293. SOCKS_SOCKS_BLUE = 185,
  1294. UNDERSHIRT_UNDERSHIRT_RED = 186,
  1295. UNDERSHIRT_UNDERSHIRT_GREEN = 187,
  1296. UNDERSHIRT_UNDERSHIRT_BLUE = 188,
  1297. UNDERPANTS_UNDERPANTS_RED = 189,
  1298. UNDERPANTS_UNDERPANTS_GREEN = 190,
  1299. UNDERPANTS_UNDERPANTS_BLUE = 191,
  1300. GLOVES_GLOVES_RED = 192,
  1301. /// <summary>
  1302. /// Shirt Fit - Tight Shirt 0--+255 Loose Shirt
  1303. /// </summary>
  1304. SHIRT_LOOSE_UPPER_CLOTHING = 193,
  1305. GLOVES_GLOVES_GREEN = 194,
  1306. GLOVES_GLOVES_BLUE = 195,
  1307. JACKET_JACKET_RED = 196,
  1308. JACKET_JACKET_GREEN = 197,
  1309. JACKET_JACKET_BLUE = 198,
  1310. /// <summary>
  1311. /// Sleeve Looseness - Tight Sleeves 0--+255 Loose Sleeves
  1312. /// </summary>
  1313. SHIRT_SHIRTSLEEVE_FLAIR = 199,
  1314. /// <summary>
  1315. /// Knee Angle - Knock Kneed 0--+255 Bow Legged
  1316. /// </summary>
  1317. SHAPE_BOWED_LEGS = 200,
  1318. /// <summary>
  1319. /// - Short hips 0--+255 Long Hips
  1320. /// </summary>
  1321. SHAPE_HIP_LENGTH = 201,
  1322. /// <summary>
  1323. /// - Fingerless 0--+255 Fingers
  1324. /// </summary>
  1325. GLOVES_GLOVE_FINGERS = 202,
  1326. /// <summary>
  1327. /// bustle skirt - no bustle 0--+255 more bustle
  1328. /// </summary>
  1329. SKIRT_SKIRT_BUSTLE = 203,
  1330. /// <summary>
  1331. /// - Short 0--+255 Long
  1332. /// </summary>
  1333. SKIRT_SKIRT_LENGTH = 204,
  1334. /// <summary>
  1335. /// - Open Front 0--+255 Closed Front
  1336. /// </summary>
  1337. SKIRT_SLIT_FRONT = 205,
  1338. /// <summary>
  1339. /// - Open Back 0--+255 Closed Back
  1340. /// </summary>
  1341. SKIRT_SLIT_BACK = 206,
  1342. /// <summary>
  1343. /// - Open Left 0--+255 Closed Left
  1344. /// </summary>
  1345. SKIRT_SLIT_LEFT = 207,
  1346. /// <summary>
  1347. /// - Open Right 0--+255 Closed Right
  1348. /// </summary>
  1349. SKIRT_SLIT_RIGHT = 208,
  1350. /// <summary>
  1351. /// Skirt Fit - Tight Skirt 0--+255 Poofy Skirt
  1352. /// </summary>
  1353. SKIRT_SKIRT_LOOSENESS = 209,
  1354. SHIRT_SHIRT_WRINKLES = 210,
  1355. PANTS_PANTS_WRINKLES = 211,
  1356. /// <summary>
  1357. /// Jacket Wrinkles - No Wrinkles 0--+255 Wrinkles
  1358. /// </summary>
  1359. JACKET_JACKET_WRINKLES = 212,
  1360. /// <summary>
  1361. /// Package - Coin Purse 0--+255 Duffle Bag
  1362. /// </summary>
  1363. SHAPE_MALE_PACKAGE = 213,
  1364. /// <summary>
  1365. /// Inner Eye Corner - Corner Down 0--+255 Corner Up
  1366. /// </summary>
  1367. SHAPE_EYELID_INNER_CORNER_UP = 214,
  1368. SKIRT_SKIRT_RED = 215,
  1369. SKIRT_SKIRT_GREEN = 216,
  1370. SKIRT_SKIRT_BLUE = 217
  1371. }
  1372. }
  1373. }