AvatarAppearance.cs 50 KB

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