public override void CreateFolderFile(string folder)
{
XDocument doc = new XDocument();
XElement root = new XElement("attKeys",
new XAttribute("TransformChannelIndex", this.TransformChannelIndex));
doc.Add(root);
root.Add(new XElement("Unknown", this.Unknown[0]));
root.Add(new XElement("Unknown", this.Unknown[1]));
root.Add(new XElement("Unknown", this.Unknown[2]));
root.Add(new XElement("Unknown", this.Unknown[3]));
root.Add(new XElement("Unknown", this.Unknown[4]));
root.Add(new XElement("Unknown", this.Unknown2[0]));
root.Add(new XElement("Unknown", this.Unknown2[1]));
root.Add(new XElement("Unknown", this.Unknown2[2]));
root.Add(new XElement("Unknown", this.Unknown2[3]));
XElement positions = new XElement("positions", new XAttribute("count", this.Positions.Count));
for (int i = 0; i < this.Positions.Count; ++i)
{
positions.Add(new XElement("pos", new XAttribute("time",
this.PositionKeys[i]), this.Positions[i]));
}
root.Add(positions);
XElement rotations = new XElement("rotations", new XAttribute("count", this.Rotations.Count));
for (int i = 0; i < this.Rotations.Count; ++i)
{
rotations.Add(new XElement("rot", new XAttribute("time",
this.RotationKeys[i]), this.Rotations[i]));
}
root.Add(rotations);
XElement scales = new XElement("scales", new XAttribute("count", this.Scales.Count));
for (int i = 0; i < this.Scales.Count; ++i)
{
scales.Add(new XElement("scale", new XAttribute("time",
this.ScaleKeys[i]), this.Scales[i]));
}
root.Add(scales);
string fileName = System.IO.Path.Combine(folder, "attKeys.xml");
using (FileStream stream = System.IO.File.Create(fileName))
{
doc.Save(stream);
}
}