views:

407

answers:

1

I do know how to create a MEL UI window and add content to it. I don't know how to "pin" that UI to a Maya window such as the UV Texture Editor. Ideally I would like to have the ability to control which side of the UV Texture Editor my UI attaches to and have it move and minimize with the window. Is such a thing possible?

+1  A: 

With a MEL window you just need to know the name of the window and you can insert your own UI into it (using the -parent option when your creating new UI). This can be difficult unless you know how the window was constructed, though.

The best place to start is:

In the menu for the script editor window, you can enable an option to display all the MEL commands that are executed as Maya runs. Once this is enabled, open the target window (in this case the texture window) then go back to the script editor (turn off the echo commands option again or you'll get spammed!) and see what commands Maya ran. You will be able to find the name of the command that is responsible for creating/showing the texture window.

Then you can search in the Maya installation's mel scripts for that function, and see how the texture window is created. Your options are then to try to nicely add your UI to the existing window, or copy the entire Maya script and modify it to create a completely new texture window.

Jason Williams