Ejemplo n.º 1
0
 public SkinSubBaker(Wearable skin)
 {
     if (skin.Type != WearableType.Skin)
     {
         throw new ArgumentException(nameof(skin));
     }
     m_SkinColor           = GetSkinColor(skin);
     m_RosyComplexionColor = GetRosyComplexionColor(skin);
     m_LipPinknessColor    = GetLipPinknessColor(skin);
     m_LipstickColor       = GetLipstickColor(skin);
     m_BlushColor          = GetBlushColor(skin);
     m_OutershadowColor    = GetOuterShadowColor(skin);
     m_InnershadowColor    = GetInnerShadowColor(skin);
     m_EyelinerColor       = GetEyelinerColor(skin);
     m_NailpolishColor     = GetNailPolishColor(skin);
     m_Innershadow         = skin.GetParamValueOrDefault(709, 0);
     m_Outershadow         = skin.GetParamValueOrDefault(707, 0);
     skin.Textures.TryGetValue(AvatarTextureIndex.HeadBodypaint, out m_HeadTextureId);
     skin.Textures.TryGetValue(AvatarTextureIndex.UpperBodypaint, out m_UpperTextureId);
     skin.Textures.TryGetValue(AvatarTextureIndex.LowerBodypaint, out m_LowerTextureId);
     if (m_HeadTextureId == AppearanceInfo.AvatarTextureData.DefaultAvatarTextureID)
     {
         m_HeadTextureId = UUID.Zero;
     }
     if (m_UpperTextureId == AppearanceInfo.AvatarTextureData.DefaultAvatarTextureID)
     {
         m_UpperTextureId = UUID.Zero;
     }
     if (m_LowerTextureId == AppearanceInfo.AvatarTextureData.DefaultAvatarTextureID)
     {
         m_LowerTextureId = UUID.Zero;
     }
 }
Ejemplo n.º 2
0
 public ShoesSubBaker(Wearable shoes)
 {
     if (shoes.Type != WearableType.Shoes)
     {
         throw new ArgumentException(nameof(shoes));
     }
     m_Color          = GetShoeColor(shoes);
     m_ShoeHeight     = shoes.GetParamValueOrDefault(1052, 0.1);
     m_ShoeHeightBump = shoes.GetParamValueOrDefault(1055, 0.1);
     shoes.Textures.TryGetValue(AvatarTextureIndex.LowerShoes, out m_TextureId);
     if (m_TextureId == AppearanceInfo.AvatarTextureData.DefaultAvatarTextureID)
     {
         m_TextureId = UUID.Zero;
     }
 }
Ejemplo n.º 3
0
 public UnderpantsSubBaker(Wearable underpants)
 {
     if (underpants.Type != WearableType.Underpants)
     {
         throw new ArgumentException(nameof(underpants));
     }
     m_Color           = GetUnderpantsColor(underpants);
     m_PantsLength     = underpants.GetParamValueOrDefault(1054, 0.3);
     m_PantsLengthBump = underpants.GetParamValueOrDefault(1055, 0.3);
     m_PantsWaist      = underpants.GetParamValueOrDefault(1056, 0.8);
     m_PantsWaistBump  = underpants.GetParamValueOrDefault(1057, 0.8);
     underpants.Textures.TryGetValue(AvatarTextureIndex.LowerUnderpants, out m_TextureId);
     if (m_TextureId == AppearanceInfo.AvatarTextureData.DefaultAvatarTextureID)
     {
         m_TextureId = UUID.Zero;
     }
 }
Ejemplo n.º 4
0
 public SkirtSubBaker(Wearable skirt)
 {
     if (skirt.Type != WearableType.Skirt)
     {
         throw new ArgumentException(nameof(skirt));
     }
     m_Color       = GetSkirtColor(skirt);
     m_SkirtLength = skirt.GetParamValueOrDefault(858, 0.4);
     m_SlitFront   = skirt.GetParamValueOrDefault(859, 1);
     m_SlitBack    = skirt.GetParamValueOrDefault(860, 1);
     m_SlitLeft    = skirt.GetParamValueOrDefault(861, 1);
     m_SlitRight   = skirt.GetParamValueOrDefault(862, 1);
     skirt.Textures.TryGetValue(AvatarTextureIndex.Skirt, out m_TextureId);
     if (m_TextureId == AppearanceInfo.AvatarTextureData.DefaultAvatarTextureID)
     {
         m_TextureId = UUID.Zero;
     }
 }
