View Full Version : Add CheckBox item to custom marking menu?


EightBit
09 September 2008, 08:46 AM
Hi:
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.

EightBit
09 September 2008, 01:59 AM
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
menuItem
-label "BackfaceCull"
-divider 0
-subMenu 0
-command "if ($bfcEnabled){\r\ndisplayCull -bfc false;\r\n} else {\r\ndisplayCull -bfc true;\r\n}"
-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
menuEditorMenuItem18;

EightBit
09 September 2008, 01:59 AM
Thanks, very useful...:thumbsup:

tbaypaul
09 September 2008, 05:11 PM
Are you talking to yourself........again? You know that goes down on your permanent record.

CGTalk Moderation
09 September 2008, 05:11 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.


1