uiMaster for Maya

Well, Maya 2017 has been released, and some of the most obvious changes in the new version are to its UI. There were rumors last year that Autodesk had offered assistance in the flagging development and support of PySide, apparently considering it an importance piece of their modern 3D pipeline. Maya 2017 seems to confirm, at the very least, that philosophy; it features the updated python bindings to match the most recent major version of Qt: PySide2. It's good news, because aside from the headache of translating old code from PySide to PySide2 (more on this later), it means continuity and improvements for a framework I'm already familiar with.

Then there are the changes to the Maya UI itself. It's a much slicker system that seems to merge the old "panel" concept with docking widgets. The result is a heavily customizable and space-efficient interface that allows for quick, organized and decisive switching between whatever myriad editors you may be using at the time (for me, usually Charcoal Editor + node editor + outliner + "standard" docks).

uiMaster allows any number of tabs in any number of panels at any size. It's down for whatever.

uiMaster allows any number of tabs in any number of panels at any size. It's down for whatever.

I should be happy about this. However, for the past several months, I had been working on a Maya UI mod called uiMaster. It creates an organized, panel-style interface of draggable tabs for any kind of UI - native or custom, ELF or Qt. It saves screen real estate, de-clutters busy scenes, and makes it easy to load custom UIs and save them with the scene. Though version 2017 makes some of the consolidation features redundant, I still prefer using it to the native UI - in large part because of how difficult Autodesk made it to do something as simple as resize panels.

PySide2 has its bugs. I can't open the QtDesigner that shipped with 2017 and frequently have UIs freeze on me to the point that I have to dig around the main application to find the Qt object and call .update() on it explicitly. So, if anybody wants to experience some of the UI improvements in 2017 without actually moving to 2017, give it a shot. It's stable in 2014-2016.5 - just put it in your plugins folder and execute MEL command "uiMaster". You can watch a short demo of its features below.

Donate to Support Tool Development

To cap that off, here's the link for uiMaster. Since it's a bit out of date, I'm releasing it freely - and if you like, you can name-your-own-price via donation. If there's enough interest, I'll update it for PySide2.

The Legacy Code Dilemma

Many artists and studios have undoubtedly choosen to forego - or at least postpone - the Maya update due to compatibility issues with their existing tools. That is often the ugly side of software upgrades, and this new version of Maya with its new Qt bindings is no exception. Unfortunately, it's not as simple as performing a replace all "PySide" with "PySide2". Many classes have changed modules; in particular, all widgets now have a module of their own called QtWidgets. Several months ago, Fredrik Averpil made a great post detailing some of the things to know about the change. In it, he references a repo with a "pyqt4topyqt5" script - which, alas, only takes care of PyQt and not PySide. I made a fork for Maya development here - it's PySide to PySide2, and easily usable from IDE (Maya) instead of a shell.

The other thing Fredrik mentioned was his little project which sought to maintain backwards compatibility with these new PySide2 UIs. It's called Qt.py. The basic idea is that you write/translate your code for a PySide2 environment, but import "Qt" in place of "PySide2" - the module takes care of remapping any changes, so your tools (written for PySide2) are still usable from a classic PySide environment. Pretty cool. There's a version on my fork which includes a few additions - notably, one which addresses the change to QApplication.translate, which comes up a lot in code generated from compiling QtDesigner UIs.

All said, these resources enable an easy and painless transition to PySide2. And, given that Qt6 is likely years away (and python bindings likely years behind that), we Maya/PySide users may as well get comfortable.