ADN-DevTech / 3dsMax-Python-HowTos

3ds Max python samples
MIT License
213 stars 49 forks source link

menuhook doesn't restore menu items that the user has manually removed via Customize User Interface #14

Open ForrestTrepte opened 3 years ago

ForrestTrepte commented 3 years ago

An artist installed a tool that was registered in the 3dsMax menus via menuhook. Subsequently the tool was uninstalled and the artist manually deleted the menu entries. Later, the artist was unable to use a new version of the tool because menuhook did not add the menu items back.

Repro steps:

  1. Install the HowTo samples by running install.sh
  2. Run 3dsMax, note the presence of menu items such as Scripting > Python3 Development > Browse Documentation > Getting Started With Python in 3ds Max
  3. Manually remove the Browse Documentation menu as follows
    • Open Customize > Customize User Interface
    • Select the Menus tab and on the right, under Main Menu Bar expand Scripting and expand Python3 Development.
    • Delete the item Browse Documentation
  4. Exit and restart 3dsMax

Result: The Browse Documentation menu is no longer present. Even if you were to reinstall the HowTos nothing will cause the menu to be recreated again.

Expected: On startup, the samples call menuhook.register and that should restore the menu that was deleted.

image

hugow commented 3 years ago

Thanks a lot for this! I will take a deeper look.