Ejemplo n.º 5
0
        public GlovesSubBaker(Wearable gloves)
        {
            if (gloves.Type != WearableType.Gloves)
            {
                throw new ArgumentException(nameof(gloves));
            }

            m_GlovesLength      = gloves.GetParamValueOrDefault(1058, 0.01);
            m_GlovesFingers     = gloves.GetParamValueOrDefault(1060, 1);
            m_GlovesFingersBump = gloves.GetParamValueOrDefault(1061, 1);
            m_GlovesLengthBump  = gloves.GetParamValueOrDefault(1059, 0.8);
            gloves.Textures.TryGetValue(AvatarTextureIndex.UpperGloves, out m_GlovesTextureId);
            if (m_GlovesTextureId == AppearanceInfo.AvatarTextureData.DefaultAvatarTextureID)
            {
                m_GlovesTextureId = UUID.Zero;
            }
            m_GlovesColor = GetGlovesColor(gloves);
        }
Ejemplo n.º 6
0
        public PantsSubBaker(Wearable pants)
        {
            if (pants.Type != WearableType.Pants)
            {
                throw new ArgumentException(nameof(pants));
            }

            pants.Textures.TryGetValue(AvatarTextureIndex.LowerPants, out m_PantsTextureId);
            if (m_PantsTextureId == AppearanceInfo.AvatarTextureData.DefaultAvatarTextureID)
            {
                m_PantsTextureId = UUID.Zero;
            }
            m_PantsColor = GetPantColor(pants);
            m_Length     = pants.GetParamValueOrDefault(615, 0.8);
            m_Waist      = pants.GetParamValueOrDefault(614, 0.8);
            m_LengthBump = pants.GetMinParamOrDefault(0, 1018, 1036);
            m_WaistBump  = pants.GetMinParamOrDefault(0, 1017, 1035);
            m_Displace   = pants.GetParamValueOrDefault(516, 0);
        }
Ejemplo n.º 7
0
        public JacketSubBaker(Wearable jacket)
        {
            if (jacket.Type != WearableType.Jacket)
            {
                throw new ArgumentException(nameof(jacket));
            }

            m_JacketUpperOpen    = jacket.GetParamValueOrDefault(622, 0.8);
            m_JacketLowerOpen    = jacket.GetParamValueOrDefault(623, 0.8);
            m_JacketUpperLength  = jacket.GetParamValueOrDefault(620, 0.8);
            m_JacketLowerLength  = jacket.GetParamValueOrDefault(621, 0.8);
            m_JacketSleeveLength = jacket.GetParamValueOrDefault(1020, 0);
            m_JacketCollarFront  = jacket.GetParamValueOrDefault(1022, 0);
            m_JacketCollarBack   = jacket.GetParamValueOrDefault(1024, 0);
            m_JacketUpperColor   = GetJacketUpperColor(jacket);
            m_JacketLowerColor   = GetJacketLowerColor(jacket);

            m_JacketSleeveLengthBump = jacket.GetParamValueOrDefault(1019, 0);
            m_JacketCollarFrontBump  = jacket.GetParamValueOrDefault(1021, 0);
            m_JacketCollarBackBump   = jacket.GetParamValueOrDefault(1023, 0);
            m_JacketLowerLengthBump  = jacket.GetMinParamOrDefault(0, 1033, 1025);
            m_JacketUpperLengthBump  = jacket.GetMinParamOrDefault(0, 1037, 1027);
            m_JacketUpperOpenBump    = jacket.GetMinParamOrDefault(0, 1026, 1038);
            m_JacketLowerOpenBump    = jacket.GetMinParamOrDefault(0, 1028, 1034);

            jacket.Textures.TryGetValue(AvatarTextureIndex.UpperJacket, out m_UpperTextureId);
            jacket.Textures.TryGetValue(AvatarTextureIndex.LowerJacket, out m_LowerTextureId);
            if (m_UpperTextureId == AppearanceInfo.AvatarTextureData.DefaultAvatarTextureID)
            {
                m_UpperTextureId = UUID.Zero;
            }
            if (m_LowerTextureId == AppearanceInfo.AvatarTextureData.DefaultAvatarTextureID)
            {
                m_LowerTextureId = UUID.Zero;
            }
        }
