Button with options

Button with options

jayantbhatt07
Advocate Advocate
670 Views
1 Reply
Message 1 of 2

Button with options

jayantbhatt07
Advocate
Advocate

Hi in maya 2019 they added prism option when we click on it its create prism but when I right click on it one another menu pop out ( see the attachment). My question is that can I create this pop up menu in my customize scrip buttons.

0 Likes
Accepted solutions (1)
671 Views
1 Reply
Reply (1)
Message 2 of 2

jayantbhatt07
Advocate
Advocate
Accepted solution

 

Here is the final command

 

window;
columnLayout;
symbolButton -w 35 -h 35 -image "edges_NEX.png" -c "CreatePolygonSphere";        //Right click on the button
popupMenu;
menuItem -l "Plane" -c "CreatePolygonPlane";
menuItem -l "Cube" -c "CreatePolygonCube";


button ;
popupMenu -button 3 -alt true -ctl true;      //Indicate which button (left,middle,right) posts the popup menu. Valid values range from 1 to 3 where 1 is the left most button on the mouse.
menuItem; // (Hold alt + ctrl ) Together and right click
menuItem;
menuItem;

showWindow;

0 Likes