/// <summary> /// The tree view 1_ key press. /// </summary> /// <param name="sender">The sender.</param> /// <param name="e">The e.</param> /// <remarks></remarks> private void treeView1_KeyPress(object sender, KeyPressEventArgs e) { if ((byte)e.KeyChar == 22) { // Ctrl + v if (map.SelectedMeta == null) { return; } if (map.SelectedMeta.type == "PRTM") { // PRTM Viewer PRTMModel pm = new PRTMModel(ref map.SelectedMeta); ModelViewer mv = new ModelViewer(pm); } else if (map.SelectedMeta.type == "mod2" || map.SelectedMeta.type == "mode") { // MODE Viewer ParsedModel pm = new ParsedModel(ref map.SelectedMeta); ModelViewer mv = new ModelViewer(pm); pm.Dispose(); pm = null; mv.Dispose(); mv = null; } else if (map.SelectedMeta.type == "coll") { collisonViewerToolStripMenuItem_Click(this, null); } else if (map.SelectedMeta.type == "sbsp") { loadBSP(map.SelectedMeta.TagIndex); } } }
/// <summary> /// The view prtm tool strip menu item_ click. /// </summary> /// <param name="sender">The sender.</param> /// <param name="e">The e.</param> /// <remarks></remarks> private void viewPRTMToolStripMenuItem_Click(object sender, EventArgs e) { PRTMModel pm = new PRTMModel(ref map.SelectedMeta); ModelViewer mv = new ModelViewer(pm); }
/// <summary> /// The extract prtmobj tool strip menu item_ click. /// </summary> /// <param name="sender">The sender.</param> /// <param name="e">The e.</param> /// <remarks></remarks> private void extractPRTMOBJToolStripMenuItem_Click(object sender, EventArgs e) { if (folderBrowserDialog.ShowDialog() == DialogResult.Cancel) { return; } PRTMModel pm = new PRTMModel(ref map.SelectedMeta); pm.ExtractMeshesToOBJ(folderBrowserDialog.SelectedPath); MessageBox.Show("Done"); }