AvatarAppearance.cs 50 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390
  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 UUID m_owner;
  46. protected int m_serial = 0;
  47. protected byte[] m_visualparams;
  48. protected Primitive.TextureEntry m_texture;
  49. protected AvatarWearable[] m_wearables;
  50. protected Dictionary<int, List<AvatarAttachment>> m_attachments;
  51. protected float m_avatarHeight = 0;
  52. protected float m_hipOffset = 0;
  53. public virtual UUID Owner
  54. {
  55. get { return m_owner; }
  56. set { m_owner = value; }
  57. }
  58. public virtual int Serial
  59. {
  60. get { return m_serial; }
  61. set { m_serial = value; }
  62. }
  63. public virtual byte[] VisualParams
  64. {
  65. get { return m_visualparams; }
  66. set { m_visualparams = value; }
  67. }
  68. public virtual Primitive.TextureEntry Texture
  69. {
  70. get { return m_texture; }
  71. set { m_texture = value; }
  72. }
  73. public virtual AvatarWearable[] Wearables
  74. {
  75. get { return m_wearables; }
  76. set { m_wearables = value; }
  77. }
  78. public virtual float AvatarHeight
  79. {
  80. get { return m_avatarHeight; }
  81. set { m_avatarHeight = value; }
  82. }
  83. public virtual float HipOffset
  84. {
  85. get { return m_hipOffset; }
  86. }
  87. public AvatarAppearance() : this(UUID.Zero) {}
  88. public AvatarAppearance(UUID owner)
  89. {
  90. // m_log.WarnFormat("[AVATAR APPEARANCE]: create empty appearance for {0}",owner);
  91. m_serial = 0;
  92. m_owner = owner;
  93. SetDefaultWearables();
  94. SetDefaultTexture();
  95. SetDefaultParams();
  96. SetHeight();
  97. m_attachments = new Dictionary<int, List<AvatarAttachment>>();
  98. }
  99. public AvatarAppearance(UUID avatarID, OSDMap map)
  100. {
  101. // m_log.WarnFormat("[AVATAR APPEARANCE]: create appearance for {0} from OSDMap",avatarID);
  102. m_owner = avatarID;
  103. Unpack(map);
  104. SetHeight();
  105. }
  106. public AvatarAppearance(UUID avatarID, AvatarWearable[] wearables, Primitive.TextureEntry textureEntry, byte[] visualParams)
  107. {
  108. // m_log.WarnFormat("[AVATAR APPEARANCE] create initialized appearance for {0}",avatarID);
  109. m_serial = 0;
  110. m_owner = avatarID;
  111. if (wearables != null)
  112. m_wearables = wearables;
  113. else
  114. SetDefaultWearables();
  115. if (textureEntry != null)
  116. m_texture = textureEntry;
  117. else
  118. SetDefaultTexture();
  119. if (visualParams != null)
  120. m_visualparams = visualParams;
  121. else
  122. SetDefaultParams();
  123. SetHeight();
  124. m_attachments = new Dictionary<int, List<AvatarAttachment>>();
  125. }
  126. public AvatarAppearance(AvatarAppearance appearance) : this(appearance, true)
  127. {
  128. }
  129. public AvatarAppearance(AvatarAppearance appearance, bool copyWearables)
  130. {
  131. // m_log.WarnFormat("[AVATAR APPEARANCE] create from an existing appearance");
  132. if (appearance == null)
  133. {
  134. m_serial = 0;
  135. m_owner = UUID.Zero;
  136. SetDefaultWearables();
  137. SetDefaultTexture();
  138. SetDefaultParams();
  139. SetHeight();
  140. m_attachments = new Dictionary<int, List<AvatarAttachment>>();
  141. return;
  142. }
  143. m_serial = appearance.Serial;
  144. m_owner = appearance.Owner;
  145. m_wearables = new AvatarWearable[AvatarWearable.MAX_WEARABLES];
  146. for (int i = 0; i < AvatarWearable.MAX_WEARABLES; i++)
  147. m_wearables[i] = new AvatarWearable();
  148. if (copyWearables && (appearance.Wearables != null))
  149. {
  150. for (int i = 0; i < AvatarWearable.MAX_WEARABLES; i++)
  151. SetWearable(i,appearance.Wearables[i]);
  152. }
  153. m_texture = null;
  154. if (appearance.Texture != null)
  155. {
  156. byte[] tbytes = appearance.Texture.GetBytes();
  157. m_texture = new Primitive.TextureEntry(tbytes,0,tbytes.Length);
  158. }
  159. m_visualparams = null;
  160. if (appearance.VisualParams != null)
  161. m_visualparams = (byte[])appearance.VisualParams.Clone();
  162. m_avatarHeight = appearance.m_avatarHeight;
  163. m_hipOffset = appearance.m_hipOffset;
  164. // Copy the attachment, force append mode since that ensures consistency
  165. m_attachments = new Dictionary<int, List<AvatarAttachment>>();
  166. foreach (AvatarAttachment attachment in appearance.GetAttachments())
  167. AppendAttachment(new AvatarAttachment(attachment));
  168. }
  169. public void GetAssetsFrom(AvatarAppearance app)
  170. {
  171. for (int i = 0; i < AvatarWearable.MAX_WEARABLES; i++)
  172. {
  173. for (int j = 0; j < m_wearables[i].Count; j++)
  174. {
  175. UUID itemID = m_wearables[i][j].ItemID;
  176. UUID assetID = app.Wearables[i].GetAsset(itemID);
  177. if (assetID != UUID.Zero)
  178. m_wearables[i].Add(itemID, assetID);
  179. }
  180. }
  181. }
  182. public void ClearWearables()
  183. {
  184. m_wearables = new AvatarWearable[AvatarWearable.MAX_WEARABLES];
  185. for (int i = 0; i < AvatarWearable.MAX_WEARABLES; i++)
  186. m_wearables[i] = new AvatarWearable();
  187. }
  188. protected virtual void SetDefaultWearables()
  189. {
  190. m_wearables = AvatarWearable.DefaultWearables;
  191. }
  192. /// <summary>
  193. /// Invalidate all of the baked textures in the appearance, useful
  194. /// if you know that none are valid
  195. /// </summary>
  196. public virtual void ResetAppearance()
  197. {
  198. m_serial = 0;
  199. SetDefaultTexture();
  200. //for (int i = 0; i < BAKE_INDICES.Length; i++)
  201. // {
  202. // int idx = BAKE_INDICES[i];
  203. // m_texture.FaceTextures[idx].TextureID = UUID.Zero;
  204. // }
  205. }
  206. protected virtual void SetDefaultParams()
  207. {
  208. 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 };
  209. // for (int i = 0; i < VISUALPARAM_COUNT; i++)
  210. // {
  211. // m_visualparams[i] = 150;
  212. // }
  213. }
  214. protected virtual void SetDefaultTexture()
  215. {
  216. m_texture = new Primitive.TextureEntry(new UUID(AppearanceManager.DEFAULT_AVATAR_TEXTURE));
  217. // for (uint i = 0; i < TEXTURE_COUNT; i++)
  218. // m_texture.CreateFace(i).TextureID = new UUID(AppearanceManager.DEFAULT_AVATAR_TEXTURE);
  219. }
  220. /// <summary>
  221. /// Set up appearance textures.
  222. /// Returns boolean that indicates whether the new entries actually change the
  223. /// existing values.
  224. /// </summary>
  225. public virtual bool SetTextureEntries(Primitive.TextureEntry textureEntry)
  226. {
  227. if (textureEntry == null)
  228. return false;
  229. // There are much simpler versions of this copy that could be
  230. // made. We determine if any of the textures actually
  231. // changed to know if the appearance should be saved later
  232. bool changed = false;
  233. for (uint i = 0; i < AvatarAppearance.TEXTURE_COUNT; i++)
  234. {
  235. Primitive.TextureEntryFace newface = textureEntry.FaceTextures[i];
  236. Primitive.TextureEntryFace oldface = m_texture.FaceTextures[i];
  237. if (newface == null)
  238. {
  239. if (oldface == null) continue;
  240. }
  241. else
  242. {
  243. if (oldface != null && oldface.TextureID == newface.TextureID) continue;
  244. }
  245. changed = true;
  246. }
  247. m_texture = textureEntry;
  248. return changed;
  249. }
  250. /// <summary>
  251. /// Set up visual parameters for the avatar and refresh the avatar height
  252. /// Returns boolean that indicates whether the new entries actually change the
  253. /// existing values.
  254. /// </summary>
  255. public virtual bool SetVisualParams(byte[] visualParams)
  256. {
  257. if (visualParams == null)
  258. return false;
  259. // There are much simpler versions of this copy that could be
  260. // made. We determine if any of the visual parameters actually
  261. // changed to know if the appearance should be saved later
  262. bool changed = false;
  263. for (int i = 0; i < AvatarAppearance.VISUALPARAM_COUNT; i++)
  264. {
  265. if (visualParams[i] != m_visualparams[i])
  266. {
  267. // DEBUG ON
  268. // m_log.WarnFormat("[AVATARAPPEARANCE] vparams changed [{0}] {1} ==> {2}",
  269. // i,m_visualparams[i],visualParams[i]);
  270. // DEBUG OFF
  271. m_visualparams[i] = visualParams[i];
  272. changed = true;
  273. }
  274. }
  275. // Reset the height if the visual parameters actually changed
  276. if (changed)
  277. SetHeight();
  278. return changed;
  279. }
  280. public virtual void SetAppearance(Primitive.TextureEntry textureEntry, byte[] visualParams)
  281. {
  282. SetTextureEntries(textureEntry);
  283. SetVisualParams(visualParams);
  284. }
  285. public virtual void SetHeight()
  286. {
  287. m_avatarHeight = 1.23077f // Shortest possible avatar height
  288. + 0.516945f * (float)m_visualparams[(int)VPElement.SHAPE_HEIGHT] / 255.0f // Body height
  289. + 0.072514f * (float)m_visualparams[(int)VPElement.SHAPE_HEAD_SIZE] / 255.0f // Head size
  290. + 0.3836f * (float)m_visualparams[(int)VPElement.SHAPE_LEG_LENGTH] / 255.0f // Leg length
  291. + 0.08f * (float)m_visualparams[(int)VPElement.SHOES_PLATFORM_HEIGHT] / 255.0f // Shoe platform height
  292. + 0.07f * (float)m_visualparams[(int)VPElement.SHOES_HEEL_HEIGHT] / 255.0f // Shoe heel height
  293. + 0.076f * (float)m_visualparams[(int)VPElement.SHAPE_NECK_LENGTH] / 255.0f; // Neck length
  294. m_hipOffset = (((1.23077f // Half of avatar
  295. + 0.516945f * (float)m_visualparams[(int)VPElement.SHAPE_HEIGHT] / 255.0f // Body height
  296. + 0.3836f * (float)m_visualparams[(int)VPElement.SHAPE_LEG_LENGTH] / 255.0f // Leg length
  297. + 0.08f * (float)m_visualparams[(int)VPElement.SHOES_PLATFORM_HEIGHT] / 255.0f // Shoe platform height
  298. + 0.07f * (float)m_visualparams[(int)VPElement.SHOES_HEEL_HEIGHT] / 255.0f // Shoe heel height
  299. ) / 2) - m_avatarHeight / 2) * 0.31f - 0.0425f;
  300. }
  301. public virtual void SetWearable(int wearableId, AvatarWearable wearable)
  302. {
  303. // DEBUG ON
  304. // m_log.WarnFormat("[AVATARAPPEARANCE] set wearable {0} --> {1}:{2}",wearableId,wearable.ItemID,wearable.AssetID);
  305. // DEBUG OFF
  306. m_wearables[wearableId].Clear();
  307. for (int i = 0; i < wearable.Count; i++)
  308. m_wearables[wearableId].Add(wearable[i].ItemID, wearable[i].AssetID);
  309. }
  310. // DEBUG ON
  311. public override String ToString()
  312. {
  313. String s = "";
  314. s += String.Format("Serial: {0}\n",m_serial);
  315. for (uint i = 0; i < AvatarAppearance.TEXTURE_COUNT; i++)
  316. if (m_texture.FaceTextures[i] != null)
  317. s += String.Format("Texture: {0} --> {1}\n",i,m_texture.FaceTextures[i].TextureID);
  318. foreach (AvatarWearable awear in m_wearables)
  319. {
  320. for (int i = 0; i < awear.Count; i++)
  321. s += String.Format("Wearable: item={0}, asset={1}\n",awear[i].ItemID,awear[i].AssetID);
  322. }
  323. s += "Visual Params: ";
  324. for (uint j = 0; j < AvatarAppearance.VISUALPARAM_COUNT; j++)
  325. s += String.Format("{0},",m_visualparams[j]);
  326. s += "\n";
  327. return s;
  328. }
  329. // DEBUG OFF
  330. /// <summary>
  331. /// Get a list of the attachments, note that there may be
  332. /// duplicate attachpoints
  333. /// </summary>
  334. public List<AvatarAttachment> GetAttachments()
  335. {
  336. List<AvatarAttachment> alist = new List<AvatarAttachment>();
  337. foreach (KeyValuePair<int, List<AvatarAttachment>> kvp in m_attachments)
  338. {
  339. foreach (AvatarAttachment attach in kvp.Value)
  340. alist.Add(new AvatarAttachment(attach));
  341. }
  342. return alist;
  343. }
  344. internal void AppendAttachment(AvatarAttachment attach)
  345. {
  346. if (! m_attachments.ContainsKey(attach.AttachPoint))
  347. m_attachments[attach.AttachPoint] = new List<AvatarAttachment>();
  348. m_attachments[attach.AttachPoint].Add(attach);
  349. }
  350. internal void ReplaceAttachment(AvatarAttachment attach)
  351. {
  352. m_attachments[attach.AttachPoint] = new List<AvatarAttachment>();
  353. m_attachments[attach.AttachPoint].Add(attach);
  354. }
  355. /// <summary>
  356. /// Add an attachment, if the attachpoint has the
  357. /// 0x80 bit set then we assume this is an append
  358. /// operation otherwise we replace whatever is
  359. /// currently attached at the attachpoint
  360. /// return true if something actually changed
  361. /// </summary>
  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. }