private void colladaToolStripMenuItem_Click(object sender, EventArgs e) { using (SaveFileDialog sd = new SaveFileDialog() { DefaultExt = "dae", Filter = "DAE Files|*.dae" }) if (sd.ShowDialog(this) == DialogResult.OK) { model.ToCollada(TextureInfo == null ? null : TextureInfo.Select((item) => item.Name).ToArray()).Save(sd.FileName); string p = Path.GetDirectoryName(sd.FileName); if (TextureInfo != null) { for (int i = 0; i < TextureInfo.Length; i++) { TextureInfo[i].Image.Save(Path.Combine(p, TextureInfo[i].Name + ".png")); } } } }