BabylonExportActionItem.cs 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  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. if (form == null)
  20. {
  21. return;
  22. }
  23. form.Dispose();
  24. form = null;
  25. }
  26. public override int Id_
  27. {
  28. get { return 1; }
  29. }
  30. public override string ButtonText
  31. {
  32. get { return "Babylon File Exporter"; }
  33. }
  34. public override string MenuText
  35. {
  36. get { return "&Babylon File Exporter..."; }
  37. }
  38. public override string DescriptionText
  39. {
  40. get { return "Generate a babylon.js scene file2"; }
  41. }
  42. public override string CategoryText
  43. {
  44. get { return "Babylon"; }
  45. }
  46. public override bool IsChecked_
  47. {
  48. get { return false; }
  49. }
  50. public override bool IsItemVisible
  51. {
  52. get { return true; }
  53. }
  54. public override bool IsEnabled_
  55. {
  56. get { return true; }
  57. }
  58. }
  59. }