Tranimatronic
11-19-2008, 07:50 PM
hi guys,
Im having problems with a menu I have created.
One of the menuItems is a checkbox cmds.menuItem checkBox=True and for the command of the menuItem I am calling a function and sending the parent menu (ie function(parentMenu))
Once in the function I am getting the array of menuItems that the parent menu has and querying the state of the checkbox menuItem:-
menuItems= cmds.menu(parentMenu, query=True, itemArray=True)
Gives all of the menu Items
if (cmds.menuItem(menuItems[4], query=True, checkBox=True)):
(menuItems[4] is the checkBox) querys wether the checkbox is on or not.
The problem I am having is that this code ALWAYS returns the INITIAL state of the checkbox and NOT what the checkbox is currently.
I dont see a (menuItem changeCommand) to be able to act upon the change.
Am I using this correctly ?
Thanks for any pointers
T
Im having problems with a menu I have created.
One of the menuItems is a checkbox cmds.menuItem checkBox=True and for the command of the menuItem I am calling a function and sending the parent menu (ie function(parentMenu))
Once in the function I am getting the array of menuItems that the parent menu has and querying the state of the checkbox menuItem:-
menuItems= cmds.menu(parentMenu, query=True, itemArray=True)
Gives all of the menu Items
if (cmds.menuItem(menuItems[4], query=True, checkBox=True)):
(menuItems[4] is the checkBox) querys wether the checkbox is on or not.
The problem I am having is that this code ALWAYS returns the INITIAL state of the checkbox and NOT what the checkbox is currently.
I dont see a (menuItem changeCommand) to be able to act upon the change.
Am I using this correctly ?
Thanks for any pointers
T
