Пример #1
0
        // Token: 0x06000209 RID: 521 RVA: 0x000115B0 File Offset: 0x0000F7B0
        public static void SetReadme(Pmx pmx, string path)
        {
            PmxModelInfo modelInfo     = pmx.ModelInfo;
            PmxModelInfo pmxModelInfo  = modelInfo;
            PmxModelInfo pmxModelInfo2 = pmxModelInfo;

            pmxModelInfo2.CommentE += Environment.NewLine;
            PmxTag.SetTag("readme", pmx.ModelInfo.CommentE);
        }
Пример #2
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);
 }
Пример #3
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);
        }
Пример #4
0
 // Token: 0x0600020B RID: 523 RVA: 0x0001161B File Offset: 0x0000F81B
 public static void RemoveReadme(Pmx pmx)
 {
     pmx.ModelInfo.CommentE = PmxTag.RemoveTag("readme", pmx.ModelInfo.CommentE);
     pmx.ModelInfo.CommentE = pmx.ModelInfo.CommentE.Trim();
 }
Пример #5
0
 // Token: 0x0600020A RID: 522 RVA: 0x000115F4 File Offset: 0x0000F7F4
 public static bool ExistReadme(Pmx pmx)
 {
     return(PmxTag.ExistTag("readme", pmx.ModelInfo.CommentE));
 }
Пример #6
0
        public void FromPmx(Pmx pmx)
        {
            Clear();
            FilePath     = pmx.FilePath;
            LoadErrCount = pmx.LoadErrCount;
            Header       = pmx.Header.Clone();
            ModelInfo    = pmx.ModelInfo.Clone();
            int count = pmx.VertexList.Count;

            VertexList.Capacity = count;
            for (int i = 0; i < count; i++)
            {
                VertexList.Add(pmx.VertexList[i].Clone());
            }
            count             = pmx.FaceList.Count;
            FaceList.Capacity = count;
            for (int j = 0; j < count; j++)
            {
                FaceList.Add(pmx.FaceList[j]);
            }
            count = pmx.MaterialList.Count;
            MaterialList.Capacity = count;
            for (int k = 0; k < count; k++)
            {
                MaterialList.Add(pmx.MaterialList[k].Clone());
            }
            count             = pmx.BoneList.Count;
            BoneList.Capacity = count;
            for (int l = 0; l < count; l++)
            {
                BoneList.Add(pmx.BoneList[l].Clone());
            }
            count = pmx.MorphList.Count;
            MorphList.Capacity = count;
            for (int m = 0; m < count; m++)
            {
                MorphList.Add(pmx.MorphList[m].Clone());
            }
            count = pmx.NodeList.Count;
            NodeList.Clear();
            NodeList.Capacity = count;
            for (int n = 0; n < count; n++)
            {
                NodeList.Add(pmx.NodeList[n].Clone());
                if (NodeList[n].SystemNode)
                {
                    if (NodeList[n].Name == "Root")
                    {
                        RootNode = NodeList[n];
                    }
                    else if (NodeList[n].Name == "表情")
                    {
                        ExpNode = NodeList[n];
                    }
                }
            }
            count             = pmx.BodyList.Count;
            BodyList.Capacity = count;
            for (int num = 0; num < count; num++)
            {
                BodyList.Add(pmx.BodyList[num].Clone());
            }
            count = pmx.JointList.Count;
            JointList.Capacity = count;
            for (int num2 = 0; num2 < count; num2++)
            {
                JointList.Add(pmx.JointList[num2].Clone());
            }
            count = pmx.SoftBodyList.Count;
            SoftBodyList.Capacity = count;
            for (int num3 = 0; num3 < count; num3++)
            {
                SoftBodyList.Add(pmx.SoftBodyList[num3].Clone());
            }
        }
Пример #7
0
 public Pmx(Pmx pmx)
     : this()
 {
     FromPmx(pmx);
 }
Пример #8
0
 // Token: 0x060000B7 RID: 183 RVA: 0x0000D630 File Offset: 0x0000B830
 public void UpdateBoneIKKind()
 {
     Pmx.UpdateBoneIKKind(this.BoneList);
 }
Пример #9
0
        // Token: 0x060000B1 RID: 177 RVA: 0x0000C8E4 File Offset: 0x0000AAE4
        public void FromPmx(Pmx pmx)
        {
            this.Clear();
            this.FilePath  = pmx.FilePath;
            this.Header    = pmx.Header.Clone();
            this.ModelInfo = pmx.ModelInfo.Clone();
            int count = pmx.VertexList.Count;

            this.VertexList.Capacity = count;
            for (int i = 0; i < count; i++)
            {
                this.VertexList.Add(pmx.VertexList[i].Clone());
            }
            count = pmx.FaceList.Count;
            this.FaceList.Capacity = count;
            for (int j = 0; j < count; j++)
            {
                this.FaceList.Add(pmx.FaceList[j]);
            }
            count = pmx.MaterialList.Count;
            this.MaterialList.Capacity = count;
            for (int k = 0; k < count; k++)
            {
                this.MaterialList.Add(pmx.MaterialList[k].Clone());
            }
            count = pmx.BoneList.Count;
            this.BoneList.Capacity = count;
            for (int l = 0; l < count; l++)
            {
                this.BoneList.Add(pmx.BoneList[l].Clone());
            }
            count = pmx.MorphList.Count;
            this.MorphList.Capacity = count;
            for (int m = 0; m < count; m++)
            {
                this.MorphList.Add(pmx.MorphList[m].Clone());
            }
            count = pmx.NodeList.Count;
            this.NodeList.Clear();
            this.NodeList.Capacity = count;
            for (int n = 0; n < count; n++)
            {
                this.NodeList.Add(pmx.NodeList[n].Clone());
                bool systemNode = this.NodeList[n].SystemNode;
                if (systemNode)
                {
                    bool flag = this.NodeList[n].Name == "Root";
                    if (flag)
                    {
                        this.RootNode = this.NodeList[n];
                    }
                    else
                    {
                        bool flag2 = this.NodeList[n].Name == "表情";
                        if (flag2)
                        {
                            this.ExpNode = this.NodeList[n];
                        }
                    }
                }
            }
            count = pmx.BodyList.Count;
            this.BodyList.Capacity = count;
            for (int num = 0; num < count; num++)
            {
                this.BodyList.Add(pmx.BodyList[num].Clone());
            }
            count = pmx.JointList.Count;
            this.JointList.Capacity = count;
            for (int num2 = 0; num2 < count; num2++)
            {
                this.JointList.Add(pmx.JointList[num2].Clone());
            }
            count = pmx.SoftBodyList.Count;
            this.SoftBodyList.Capacity = count;
            for (int num3 = 0; num3 < count; num3++)
            {
                this.SoftBodyList.Add(pmx.SoftBodyList[num3].Clone());
            }
        }