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
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.
On Wed, Dec 21, 2022 at 1:19 PM Kat Patterson
wrote:
> 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
Okay so that did help, but now I am back to how do I add it to each
individual command (i posted my code, it is a menu that creates an object,
and another option to duplicate that object said amount of times) and how
do I add the button into the mix to make said dropdown options run
On
On Wed, Dec 21, 2022 at 1:42 PM Kat Patterson
wrote:
> Okay so that did help, but now I am back to how do I add it to each
> individual command (i posted my code, it is a menu that creates an object,
> and another option to duplicate that object said amount of times) and how
> do I add the
On Wed, 21 Dec 2022, 2:24 pm Kat Patterson, wrote:
> This helped greatly! Thank you so very much!!
>
> I do have one last question, do you know of a way to make the the changes
> of the dropdown menus only run off of a press of a button? (as in i have a
> 'create' button next to each dropdown
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:
This helped greatly! Thank you so very much!!
I do have one last question, do you know of a way to make the the changes
of the dropdown menus only run off of a press of a button? (as in i have a
'create' button next to each dropdown menu). As in if i change the option
to 'sphere' it doesnt
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