Message 1 of 2

Not applicable
04-23-2018
07:31 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello,
I have a Global Utility Plugin which check if a custom menu exists at startup of 3dsMax, and creates it if it's not there. The plugin worked fine in others versions of 3dsMax (tested in 2016 & 2017) but apparently the menu is not registered in 2018 version. Also, the current code doesn't throw any exception.
Here's a sample code :
IIActionManager actionManager = MaxInterfaces.Ip.ActionManager; IIMenuManager menuManager = MaxInterfaces.Ip.MenuManager; menu = menuManager.FindMenu("My Menu"); if (menu != null) { menuManager.UnRegisterMenu(menu); MaxInterfaces.Global.ReleaseIMenu(menu); menu = null; } menu = MaxInterfaces.Global.IMenu; menu.Title = "My Menu"; menuManager.RegisterMenu(menu, 0); foreach (IActionItem item in MaxUtils.GetActionsByCategory("My Menu")) { IIMenuItem menuItemAltitude = MaxInterfaces.Global.IMenuItem; menuItemAltitude.Title = "&" + item.ButtonText; menuItemAltitude.ActionItem = item; menu.AddItem(menuItemAltitude, -1); } menuItem = MaxInterfaces.Global.IMenuItem; menuItem.SubMenu = menu; menuManager.MainMenuBar.AddItem(menuItem, -1); menuManager.UpdateMenuBar();
The code actually finds my actions related to the category "My Menu", but if I go to the Customize panel, no menu were created, and the main menu bar still the same.
Thank for your help.
Solved! Go to Solution.