Notifications
Clear all

[Closed] Menu operation

Hi,

I’d like to modify some menu items attributes in the max main menu bar.

I have proceed like this :

 
theMenu = menuMan.GetMainMenuBar() -- Get the main menu bar
theItem = theMenu.getItem 1 -- Get the "File" menuitem
theMenu = theItem.getSubMenu() -- Get the "File" submenu
theItem = theMenu.getItem 1 -- Get the second item (0-based) of submenu
   

I’d like to disable the menu item.

I tried to do

theItem.enabled = false

but it not seems to work.
It seems that the object returned by menu.getItem isn’t a menuItem object. But if I print the string returned by the getTitle method, I have the good label.

Thx.

3 Replies

After reading more conscientiously the maxscript documentation, it seems it isn’t possible to use these interface to access and modify “system” menu item.
These methods return MixinInterfaces and it isn’t possible to change them to menuItem classes.

Moreover, these interfaces do permanent modification on the system menu and it is only possible to add and remove items and to change the caption.

Has someone a way to modify the 3dsmax’s system menu’s items ?

Thx.

Guildux.

Customize / Customize User Interface / Menus tab
Now to the Right Select Main Menu Bar and Below
open the File menu select Reset file and click above
the button Delete…
To restore select Group Main Ui to the Left, Category
All Commands, pick Reset File and drag to the Right just
above Open File, or place it where you want.
It is what you wanted?

Tanks for your answer but it is not really what I want to do.

I’d like to disable some menu item (File->Open, File->New, File->Merge, …) when the user launch my maxscript.

Hope it is clear now