PDA

View Full Version : update the "Show" menu with mel


Geuse
12-02-2010, 03:55 PM
I'm trying to make the "show menu" update using the "updateShowMenu" command.
However I'm just not sure about the arguments.
It works easy with the shading and lighting menu as I only need to specify the viewPanel and the dropdown.

But I'm not sure about the $panel string in this case and the $playBlastMenu.

global proc updateShowMenu(string $menu, string $ed, string $panel, string $playBlastMenu)
as oppose to this:
global proc updateLightingMenu( string $menu, string $ed )

the script can be found here:
C:\Program Files\Autodesk\Maya2011\scripts\others\createModelPanelMenu.mel

global string $gMainPane;
string $panels[] = `paneLayout -q -ca $gMainPane`;
//Update all shading and lighting menus
for($eachPanel in $panels)
{
modelEditor -e -dl "all" -lights 0 $eachPanel;
modelEditor -edit -displayAppearance smoothShaded -activeOnly false $eachPanel;
string $panelMenu[] = `menuBarLayout -q -ma $eachPanel`;
updateShadingMenu $panelMenu[1] $eachPanel;
updateLightingMenu $panelMenu[2] $eachPanel;
}

CGTalk Moderation
12-02-2010, 03:55 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.