BabylonExportActionItem.cs 1.3 KB

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