Hi Kat,

Have a look here:
https://help.autodesk.com/cloudhelp/2022/ENU/Maya-Tech-Docs/CommandsPython/optionMenu.html

"Note that commands attached to menu items will not get called. Attach any
commands via the -cc/changedCommand flag."

And specifically the changeCommand:
https://help.autodesk.com/cloudhelp/2022/ENU/Maya-Tech-Docs/CommandsPython/optionMenu.html#flagchangeCommand

The example at the bottom of the page actually shows you how to use the
callback, which will receive the value of the menuItem when it is changed
in the optionMenu.

Justin


On Wed, Dec 21, 2022 at 1:11 PM Kat Patterson <katierayeb...@gmail.com>
wrote:

> https://pastebin.com/SfLxjFmG
>
> On Tuesday, December 20, 2022 at 5:09:19 PM UTC-7 Kat Patterson wrote:
>
>> I am in need of some help, not sure how active this forum is anymore.
>>
>> I am looking to see if there is any way to make a optionMenu run a
>> command for each option in the drop down menu? I am pretty new to maya
>> python so I do not know very much, but google is less helpful than finding
>> everything out myself.
>>
>> Here is the code that i currently have, I just am not sure how to connect
>> the commands to the actual window ui;
>>
>>
>> --
> You received this message because you are subscribed to the Google Groups
> "Python Programming for Autodesk Maya" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to python_inside_maya+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/python_inside_maya/16e3c45b-8fba-4542-83a9-750fbc0e1ce4n%40googlegroups.com
> <https://groups.google.com/d/msgid/python_inside_maya/16e3c45b-8fba-4542-83a9-750fbc0e1ce4n%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to python_inside_maya+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/python_inside_maya/CAPGFgA2QH-142fM4AS8Mc36zTCm%2B_Dayrnw36Yd%2B98GqJmHwRQ%40mail.gmail.com.

Reply via email to