1
0

AvatarAppearance.cs 53 KB

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