Maya 2011 Highlight - QT user interface overview (plus GDC)

By Steven Roselle - 10 Mar, 2010 - Maya

Well it's GDC time again. This will mark my 10th consecutive GDC and in turn my 10 year anniversary with Autodesk/Alias. GDC is always a good time. It's fun to get to see all of the great people I've met over the years gathered together in one place. It's also one of the few conferences that starts at a perfectly reasonable 10am. They apparently know their audience :) I just hope I can get all of my prep work finished and out of the way today so I can actually enjoy some of the nightly "socializing" that goes on. It's no fun to be stuck in a hotel room prepping demos when everyone else is out painting the town various colors.

This year will be extra exciting for us because we are announcing a ton of new stuff this week. As I'm sure you've seen by now Maya 2011 was announced yesterday. It's a huge release with tons of new features. I've been given the green light from Cory to start posting some demo movies of the new features. So I'll be spending the next few weeks here on the blog covering various topics related to "what's new in Maya2011".

For starters, this week I'm going to cover the basics of the new QT user interface. I'll also discuss how QT Designer can be used to create UI for your own custom tools. One thing I fail to point out in the demo movie is that all of your old MEL based UI should still be fine. You can still use the traditional MEL UI commands to create windows, buttons, sliders, etc... just as you always did. But now you have to option of creating your UI directly with QT as well. 

BTW - let me also say that I am by no means a QT expert (still learning) so no low level QT specific questions please :)

BTW2 - you may notice at the end of the demo I show a QT-ified version of LayoutTools.  This is something I'm still working on but hope to finish up soon.  I'll posted the 2011 version of LayoutTools in a few weeks.


Note:  Accidental F$%# tab has now been replace by the new Frack/Darn/Dang/Shoot/Shucks tab :)

Posted By
Published In
  • Maya
