BabylonExportActionItem.cs 1.4 KB

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