Character Synoptic in Maya

Hi guys,

I just wanted to share a sort of a tutorial that I have written about how to create a ‘distributable’ synoptic in Maya with assistance of PyQt. I highlighted the ‘distributable’ word because the end user of the synoptic doesn’t have to have the hassle of dealing with PyQt to use the synoptic. PyQt is used to transcode the “.ui” file into regular maya.cmds lines (although it can also be converted that into mel or pymel).

Example of synoptic:

I hope it is useful for you.

Here is the link: http://www.seigisato.com/synoptic-in-maya

Cheers,
Seigi

That’s pretty cool, but what would be the advantage of using this over directly loading the .ui file using maya.cmds?

That is a good question :).

Although Maya UI is PyQt based, Maya doesn’t really expose all PyQt power. Maya doesn’t give us full access to native PyQt widgets. That said, Maya also have a few useful UI objects that we cannot find in the PyQt list of widgets straight away. As an example, Maya iconTextButton doesn’t have a perfect equivalent in PyQt. IconTextButton is actually a qLabel customized to have an image attached to it and behave like a button.

Because of this, I usually go either ‘Maya native UI’ or ‘PyQt framework’ all the way.

The tutorial I wrote gave me the ability to mix the good things of both worlds using a bit of scripting to make the ‘translation’ between them. I use Qt Designer to save me the hassle of creating UI in the text editor. And I convert it into Maya code to use the extra the useful UI controls that Maya has available. And I am still able to distribute the UI to people that don’t even know what PyQt is.

I hope it makes sense.

Cheers,
Seigi

Actually my question still stands, because when you convert the PyQt widget code to the equivalent maya widget(which also means you only get a subset available), you lose a lot of the pyqt flexibility.
Maya cmds can load a qt ui natively and you can hook up the qt ui quite easily too (+commands and -commands)

I suppose the advantage would be that you can use it sort of like pyuic and get the native maya cmds version for use, which is indeed very useful.

sooo…nevermind, cus I answered my own question…haha

Haha :slight_smile:

I am indeed constrained to use Maya widgets only.

In my case I’d rather use ‘.ui’ if it did the same job, but I sincerely don’t know how to make the same synoptic using only Maya code and a .ui file. :frowning:

I don’t want PyQt in the end code because I want to distribute the synoptic to anyone. I can use a text editor to create the same code. But the problem is that I’d have to place the controllers in code only, with no visual editor assistance, which would be a bit of a pain.

[QUOTE=seigisato;19169]Maya doesn’t give us full access to native PyQt widgets. [/QUOTE]

you can use all the pyqt widgets in maya. you can even make your own widgets and use them in maya. there are some great tutorials on how to do this floating around the internet.

[QUOTE=rgkovach123;19175]you can use all the pyqt widgets in maya. you can even make your own widgets and use them in maya. there are some great tutorials on how to do this floating around the internet.[/QUOTE]

I believe you misread, he meant use them natively without having PyQt installed.

[QUOTE=seigisato;19171]Haha :slight_smile:

I am indeed constrained to use Maya widgets only.

In my case I’d rather use ‘.ui’ if it did the same job, but I sincerely don’t know how to make the same synoptic using only Maya code and a .ui file. :frowning:

I don’t want PyQt in the end code because I want to distribute the synoptic to anyone. I can use a text editor to create the same code. But the problem is that I’d have to place the controllers in code only, with no visual editor assistance, which would be a bit of a pain.[/QUOTE]

Agreed, having a conversion tool is indeed very nice for certain uses.
Especially at work where an artist can design some really nice system and tool UIs based on their actual usage, and then can hand it off to me or someone else to convert to code and get functional.