Beispiel #1
0
 public static string[] GetReadme(Pmx pmx, string root = "")
 {
     string[] tag = PmxTag.GetTag("readme", pmx.ModelInfo.CommentE);
     if (tag != null && !string.IsNullOrEmpty(root))
     {
         for (int i = 0; i < tag.Length; i++)
         {
             if (!Path.IsPathRooted(tag[i]))
             {
                 tag[i] = root + "\\" + tag[i];
             }
         }
     }
     return(tag);
 }
        // Token: 0x060001BF RID: 447 RVA: 0x000106C0 File Offset: 0x0000E8C0
        public void SetFromText(string text)
        {
            this.Clear();
            bool flag = !string.IsNullOrEmpty(text);

            if (flag)
            {
                string[] tag   = PmxTag.GetTag("BumpMap", text);
                bool     flag2 = tag != null && tag.Length != 0;
                if (flag2)
                {
                    this.BumpMapTexture = tag[0];
                }
                string[] tag2  = PmxTag.GetTag("BumpMapUV", text);
                bool     flag3 = tag2 != null && tag2.Length != 0;
                if (flag3)
                {
                    this.BumpMapUV = PmxMaterialAttribute.TextToUVTarget(tag2[0]);
                }
                string[] tag3  = PmxTag.GetTag("NormalMap", text);
                bool     flag4 = tag3 != null && tag3.Length != 0;
                if (flag4)
                {
                    this.NormalMapTexture = tag3[0];
                }
                string[] tag4  = PmxTag.GetTag("NormalMapUV", text);
                bool     flag5 = tag4 != null && tag4.Length != 0;
                if (flag5)
                {
                    this.NormalMapUV = PmxMaterialAttribute.TextToUVTarget(tag4[0]);
                }
                string[] tag5  = PmxTag.GetTag("CubeMap", text);
                bool     flag6 = tag5 != null && tag5.Length != 0;
                if (flag6)
                {
                    this.CubeMapTexture = tag5[0];
                }
                string[] tag6  = PmxTag.GetTag("CubeMapUV", text);
                bool     flag7 = tag6 != null && tag6.Length != 0;
                if (flag7)
                {
                    this.CubeMapUV = PmxMaterialAttribute.TextToUVTarget(tag6[0]);
                }
            }
        }
Beispiel #3
0
 public void SetFromText(string text)
 {
     Clear();
     if (!string.IsNullOrEmpty(text))
     {
         string[] tag = PmxTag.GetTag("BumpMap", text);
         if (tag != null && tag.Length != 0)
         {
             BumpMapTexture = tag[0];
         }
         string[] tag2 = PmxTag.GetTag("BumpMapUV", text);
         if (tag2 != null && tag2.Length != 0)
         {
             BumpMapUV = TextToUVTarget(tag2[0]);
         }
         string[] tag3 = PmxTag.GetTag("NormalMap", text);
         if (tag3 != null && tag3.Length != 0)
         {
             NormalMapTexture = tag3[0];
         }
         string[] tag4 = PmxTag.GetTag("NormalMapUV", text);
         if (tag4 != null && tag4.Length != 0)
         {
             NormalMapUV = TextToUVTarget(tag4[0]);
         }
         string[] tag5 = PmxTag.GetTag("CubeMap", text);
         if (tag5 != null && tag5.Length != 0)
         {
             CubeMapTexture = tag5[0];
         }
         string[] tag6 = PmxTag.GetTag("CubeMapUV", text);
         if (tag6 != null && tag6.Length != 0)
         {
             CubeMapUV = TextToUVTarget(tag6[0]);
         }
     }
 }
Beispiel #4
0
        // Token: 0x06000208 RID: 520 RVA: 0x00011524 File Offset: 0x0000F724
        public static string[] GetReadme(Pmx pmx, string root)
        {
            bool flag = root == null;

            if (flag)
            {
                root = "";
            }
            string[] tag   = PmxTag.GetTag("readme", pmx.ModelInfo.CommentE);
            bool     flag2 = tag != null && !string.IsNullOrEmpty(root);

            if (flag2)
            {
                for (int i = 0; i < tag.Length; i++)
                {
                    bool flag3 = !Path.IsPathRooted(tag[i]);
                    if (flag3)
                    {
                        tag[i] = root + "\\" + tag[i];
                    }
                }
            }
            return(tag);
        }
Beispiel #5
0
 // Token: 0x0600024B RID: 587 RVA: 0x00012E64 File Offset: 0x00011064
 public static bool ExistTag(string tag, string text)
 {
     string[] tag2 = PmxTag.GetTag(tag, text);
     return(tag2 != null);
 }