View Single Post
# 2 09-10-2014 , 02:47 AM
Gen's Avatar
Super Moderator
Join Date: Dec 2006
Location: South FL
Posts: 3,522
Hey Johan

Since I prefer marking menus to having even more UI clutter I've also transferred the modeling toolkit as you're doing. the "drInit" mel in your Maya installation>scripts folder reveals the commands and flags you can use to query values(this really should be added to the help files).


In the case of checkboxes in your custom marking menus, my suggestion is to have it query the current value of the tool when the menu is being created.

Example:


Code:
menuItem -label "preview loop/ring" -checkBox `nexOpt -q previewLoopRing`

This way it's always up to date. Similarly for radio buttons, in the below example, the bit in parentheses returns true or false if raycast is the current value of the selection option and this returned true/false will decide if the radio button is selected.

Code:
radioMenuItemCollection;
menuItem -l "paint selection" -radioButton (`nexOpt -q selectOption` == "raycast") -c "dR_selectModeRaycast";


- Genny
__________________
::|| My CG Blog ||::
::|| My Maya FAQ ||::