Adding in a bit more information.

My objective initially is to have a shelfButton to have 2 different 
selection menus.
1. If User clicks on the shelf button, it will shows menuA...
2. If User clicks on the shelf button while pressing "ALT" key, it will 
shows menuB...

My initial code, where it keeps giving off the error of unable as mentioned 
in my first post...
shelfButton
        -enableCommandRepeat 1
        -enable 1
        -noDefaultPopup
        -width 34
        -height 34
        -manage 1
        -visible 1;


// menuA options (only left mouse click on the shelf button)
popupMenu -button 1 -postMenuCommand "import lod_select; lod_menuA = 
lod_select.make_dropdownA(); lod_select.show_menu(lod_menuA)";


// menuB options (alt key + left mouse click on the shelf button)
popupMenu -button 1 -alt 1 -postMenuCommand "import lod_select; lod_menuB = 
lod_select.make_dropdownB(); lod_select.show_menu(lod_menuB)";




Seeing that this is not working, thought I made the shelfButton to have a 
default command that it will load menuA.
This seems to work to my cause, however it seems that while trying to 
access menuB options, I will need to select 2 time before the menuB options 
are presented to me.

If I click on the shelf button, it will shows a menu titled "menuitem1993", 
clicking on that, will it then be showing me the actual menu items of 
menuB,.. How can I bypass this "menuitem1993" creation?

shelfButton
        -enableCommandRepeat 1
        -enable 1
        -noDefaultPopup
        -width 34
        -height 34
        -manage 1
        -visible 1
 -sourceType "python"
 -command "import lod_select; lod_menuA = lod_select.make_dropdownA(); 
lod_select.show_menu(lod_menuA)";


// menuB options (alt key + left mouse click on the shelf button)
popupMenu -button 1 -alt 1;
menuItem -sourceType "python" -command "import lod_select; lod_menuB = 
lod_select.make_dropdownB(); lod_select.show_menu(lod_menuB)";

-- 
You received this message because you are subscribed to the Google Groups 
"Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to python_inside_maya+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/python_inside_maya/a5c6f898-c0cd-4f07-a5b6-1835805aef2c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to