Ejemplo n.º 8
0
        public ShirtSubBaker(Wearable shirt)
        {
            if (shirt.Type != WearableType.Shirt)
            {
                throw new ArgumentException(nameof(shirt));
            }

            m_ShirtColor = GetShirtColor(shirt);

            shirt.Textures.TryGetValue(AvatarTextureIndex.UpperShirt, out m_UpperTextureId);
            if (m_UpperTextureId == AppearanceInfo.AvatarTextureData.DefaultAvatarTextureID)
            {
                m_UpperTextureId = UUID.Zero;
            }
            m_SleeveLength          = shirt.GetParamValueOrDefault(600, 0.7);
            m_BottomLength          = shirt.GetParamValueOrDefault(601, 0.8);
            m_CollarFrontHeight     = shirt.GetParamValueOrDefault(602, 0.8);
            m_CollarBackHeight      = shirt.GetParamValueOrDefault(778, 0.8);
            m_BottomLengthBump      = shirt.GetMinParamOrDefault(0, 1014, 1030);
            m_SleeveLengthBump      = shirt.GetMinParamOrDefault(0, 1013, 1029);
            m_CollarFrontHeightBump = shirt.GetMinParamOrDefault(0, 1015, 1031);
            m_CollarBackHeightBump  = shirt.GetMinParamOrDefault(0, 1016, 1032);
            m_Displace = shirt.GetMinParamOrDefault(0, 628, 828);
        }
Ejemplo n.º 9
0
        public SocksSubBaker(Wearable socks)
        {
            if (socks.Type != WearableType.Socks)
            {
                throw new ArgumentException(nameof(socks));
            }

            m_Color           = GetSocksColor(socks);
            m_SocksLength     = socks.GetParamValueOrDefault(617, 0.35);
            m_SocksLengthBump = socks.GetMinParamOrDefault(0.35, 1050, 1051);
            socks.Textures.TryGetValue(AvatarTextureIndex.LowerSocks, out m_TextureId);
            if (m_TextureId == AppearanceInfo.AvatarTextureData.DefaultAvatarTextureID)
            {
                m_TextureId = UUID.Zero;
            }
        }
Ejemplo n.º 10
0
 public UndershirtSubBaker(Wearable undershirt)
 {
     if (undershirt.Type != WearableType.Undershirt)
     {
         throw new ArgumentException(nameof(undershirt));
     }
     m_Color            = GetUndershirtColor(undershirt);
     m_SleeveLength     = undershirt.GetParamValueOrDefault(1042, 0.4);
     m_SleeveLengthBump = undershirt.GetParamValueOrDefault(1043, 0.4);
     m_BottomLength     = undershirt.GetParamValueOrDefault(1044, 0.8);
     m_BottomLengthBump = undershirt.GetParamValueOrDefault(1045, 0.8);
     m_CollarFront      = undershirt.GetParamValueOrDefault(1046, 0.8);
     m_CollarFrontBump  = undershirt.GetParamValueOrDefault(1047, 0.8);
     m_CollarBack       = undershirt.GetParamValueOrDefault(1048, 0.8);
     m_CollarBackBump   = undershirt.GetParamValueOrDefault(1049, 0.8);
     undershirt.Textures.TryGetValue(AvatarTextureIndex.UpperShirt, out m_TextureId);
     if (m_TextureId == AppearanceInfo.AvatarTextureData.DefaultAvatarTextureID)
     {
         m_TextureId = UUID.Zero;
     }
 }