Exemplo n.º 1
0
        public void NewChild()
        {
            BfresBone bn = new BfresBone(skeletonParent);

            if (BoneU != null)
            {
                BoneU      = new ResU.Bone();
                BoneU.Name = CheckDuplicateBoneNames("NewBone");

                BfresWiiU.ReadBone(bn, BoneU, false);
                Nodes.Add(bn);
                skeletonParent.bones.Add(bn);

                BoneU.ParentIndex = (short)bn.parentIndex;
                ((FSKL)skeletonParent).AddBone(BoneU);
            }
            else
            {
                Bone      = new Bone();
                Bone.Name = CheckDuplicateBoneNames("NewBone");

                BfresSwitch.ReadBone(bn, Bone, false);
                Nodes.Add(bn);
                skeletonParent.bones.Add(bn);

                Bone.ParentIndex = (short)bn.parentIndex;
                ((FSKL)skeletonParent).AddBone(Bone);
            }
        }
Exemplo n.º 2
0
            public void NewChildBone()
            {
                BfresBone bone = new BfresBone(fskl);

                bone.parentIndex = -1;

                if (SkeletonU != null)
                {
                    bone.BoneU      = new ResU.Bone();
                    bone.BoneU.Name = CheckDuplicateBoneNames("NewBone");

                    BfresWiiU.ReadBone(bone, bone.BoneU, false);

                    Nodes.Add(bone);
                    fskl.bones.Add(bone);

                    bone.BoneU.ParentIndex = (short)bone.parentIndex;
                    fskl.AddBone(bone.BoneU);
                }
                else
                {
                    bone.Bone      = new Bone();
                    bone.Bone.Name = CheckDuplicateBoneNames("NewBone");

                    BfresSwitch.ReadBone(bone, bone.Bone, false);

                    Nodes.Add(bone);
                    fskl.bones.Add(bone);

                    bone.Bone.ParentIndex = (short)bone.parentIndex;
                    fskl.AddBone(bone.Bone);
                }
            }
Exemplo n.º 3
0
        public void ImportChild()
        {
            OpenFileDialog ofd = new OpenFileDialog();

            ofd.Filter   = FileFilters.BONE;
            ofd.FileName = Text;

            if (ofd.ShowDialog() == DialogResult.OK)
            {
                BfresBone bn = new BfresBone(skeletonParent);

                if (BoneU != null)
                {
                    BoneU = new ResU.Bone();
                    BoneU.Import(ofd.FileName, GetResFileU());
                    BoneU.Name = CheckDuplicateBoneNames(BoneU.Name);

                    BfresWiiU.ReadBone(bn, BoneU, false);
                    Nodes.Add(bn);
                    skeletonParent.bones.Add(bn);
                    ((FSKL)skeletonParent).AddBone(BoneU);
                }
                else
                {
                    Bone = new Bone();
                    Bone.Import(ofd.FileName);
                    Bone.Name = CheckDuplicateBoneNames(Bone.Name);

                    BfresSwitch.ReadBone(bn, Bone, false);
                    Nodes.Add(bn);
                    skeletonParent.bones.Add(bn);
                    ((FSKL)skeletonParent).AddBone(Bone);
                }
            }
        }
Exemplo n.º 4
0
            public override void Import(string[] FileNames)
            {
                foreach (var FileName in FileNames)
                {
                    string extension = System.IO.Path.GetExtension(FileName);

                    if (extension == ".bfbon")
                    {
                        BfresBone bn = new BfresBone();

                        if (SkeletonU != null)
                        {
                            ResU.Bone bone = new ResU.Bone();
                            bone.Import(FileName, GetResFileU());

                            BfresWiiU.ReadBone(bn, bone, false);
                        }
                        else
                        {
                            Bone bone = new Bone();
                            bone.Import(FileName);

                            BfresSwitch.ReadBone(bn, bone, false);
                        }
                    }
                }
            }
Exemplo n.º 5
0
            public override void Import(string[] FileNames)
            {
                foreach (var FileName in FileNames)
                {
                    string extension = System.IO.Path.GetExtension(FileName);

                    if (extension == ".bfbon")
                    {
                        BfresBone bn = new BfresBone(fskl);

                        List <string> boneKeys = fskl.bones.Select(i => i.Text).ToList();
                        if (SkeletonU != null)
                        {
                            ResU.Bone bone = new ResU.Bone();
                            bone.Import(FileName, GetResFileU());
                            bone.ParentIndex = -1;
                            bone.Name        = Utils.RenameDuplicateString(boneKeys, bone.Name);

                            BfresWiiU.ReadBone(bn, bone, false);

                            Nodes.Add(bn);
                            fskl.bones.Add(bn);

                            bn.BoneU.ParentIndex = (short)bn.parentIndex;
                            fskl.AddBone(bn.BoneU);
                        }
                        else
                        {
                            Bone bone = new Bone();
                            bone.Import(FileName);
                            bone.ParentIndex = -1;
                            bone.Name        = Utils.RenameDuplicateString(boneKeys, bone.Name);

                            BfresSwitch.ReadBone(bn, bone, false);

                            Nodes.Add(bn);
                            fskl.bones.Add(bn);

                            bn.Bone.ParentIndex = (short)bn.parentIndex;
                            fskl.AddBone(bn.Bone);
                        }
                    }
                }
            }
Exemplo n.º 6
0
            public override void Import(string[] FileNames)
            {
                foreach (var FileName in FileNames)
                {
                    string extension = System.IO.Path.GetExtension(FileName);

                    if (extension == ".bfbon")
                    {
                        BfresBone bn = new BfresBone(fskl);

                        if (SkeletonU != null)
                        {
                            ResU.Bone bone = new ResU.Bone();
                            bone.Import(FileName, GetResFileU());
                            bone.ParentIndex = -1;

                            BfresWiiU.ReadBone(bn, bone, false);

                            Nodes.Add(bn);
                            fskl.bones.Add(bn);

                            bn.BoneU.ParentIndex = (short)bn.parentIndex;
                            fskl.AddBone(bn.Bone);
                        }
                        else
                        {
                            Bone bone = new Bone();
                            bone.Import(FileName);
                            bone.ParentIndex = -1;

                            BfresSwitch.ReadBone(bn, bone, false);

                            Nodes.Add(bn);
                            fskl.bones.Add(bn);

                            bn.Bone.ParentIndex = (short)bn.parentIndex;
                            fskl.AddBone(bn.Bone);
                        }
                    }
                }
            }