Recreating the Auto Key button (Maya)

Hello!

I was wondering if anybody knows a way of recreating the auto-key button in the Maya interface.
It’s located in the bottom right of the main Maya UI.
When turned off it appears as a grey key. When active it turns red.

I need to create a button that has the same behavior, when its off its one image, when active it becomes another image.

Im trying to use the iconTextButton command, can I make it work with that or do i need another command?

Thanks in advanced!
Adrian

When button is pressed (command flag of button), do this with pymel like this:
iconTextButton(nameOfTextButton, e=1, image=pathToNewImage)

with MEL you could call it similarly, probably like this:
iconTextButton -e -image pathToNewImage nameOfTextButton

When you are changing background, you follow similar idea:
iconTextButton -e -bgc [0,1,0]

-e or -edit flag is for editing existing UI elements

Name of Text button is what you assigned button as when creating it, if you didnt assign it. Do it :slight_smile:

[QUOTE=ArYeS;17694]When button is pressed (command flag of button), do this with pymel like this:
iconTextButton(nameOfTextButton, e=1, image=pathToNewImage)

with MEL you could call it similarly, probably like this:
iconTextButton -e -image pathToNewImage nameOfTextButton

When you are changing background, you follow similar idea:
iconTextButton -e -bgc [0,1,0]

-e or -edit flag is for editing existing UI elements

Name of Text button is what you assigned button as when creating it, if you didnt assign it. Do it :)[/QUOTE]

Worked!

Thanks!