PDA

View Full Version : Is it possible to place a button on an image?


Gabester
11-08-2005, 07:25 AM
What I'd like to do is create a form layout, and place an image on it, then directly on top of that image, make an invisible button that when pressed, will change the image underneath.

Now because the button is invisible it'll look like your pressing the image. I have been able to get the button on top of the image but anywhere that the bounding box of the image underneath exists, the button cannot be pressed. I think Maya gets confused with which is on top or something.

Is there a way around this? I haven't found an image command with an on mouseclick script. Can anyone help?

Bonedaddy
11-08-2005, 07:58 AM
I think you may be better off making a mini-webpage you call from within Maya and having everything run off of mel:// commands. This is assuming you are running 6.0 or above (I think 6.0 is where they debuted web browsing).

NolanSW
11-08-2005, 08:00 AM
Take a look at the iconTextButton command. You can use an image for the button and size the botton to match the size of the image. Query the image to swap them out. That help ya?
Sean

Webpage could also work too? But you run the hassle if a server is down.

Gabester
11-09-2005, 12:01 AM
Hey Nolan


Yeah almost. It just doesn't display the image no matter what I do. I've tried resizing the whole button but that doesn't help either. I'm trying to display a .jpg image which works with an `image` command, but it doesn't work with the iconTextButton command.

stallion151
11-09-2005, 01:31 AM
http://www.ewertb.com/maya/mel/mel.php?howto=64

NolanSW
11-09-2005, 05:47 AM
The symbolButton will work however you can't have a control on top of that and be able to click both. At least my test did not work doing that. But if all you want is a button that just swaps an image then symbolButton should work. It works for .bmp and .xpm format. Just make the button the same size as your image.

CGTalk Moderation
11-09-2005, 05:47 AM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.