|05 May 2003||#1|
Join Date: Mar 2002
changing mayas UI?
is it possible to change mayas UI? for example is it possible to build my own shelf instead of the standard left shelf with the useless move rotate and scale buttons?
|05 May 2003||#2|
Join Date: Jul 2002
Yes, you can configure pretty much every part of the Maya UI. Figuring out how takes some time though, and is much to complex to explain here in detail, but Ill give you some pointers. This explanation assumes that youre already fairly experienced with writing Mel interfaces (you really don't want to mess around with Maya's interface if youre not ;-)
If you can identify the name of the layout you want to change, modifying it is then only a question of either inserting elements into the layout, or deleting the layout alltogether and creating a new one. the setParent command is your friend here. It can be tricky though, as AW hardly ever assign specific names to their layout controls (a real pain in the ass)
As for your specific example, Maya's main layout is contained by a formLayout called mayaMainWindowForm (you really need to know how formLayouts work if you want to change the GUI).
If you query the children of mayaMainWindowForm (formLayout -q -childArray mayaMainWindowForm), you get a list of more formLayouts that are children of the main formLayout:
formLayout1 formLayout2 formLayout3 TimeSliderForm formLayout4 formLayout5 formLayout6 formLayout7
To find which one contains the toolBox, what I'll usually do is hide them one at a time, like this:
formLayout -e -visible 0 formLayout3;
If you run this command, youll notice that the toolBox disappears, which means that it is contained by formLayout3.
For the record, mayaMainWindowForm contains the following layouts:
formLayout1 - statusLine
formLayout2 - shelf
formLayout3 - toolBox, viewPanes, channelbox
formLayout4 - rangeSlider
formLayout5 - commandLine
formLayout6 - helpLine
formLayout7 (cant figure out what this one is)
Now you need to repeat the process with formLayout 3. Query its children, then hide one layout at a time, and keep going down until you find the actual toolBox layout. In this case Ill be nice, and tell you that toolBox is gridLayout2. To modify it, just edit it like you'd edit any other gridLayout.
Another way of finding a GUI element, is to locate the script that builds the actual gui. If the script assigns a name to any of the elements in the script, just setParent to that element and you get the path to it. Otherwise, edit the script so that the element gets a name (remember to save a backup of the original script), restart Maya and setParent.
|Thread Closed share thread|