Create menu in 3DS Max using .net

Hello,

I was wondering if there is an example anyone can share to create a menu with sub-menus in 3DS max to be updated dynamically (on startup of 3DS Max). I’m thinking on the lines of using a .net plugin to read from an xml file and populate a menu in Max.

Appreciate the help.

Thanks.

Have you seen this thread?

1 Like

Yes, that is 100% doable. At Volition we use the following (in broad strokes) solution for that problem:

  1. All *ms MaxScript files are stored in source control under a folder hierarchy that mimics what the menu/submenu structure will be; vScripts\modeling, vScripts\mapping, etc…
  2. Pre-startup of Max (we hijack the Max shortcut to point to an in-house package management system that can run pre-startup tasks) we run a Python tool that trolls the entire vscripts\**\* tree in source control and builds up one large *.mcr Macroscript file with individual entries for each *.ms file in the folder tree.
  3. There is a Max startup script that parses the Macroscript file and, using the MaxScript menuManager interface, adds a ‘vScripts’ menu to the main menu bar and creates a series of sub-menus underneath it, one for each of the subfolders in the source control tree. Those menus and submenus are populated with the various macroscript entries in the monolithic Macroscript file.

We teardown and rebuild the menu at every Max startup to ensure any adds or deletes from the source control tree are fully reflected in our menu in Max.

1 Like

Great info. Thanks. I got it running by a maxscript that parses through an xml file using a .Net XML reader. This looks for menu names and sets them up using the menuman interface properties in max. I have a startup script that defines custom macroscript and scripts folder.

Just a reminder to make sure you are removing all your menu items correctly from the max menu, or your .mnux file will become gigantic and slow down max start up a bit as well as the customise ui window considerably ( 45 minutes is the worst I have witnessed ).
See this thread:

1 Like