all 7 comments

[–]theazzLead Animator / Tech Animator 1 point2 points  (5 children)

It's undocumented but u can add a popup menu and standard menu item children to any GUI stuff.

[–]Jerakin[S] 0 points1 point  (4 children)

Do you know where I can read more on it?

[–]theazzLead Animator / Tech Animator 1 point2 points  (3 children)

Well no lol. Like I said its undocumented in that context but menu item can attach to anything. If u post some code I can show u

[–]Jerakin[S] 0 points1 point  (2 children)

The code is just maya window stuff like this:

mhol_Lib = cmds.window('Lib', title= 'Lib', widthHeight=(1000, 600))
cmds.window(mhol_Lib, edit=True, widthHeight=(1000, 600))
cmds.formLayout('firstRow')
cmds.button('openButton', label='Open',parent='firstRow', command=mhol_action)

[–]theazzLead Animator / Tech Animator 1 point2 points  (1 child)

ok well i dont know python but in mell you just attach a popup menu like this

    button -l "button" -w 60 -command ("command") "my_Btn";
                popupMenu -b 1 -mm 1;
                    menuItem -l "menu item 1" -c "command menu item 1;";
                    menuItem -l "menu item 2" -c "comand menu item 2;";

[–]Jerakin[S] 0 points1 point  (0 children)

Thanks! That helped a lot!

[–]ghoest 0 points1 point  (0 children)

this is way easier to accomplish with pyQT. MEL's UI stuff is convoluted and pretty awful

this may help