Forum: Autodesk Maya
Posted By: malcolm
Post Time: 08 August 2017 at 01:15 PM
Text:
Hi all,
I'm trying to get an optionMenu, menuItem list , to update - almost given up and used an easier control, but thought I'd ask some better minds first
I'm attempting to delete the dynamically generated menuItems in the optionMenu and replace them with a new set of items (user generated object sets).
If I run the script and then and immediately press the 'update user sets' button it appears to be working.
However if run the script then select something first or move off the UI window and then press the 'update user sets' button I get an error "menu Item's not found".
Any pointers, general help, further reading, reasons why this is just a bad approach or solutions most welcome.
To Repro: open a new scene and create an object set - of default cameras would do. Then copy and paste the example code below.
/////// EXAMPLE CODE /////////////
/////////// END ////////////
Posted By: malcolm
Post Time: 08 August 2017 at 01:15 PM
Text:
Hi all,
I'm trying to get an optionMenu, menuItem list , to update - almost given up and used an easier control, but thought I'd ask some better minds first

I'm attempting to delete the dynamically generated menuItems in the optionMenu and replace them with a new set of items (user generated object sets).
If I run the script and then and immediately press the 'update user sets' button it appears to be working.
However if run the script then select something first or move off the UI window and then press the 'update user sets' button I get an error "menu Item's not found".
Any pointers, general help, further reading, reasons why this is just a bad approach or solutions most welcome.
To Repro: open a new scene and create an object set - of default cameras would do. Then copy and paste the example code below.
/////// EXAMPLE CODE /////////////
/////////// END ////////////