AoMEngineLibrary.Graphics.Grn.Nodes.GrnFormBoneChannelsNode.CreateFolderFile C# (CSharp) Method

CreateFolderFile() public method

public CreateFolderFile ( string folder ) : void
folder string
return void
        public override void CreateFolderFile(string folder)
        {
            XDocument doc = new XDocument();
            XElement root = new XElement("fBoneChan",
                new XAttribute("count", this.TransformChannelIndices.Count));
            doc.Add(root);
            for (int i = 0; i < this.TransformChannelIndices.Count; ++i)
            {
                root.Add(new XElement("transformChannelIndex",
                    new XAttribute("index", i), this.TransformChannelIndices[i]));
            }

            string fileName = System.IO.Path.Combine(folder, "fBoneChan.xml");
            using (FileStream stream = System.IO.File.Create(fileName))
            {
                doc.Save(stream);
            }
        }