private void exportTo3DSToolStripMenuItem_Click(object sender, EventArgs e) { int n; if (stm != null) { n = stm.index; } else if (skm != null) { n = skm.MyIndex; } else { return; } if (pcc.Exports[n].ClassName == "StaticMesh") { SaveFileDialog d = new SaveFileDialog(); d.Filter = "*.3ds|*.3ds"; if (d.ShowDialog() == DialogResult.OK) { if (File.Exists(d.FileName)) { File.Delete(d.FileName); } PSKFile p = stm.ExportToPsk(); Helper3DS.ConvertPSKto3DS(p, d.FileName); MessageBox.Show("Done."); } } }
public void Exportscene3DS(string path) { Lib3dsFile f = Helper3DS.EmptyFile(); foreach (Levelfile l in Levels) { l.level.Export3DS(f); } Helper3DS.ClearFirstMesh(f); if (!LIB3DS.lib3ds_file_save(f, path)) { MessageBox.Show("Error while saving!"); } }
private void exportTo3DSToolStripMenuItem_Click(object sender, EventArgs e) { int n = listBox1.SelectedIndex; if (n == -1 | pcc == null) { return; } if (pcc.Exports[Objects[n].index].ClassName == "StaticMesh") { SaveFileDialog d = new SaveFileDialog(); d.Filter = "*.3ds|*.3ds"; if (d.ShowDialog() == System.Windows.Forms.DialogResult.OK) { if (File.Exists(d.FileName)) { File.Delete(d.FileName); } PSKFile p = stm.ExportToPsk(); Helper3DS.ConvertPSKto3DS(p, d.FileName); MessageBox.Show("Done."); } } }