Selection in Maya without using scriptJob

Hi! I am currently overhauling my scripts and tools. I was wondering if there is another way to do selections without ever using scriptJobs? An older version of my UI from way back used buttons, but I am going to do away with it now since it is very outdated, unless I use Qt and make the buttons “cute”.

There is something that I have in mind but I cannot implement it as it is since it is the property of my previous studio. What it simply does is having a separate UI with all the controllers laid out, now this seems pretty normal but the difference is that you can zoom in and out of the paper doll, just like how you would do it in a Maya viewport.

Thank you very much, Uncle Rico.

You’re talking about a character selection window for rigging, yes?

I’ve done something similar at my current company, but using Qt. I subclassed QGraphicsItem to make a “controller” item that can be selected and de-selected from within a QGraphicsView, in turn selecting the associated in-scene controller. What’s neat is that when you turn on rubber band selection, you can box-select all the controls and they select and deselect almost instantly. Zooming isn’t terrible to implement either.

I am curious to know how other people solve this problem. The standard Maya UI widgets really aren’t enough for all the features I’d want.

I think you definitely want to use Qt for this.

You can use the QGraphicsView, QGraphicsScene and QGraphicsItem to implement this.
You can essentially then place your QGhraphicsItems as the selection buttons. You can override their selection methods to change the viewport selection.

The QGraphicsView should enable you to add zooming fairly easily.

Once you get the basic classes out of the way, this should be trivial to reuse for multiple UIs. You can let your UI designers design their UIs in Qt Designer and then replace their buttons etc when you read in their .ui file.

It’s a decent amount of work on the front end, but once you get that out of the way, the flexibility it offers is great.