Add CheckBox item to custom marking menu?


I want to add a checkbox style item to a marking menu.
It would execute different commands based on whether it is being checked or unchecked.
I can setup and edit marking menus, so all l need is and example of how to implement a checkbox.
Thanks much.


Here’s the code to add a checkbox type MM item to toggle backface culling on a selected object. You don’t need to inlcude all the params who’s values are zero:

 int $bfcEnabled = `displayCull -q -bfc`; //Test to see if bfc is on
 		-label "BackfaceCull"
 		-divider 0
 		-subMenu 0
 		-command "if ($bfcEnabled){
displayCull -bfc false;
} else {
displayCull -bfc true;
 		-altModifier 0
 		-optionModifier 0
 		-commandModifier 0
 		-ctrlModifier 0
 		-shiftModifier 0
 		-checkBox $bfcEnabled
 		-optionBox 0
 		-enable 1
 		-data 0
 		-radialPosition "E"
 		-enableCommandRepeat 1
 		-image "commandButton.xpm"
 		-echoCommand 0
 		-italicized 0
 		-boldFont 0


Thanks, very useful…:thumbsup:


Are you talking to yourself…again? You know that goes down on your permanent record.


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.