void attachpointListBox_MouseDoubleClick(object sender, MouseEventArgs e) { if (!isExportedToMax) { return; } int index = attachpointListBox.IndexFromPoint(e.Location); if (index != System.Windows.Forms.ListBox.NoMatches && file != null) { if (file.Mesh.Count == 0) { file.Mesh.Add(new BrgMesh(file)); } BrgAttachpoint att = new BrgAttachpoint(); att.NameId = BrgAttachpoint.GetIdByName((string)attachpointListBox.Items[index]); file.Mesh[0].Attachpoint.Add(att); //MessageBox.Show(file.Mesh[0].attachpoints.Count.ToString()); Maxscript.NewDummy("newDummy", att.GetMaxName(), att.GetMaxTransform(), att.GetMaxPosition(), att.GetMaxBoxSize(), att.GetMaxScale()); loadUIAttachpoint(); attachpointComboBox.SelectedIndex = attachpointComboBox.Items.Count - 1; } }