BabylonExportActionItem.cs 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. using System.Windows.Forms;
  2. using ActionItem = Autodesk.Max.Plugins.ActionItem;
  3. namespace Max2Babylon
  4. {
  5. public class BabylonExportActionItem : ActionItem
  6. {
  7. private ExporterForm form;
  8. public override bool ExecuteAction()
  9. {
  10. if (form == null)
  11. form = new ExporterForm(this);
  12. form.Show();
  13. form.BringToFront();
  14. form.WindowState = FormWindowState.Normal;
  15. return true;
  16. }
  17. public void Close()
  18. {
  19. form.Dispose();
  20. form = null;
  21. }
  22. public override int Id_
  23. {
  24. get { return 1; }
  25. }
  26. public override string ButtonText
  27. {
  28. get { return "Babylon File Exporter"; }
  29. }
  30. public override string MenuText
  31. {
  32. get { return "&Babylon File Exporter..."; }
  33. }
  34. public override string DescriptionText
  35. {
  36. get { return "Generate a babylon.js scene file2"; }
  37. }
  38. public override string CategoryText
  39. {
  40. get { return "Babylon"; }
  41. }
  42. public override bool IsChecked_
  43. {
  44. get { return false; }
  45. }
  46. public override bool IsItemVisible
  47. {
  48. get { return true; }
  49. }
  50. public override bool IsEnabled_
  51. {
  52. get { return true; }
  53. }
  54. }
  55. }