PDA

View Full Version : Menu operation


Guildux
07-20-2005, 01:45 PM
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.

Guildux
07-21-2005, 09:53 AM
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.

Bao2
07-22-2005, 08:11 PM
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?

Guildux
07-23-2005, 03:17 PM
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 :p

CGTalk Moderation
07-23-2005, 03:17 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.