@tig said:
@guanjin said:
Hello TIG: plug-in menu bar, the ability to fold? Thank you
[attachment=0:7wcsfm32]<!-- ia0 -->QQๆชๅพ20120120162611.jpg<!-- ia0 -->[/attachment:7wcsfm32]
I assume by 'fold' you mean 'combine into a single submenu'.[Do you use Google Translate?]
To make that you'll need to recode the menu making part of the script.
Here is how to do it.
the original code [around line#669] looks like this:
UI.menu("Plugins").add_item(cmd)
> UI.menu("Plugins").add_item(cmds)
> UI.menu("Plugins").add_item(cmda)
> UI.menu("Plugins").add_item(cmdx)
This is it recoded with an extra line to make the submenu within the 'Plugins' menu; and the other four lines adjusted to add their commands into that rather than directly into the 'Plugins' menu:
submenu=UI.menu("Plugins").add_submenu(S5+"...")
> submenu.add_item(cmd)
> submenu.add_item(cmds)
> submenu.add_item(cmda)
> submenu.add_item(cmdx)
The 'S5' 'constant is the deBabelized string for 'Slicer5', used as the name for the submenu plus '...'.
If users would prefer this method I could incorporate it into a new release.
So feedback please...
This can shorten the length of plug-ins drop-down menu!
[Do you use Google Translate?]








