def printNewMenuItem( item ):
print item
This code alone ALWAYS produces a invalid syntax on my end, so I am unable
to check if that even works, or how it even works. I have looked at the
documentation and am unable to find a workaround while looking at either of
those documentation sites.
Any ideas?
On Tuesday, December 20, 2022 at 5:14:28 PM UTC-7 [email protected] wrote:
> 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 <[email protected]> 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 [email protected].
>> 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 [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/python_inside_maya/e49e0fb6-aceb-4549-b406-e76fb5025476n%40googlegroups.com.