To post a comment please login or register
zwleopard | 6 years ago
so can i use custom widget? e.g. a transparent form
HorganovskiG9 | 7 years ago
After some looking around I learned that Qt does not currently support Float sliders, so I used MEL to divide the slider output value by 100 and then fed that back into a text field beside the slider. So now the user changes the slider in whole numbers from 0 to 100 but the output reads 0 - 1. It works fine, but a little tedious to set up, hopefully in the future Qt integration will be more complete and this will be simpler to do.
HorganovskiG9 | 7 years ago
I'm taking my first steps with Qt Designer and Maya here and so far it looks great. One thing I can't figure out though - If I create a slider and hook it up to an attribute, say the radius of a sphere object, the slider only works in integers. No matter what flag I try to add in Qt Designer (-step, -stepSize etc) I always get the slider working in whole numbers. Anyone have any ideas on how to make it work as a Float value? Cheers, Brian
My Oh Maya | 7 years ago
Hi guys/gals - I'm afraid I don't have the bandwidth to follow up on all of the various QT UI questions that have come up... and honestly it's not really my area of expertise anyway. This post was really meant as a very general introduction. It appears that others have chimed in with a few answers, so thanks for that. Otherwise I recently ran across a couple of tutorials that some of you may find helpful...
Edited by My Oh Maya 7 years ago
Jacques D | 7 years ago
So what can be done to query a tab?? Or isn't just working anymore?
Sreekanth Nair | 7 years ago
how can i get to the name of folder in a optionMenu using QT proc foldr() { string $proj = "<ur path>"; string $folders[] = `getFileList $proj`; } and what command should i give to activate this proceedure
cybran | 7 years ago
is it possible to somehow build a dockable qt widget using a .py file (called from mel using the python() function) to init the UI and set up event callbacks etc. as opposed to bringing in a .ui file just thinking i need more control over the widgets and also so i can use good OO design or can anyone suggest an alternative method? many thanks :P
Leksey | 7 years ago
It looks like it can't be do means QT(((
Leksey | 7 years ago
Guys, how i'm can do to a on single button you can hang two commands, LMB - one command, RMB - the second command and Marking Menu?
Cybertiger | 7 years ago
Thanks for your fast reply "rokit", I have tried what you suggesting but now it is printing out "#1" as a string... but what i want is to print out the value of the slider. This thing is really getting me... any help appreciated. Thanks
rokit | 7 years ago
- is for mel and + is for python. It's probably not working because you don't have the string surrounded in quotes. Try: +dc "print('#1')"
Cybertiger | 7 years ago
I am trying to make a horizontal Slider which executes a command. For starters i just want it to print out the state of the slider. It works if i have a dynamic attribute like this: -dc "print (#1)" But if i do this it says "Invalid Syntax": +dc "print (#1)" What is the difference between the "+" and "-" ? The "+dc" let's me find my python modules but the "-dc" doesn't. Does anyone have a explanation for that? Thanks
rokit | 7 years ago
Figured out the python thing too. Make a script called with the following: import maya.cmds as mc def run(): mc.ToggleGrid() make sure the line "mc.ToggleGrid()" is indented. Save it to your Documents/maya/yourMayaVersion/scripts folder. In QT Creator, add a dynamic attribute to your button called "+command" without the quotes. In the field type "" including the quotes. Save that and open Maya. Make a quick script for opening your UI and importing the GridToggle module like this (make sure you're in the Python tab): import maya.cmds as mc # doesn't have to be part of the script if you've already executed it during your session dialog1 = mc.loadUI(f='/users/yourUserName/Documents/...etc wherever you have the ui saved') mc.showWindow(dialog1) import GridToggle reload(GridToggle) #this is so you can close the ui and make changes to if needed. You might also #have to delete the compiled python file which is GridToggle.pyc. Run the script, hit the button, and you should be able to turn the grid on and off. Hopefully this will at least get you started.
rokit | 7 years ago
Found the answer to my second question. First, you have to turn your script into a procedure. So you surround your code with: global proc yourReturnValue yourProcedureName() { ..........script code........ return statement if needed } here's my example: global proc string UVSpacer() { script code...... return "done"; } Now save your script with the same name as your procedure in a location where Maya automatically looks for scripts. Ex for Windows: Documents/maya/yourMayaVersion/scripts. Load up Maya and now when you click the button made in QT Designer it should work.
rokit | 7 years ago
I've got another question. I have a script called "UV Spacer" which is on my custom shelf. In QT Designer I add the dynamic property "-command" and type "UV Spacer" in the field, but when I click the button in maya it says: // Error: Cannot find procedure "UV". // How do you name scripts so that Maya can find them as you show in the tutorial? Thanks.
rokit | 7 years ago
I'm curious what is the python command in QT Designer for doing the exact same thing? Where can I get a list of all the commands? I looked in the docs but couldn't find anything.
My Oh Maya | 7 years ago
css_maya - thanks for sharing the tutorial!
css_maya | 7 years ago
Hello every body. STLR : It's possible to use dial and spin box controls in Maya with a little tweak. I searched the web and found no good tutorial for QT designer so, I sat down and wrote one ! take a look everybody, i think you find it useful by the way thanks for code for docking UI.
css_maya | 7 years ago
again me, will be more support for other QT widgets in future? for example double and single spin boxes (I really don't know how to use API for that matter :( )
css_maya | 7 years ago
Hi at the end of the video you show one of your scripts. in that you have a frameLayout, i couldn't find it in QT designer so i assume that you developed the interface by MEL? then there is no deference between MEL interface or QT .UI, both of them can be docked? and can we parent a .ui interface under a frameLayout in MEL?
My Oh Maya | 7 years ago
tylerart - you would get values from UI elements in the same way that you did before that part hasn't really changed. However keep in mind that not all QT UI elements are supported in Maya. So something like a radial dial or a spin box wouldn't work without creating an interface for it via the api. gametech1 - no there is no way to go back to the light UI... I was like you originally in that I didn't like the dark UI. After working with it for a few months I'm coming around though. They swear that research has shown that dark is better for your eyes. With my tired old eyes I'll do what i can at this point to preserve them :)
gametech1 | 7 years ago
Can I make a bright UI theme somehow ? I prefer bright over dark.
tylerart | 7 years ago
I really like the interface creator, that's pretty cool, however I'm a little confused how I can query values in the ui. For instance. If I wanted to query the value in a float field, I would use: floatField -q -v $myFloatField; How do I do this if I'm using a spin box?
tylerart | 7 years ago
Where can I get that editor? Do I have to download and install QT, or is there a way just to download the editor?
Edited by tylerart 7 years ago
SCandell | 7 years ago
@STLR thanks a lot I made a simple ui using Qt and Mel its called Reverse Foot Control Creator and I uploaded it to the Area. Qt is awesome and simple. after about a day of basically trial and error I achieved something that looks great (it would take me 20 min to recreate the whole thing now). Do hope to see some more detailed documentation, and cant wait for layout tools and bonus tools. again Qt is just awesome, looks great, simple, robust and stable.
My Oh Maya | 7 years ago
eon1000 - Check out the "Working with QT" docs that are in the API section of the Maya docs. They are kind of hidden unfortunately. You can open the files directly in a browser. It covers things like the "loadUI" command as well as how to use QT with plugins. C:/Program Files/Autodesk/Maya2011/docs/Maya2011/en_US/API/Working_With_Qt.html For example... "Maya ships with only that subset of the Qt libraries which it uses itself. Plug-in developers wanting to work with Qt will have to install Qt separately to gain access to the Qt header files and those libraries not included with Maya."
SCandell | 7 years ago
Looks amazing, but I cant find any specific documentation on qt-maya ui. Maya's documentation doesn't have anything for Qt and Qt's documentation has nothing on Maya. I understand I need to run a command from Qt ui and have the command declared in Maya, and that works fine. But is there a way to transfer attributes from Maya to the ui elements?
My Oh Maya | 7 years ago
PyQT gereral info... Pyqt is a python wrapper around QT. You could use it instead of C++ for creating UI elements. Qt (with c++) or PyQt let you build new widgets. You could then expose those widgets in QT Designer so that you can then assemble them graphically. Licensing general info... For more info about QT licensing check out this page... While the QT - LGPL version does not require a license fee it still has terms and conditions. We suggest you review any licensing concerns with a legal counsel, and contact Nokia for more info.
Edited by My Oh Maya 7 years ago
My Oh Maya | 7 years ago
Smann - that's odd about the "off" vs 0. Either one should work. As for the Pane you should be able to use the standard deleteUI command to delete it I believe.
Smann | 7 years ago
I noted that you have the -floating flag as "off" , which didn't work for me, but if i replaced it with 0 it worked. is there a way to delete the "panel" once its created using dockControl? thanks for the video, its fantastic!
My Oh Maya | 7 years ago
Sorry for the delayed response to some of your questions... siy01 - no you won't use QT for marking menus. They will have the same behavior and authoring mechanism for now. shawner - yes you can use PyQt although my knowledge is limited there, but I know people are using it. Also you can use QT designer, xml, as well as the lower level QT api to create and define UI. dougBrooks - I'm looking into this one. I don't know much about QT licensing, but I will try to find out.
siy01 | 7 years ago
Will it be possible in QT designer to create more flexible marking menu's, or has Maya's custom marking menu dialog seen some improvements. Have always wanted the option to flatten sub menu's that circle the cursor.
shawner | 7 years ago
When you talk about making UI's with QT is this the c++ implementation? Is there access to QT inside of maya using PyQt? Cheers, Shawn
dougBrooks | 7 years ago
How do the various open source licenses of qt and pyqt affect users of Maya. Will we need a commercial license of pyqt to make ui?
My Oh Maya | 7 years ago
So who knew that an accidental F$%K tab would get so much attention? Besides doesn't everyone have a F$%K tab on their shelf? To avoid further offending anyone I have updated the movie to now show the dynamically variable Frack/Darn/Dang/Shoot/Shucks tab. Note: this is not a QT specific UI element. BTW - I think I will now have to hide other secret tabs in my future demos ;)
Edited by My Oh Maya 7 years ago
Naqoyqatsi | 7 years ago
very good, i hope maya 2012 supported cuda for dynamics and other stuff.
Bart Simpson | 7 years ago
great stuff. love the implemtation of QT. This is going to be a major plus to user experience while working in maya. :)
phoppes | 7 years ago
Outstanding... been waiting for this for some time. This is very, very cool. Worth the wait. PS - Love the F$%K tab. Half my work would be in that tab!
My Oh Maya | 7 years ago
Hahaha... Oops... I promise that was an accident. That was my frustration shelf where I put test scripts that I'm having "issues" with :) If you guys keep talking about it they're going to make me take it down.
kosirm | 7 years ago
It's all I ever wanted in terms of flexible UI in maya, and more... Using qt for creating UI elements - that's over my expectations! Thanks, autodesk! Hopefully it will be stable as before and nobody will regret this move... Thanks again!
otuama | 7 years ago
Love the new F*ck tab. Hmmm, wonder what's in that one :-)
My Oh Maya | 7 years ago
Yep... will cover Viewport 2.0 and show some great examples of it in action. Stay tuned... Arben - we did do a lot in this release but will always be more to do. But if you want node based particles asap there is always ICE :)
claydough | 7 years ago
:-) great work! Thanks Steve. Can't wait till u go on tour again so we can pick yer brains. This release is getting the best buzz I have seen from any release! Congratulations. Are u planning on covering viewport 2.0 ( shaders? improved lighting include improved shadows? DirectX? )
Arben Meta | 7 years ago
wow great interface, but why dont you just update maya paint effects to be more like vue xstream so we dont have to use vue and one more thing why not make particles node based in release 2011
My Oh Maya | 7 years ago
Ha... yes it can be a dark bg if you're so inclined :) I happen to like the traditional white bg for text but I'm kind of old fashioned that way. I will probably post a "what's new for scripting" movie next week. So stay tuned because there is more ;)
Edited by My Oh Maya 7 years ago
claydough | 7 years ago
hmmm.. colored syntax in the script editor! Can't wait fer the script editor features video mentioned. hopefully the SE background color can be darker like the rest of th UI? My eyes would thank u guys very much.
3dtrialpractice | 7 years ago
BRAVO!! this is sweet! wow.. willthere be a guide that covers the Qt designer.. and the dynamic property commands? (or are the dy prp comands just literally mel comands always?) when will 2011 be released to maya subscription memebers?
sacslacker | 7 years ago
You guys have been doing a great job at Autodesk. Keep up the great work. I'm hoping us subscription people will see this stuff soon. I know there are fixes in 2011 that I could use right away. Sooner the better here.
My Oh Maya | 7 years ago
Yep... here's a pic of the AE and CB visible at the same time.
marcoVN | 7 years ago
is it now possible to have the attribute editor and the channel box open at the same time side by side?
Francois Maree | 7 years ago
Yeah, I'm looking really forward to Maya 2011. Finally a dark UI for those of us spending lots of time in Maya, and a very sweet customizability. Thank you Autodesk!
kevinseven | 7 years ago
What's that new shelf tab I see in your VID labeled "F*#K"? Something really cool in 2011 I guess ;-)
P44v9n | 7 years ago
awesome :) FINALLY a nice sexy interface for maya :D with dockable panels <3 and nice gradient background :)
oglu | 7 years ago
looks really great... thanks...