AvatarAppearance.cs 52 KB

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