animSelector Update (v1.3.4)

animSelector v1.3.4

I finally had some time to update the “animSelector” script with the suggestions I got in the last few months and with some ideas I had while working on other tools.
AnimSelector is a maya script that lets you create selection sets for your rigs that can be then selected from a picker window. It is extremely useful both when your rig came with no GUI and when you need to extend the controls on an existing one.
To use the script, copy “animSelector.py” to your maya script folder (on windows “c:\Users\YOUR_USER_NAME\Documents\maya\scripts\”) and the icons to your icon folder (on windows “Documents\maya\YOUR_MAYA_VERSION\prefs\icons\”).
Then open Maya and type in the script editor (in a python tab)

import animSelector animSelector.install()

It will create a shelf tab and two buttons, one for the setup and one for the picker.
You can download the script from creativeCrash

SETUP WINDOW

Setup Window

This is the main window and lets you setup the selection sets on your character.

A) Char Name: Input the name of your character here.

B) Ctrl Name: Input here the name of selection sets.

C) Replace: This button lets you assign the selected object(s) to a new or existing control group. If any of the selected objects are present in other control groups they will be removed and reassigned only to the named control group (in field B).

D) Add: This button allows you to add selected objects to a new or existing control group. Selected objects can be assigned multiple control groups (eg. an FKwristLeft control can exist in the ‘HandLft’, ‘FKarmChainLft’, and ‘All’).

E) Remove: This button lets you completely clear the selected object(s) from all the custom attributes (i.e.: they will not be in any selection sets).

F) Select Objs Without Attribute: This button lets you all the objects that miss at least one selection sets attribute. It comes in handy when you want to check if all of your controls have been set.

G) Picker: This button lets you open the picker window.

H) Get Name: (NEW) This button let fill the “Char Name” field with the currently active picker tab in case you want to add a new selection sets and you want to avoid typos.

Namespace Chooser

I) File/Import: (NEW) The setup of the character can be exported to an external file (from the picker window) and then re-imported in another shot. The normal import lets you import the data back and re assing it to the same character. In case the namespaces are different between the shots, a window will popup letting you chose the correct one.

L) File/Import and remap: (NEW) This option lets you assign the setup to another character in the scene. The controls have to be the same, so it should be

A second reference of the same file (like when you do duplicate reference from the reference editor

A similar setup to the original file (like crowds or extras)

M) File/Help: (NEW) Opens the “help” window.

N) Edit/Preferences: (NEW) Opens the “preferences” window.

O) Update: (NEW) Attribute names’ have changed in v1.3.4. You can update the old setups to work with the new version with this function

PICKER WINDOW

Picker Window

This is the picker window. From here you can select your controls back.(NEW) Buttons on the picker are draggable, letting you reorganize the window as you prefer (for example you can put the most used buttons on top).
You can drag and drop with the middle mouse button and the behavior is as follow:
if you have buttons A, B, and C and you drop button C on the lower half of button B, it will go below button B, otherwise it will go over button B

If you want to open this window without opening the setup one, you can use this python code:

import animSelector
animSelector.PickerUI()

A) Tabs: Every character will be split in his own tab.

B) Buttons: From here you can select your controls back.(NEW) The selection behavior is the same as in the viewport:

Click to select.

SHIFT + click to toggle the selection.

CTRL + click to deselect.

C) Remove Set From Scene: This will remove the selection sets from all the objects in the scene

D) Remove Set From Selection: This will remove the selection sets from the selected objects.

E) Rename button: (NEW)This will let you rename the button (and so the selection set) from the picker.

F) Change Button Color: (NEW) Is now possible to change the color of the buttons to create some “color groups” for easier access.
The name of the colors and their values can be changed in the preference window.

G) Assign #### Hotkey: From here you can assign an hotkey to the selection of the selection sets.
Hotkeys go from 0 to 9 and can use the CTRL or ALT modifier.(NEW) The selection behavior (replace, toggle or add) can be set in the preference window.

H) Hotkeys To Shelf: Hotkeys for each tab (i.e. each character) can be saved to the shelf being able to switch between them with just one click.

I) Export: (NEW) The recommended workflow is to setup the file that will be referenced, so the selection sets will be in every scene.
However, if you are not able to, you can export the setup to an external file and import it in another scene.

Just got animSelector today and loving it so far.🙂 So glad that you’ve made it into a dockable window. Makes life so much easier just having it set to one side. If I may make a request it would be that it was a toggle-able dock. Like the default maya channel-box and tool-settings, etc.

It would make it so much more easier to have it hotkeyed and toggle on-off in it’s docked position. I’m not good with code yet so hardly could figure out if I could add it.

Read through the code and might I say “It is beautiful” man. It’s been so long since I saw such a clean and organized script. Love it brother.🙂

Keep up the great work chum. Really appreciate all the work you’ve put just into keeping the code so clean and straight forward. Everyone should really open the script editor and just take a look at it.

I’m working on a design for a small HUD script for animators, Most of what I’ve found online are alright but isn’t really easy to use or configurable. Maybe I’ll pass it on when I’m done. Think you’d do an amazing job at it.🙂

Wow man! So glad that you like animSelector and thank you very much for your kind words.
This was mainly a learning exercise and I have put a lot of effort trying to make the code clean and readable, I feel that there still is quite a lot to fix though😀

If you want to assign the picker to a hotkey, you can open the hotkey editor, go to the ‘user’ category and make a new python command with this code:

then you can assign it to whatever you want (like ctrl + alt + a).
Tell me if it is working for you, meanwhile I’ll think about how to implement it from the tool itself.
Good luck with you HUD and if you need help just drop me a line😉.

Luca

EDIT: wordpress loses the indents! Please change every ‘*’ in the code to a space.

Hey Luca. Thanks so much for the quick reply on this. I’m sure it’ll help many more users in their workflow. Especially guys like me who have limited screen space. So toggle-able panels are just a god-send.🙂 Thanks man. Works perfect.

I’m still a beginner animator so learning on the way. And time to time, I look for tools which would really push my workflow. I know there are a lot more tools like abx picker and many more. And those are awesome tools. But the simplicity and straight-to-work-ness (Not sure if that’s a word. Lol) is what i’m loving right now. Get a bunch of buttons for your character controls, toggle the dock when you need to select and go-to-work. Simple!🙂

I’ve attached a screen-shot of a little mod to the colors I just did. And controls created for a simple bouncing ball. Just to show that even the most basic character “a-ball” could be used with this tool.

And I’ve attached a little script I made for some key management stuff I find myself using most of the time. Couldn’t really get all the key colors to work though.

Just sharing an idea but if it helps you to make something better, I’d be glad to have helped. As animators being able to set multiple key colors for different poses was the idea. (Golden Poses, Extremes, Breakdowns, In-betweens, Etc)

Someone had done a script for this sometime ago, but the link was dead now. Maya only allows it’s default red, breakdown in green (think anyone hardly use the breakdown feature) and special key color. I was meaning to drop an idea at the autodesk ideas for maya section about this too. But just sharing, student to student. It’s nothing compared to what you’re doing amigo. Heh.

Thanks again for the code on the toggle feature. Works wonderfully.🙂

There’s a little bug I ran into while adding stuff to a character tab. I’ve actually parent constrained a small nurbs sphere to the mesh of a ball rig. (One in the screen shot). I use it to track the arcs with ArcTracker. Well I wanted to add it to the same character tab as the ball rig. But each time I try to add it to the picker, it created a new tab with the same name and adds the trackSphere to that. But if I had the nurbs sphere parent constrained in the original ball rig file, then it works. Problem is when the tracking sphere is referenced in, a few ArcTracker functions like “Lock Path” don’t work.

So just to confirm, do all the control objects have to be from the same character rig? referenced or otherwise? Say we wanted to add an object in the working scene to the same character tab, will it be possible?

Sorry for the super long reply man. But 1 at a time alright. Right now I’m enjoying customizing AnimSelect and well who doesn’t like new toys eh?🙂

Yep, unfortunately the tool rely on namespaces to create the various tabs.
It is needed when you import the same character more than once in the working scene (like if you want 2 rigged balls in your scene).
You could temporary rename the additional geo to include the namespace and remove it when needed, but it sounds quite laborious🙂

Gibran Kaleel4.30.13 / 2pm

Heh. That’s alright then. Just a tracking sphere. It’s as temporary as it gets. Shelf button will do the trick. Just was wondering why I couldn’t add it to the same tab as the rig control buttons.🙂 Thanks for clarifying chum.

Again sorry for the long post. Hope you liked the Key Manager script. (Not in anyway close to your level of work). Just made it out of need. Hope it inspires some ideas with you. And if you know of any secret way to add more colors to maya keys, I’m listening.😉

Hey Luca, So yeah… Spent most of my day going through the whole script. Really awesome stuff man. I’ll be damned if I don’t have a total headbanging by tomorrow morning. Lol Enjoyed it and learnt a lot just looking through the lines. It’s hard to get much time to script big stuff like this when I’m in animation mode. But just going through the script tells a lot.

I just played around with it (all for the sake of learning), I’m no competition to you my friend.😀

Did a little work on the Colors, UI, Labels, Preferences and a little clean-up. Hopefully you like it. And I tried out using iconTextButtons for the Picker instead of the regular buttons. Had a god awful time sorting the errors but finally have it working.

After all the time looking at the code, I totally forgot how to drag-to-reorder. Heh.

Almost ripped a few hairs off trying to figure out why the iconTextButtons would not drag and drop like the regular buttons. Then middle mouse button dragged and voila. Lol Have no idea if it was LMB by default but this works too.🙂

Anyways, again… apologies for messing around with your script chum. I really loved that it was so clean written I had to take a look. None of the changes I made are of any disrespect to your work man. Hopefully you like it.

Hi Luca i’m an animator and i want to say thank you for this tool it’s awesome! the only one thing that i can’t figure it out is how to change buttons position on the picker, i don’t know if that is possible, now the script lists them alphabetically, but i’m wondering if i could sort them like i want and how to do it

I just tried on Maya 2013 sp1 on macOsX and it is working.
Could you please tell me if you are getting any error?

Axel8.4.13 / 9pm

I’m really sorry to not have answer back before, i was really busy during this weeks i’ll try to do a test tomorrow and see what will happen, (actually i don’t remember any error message when i tried, just the buttons didn’t move\change position, but i will check it twice) and i’ll give you some feedbacks, anyway thank you to try to solve the problem i really appreciate it.

Glad that you find the script usefull!
Could you please tell me if you get a line number with the error?
If you could also tell me the steps you follow for the import/export would be very usefull.
Also getting the scene and the exported files would help!

Found a quick fix for anyone having issues re-ordering the selector buttons with the middle-mouse button. Make sure in the animSelector Preferences that Dockable picker is checked. Next dock the animSelector picker on the side and now you can re-order the buttons. (OSX 10.9.2).

Thanks for the scrip Luca! I’m a soon to graduate student at Full Sail and you’ve helped my productivity improve greatly with this script and You don’t know how helpful it is to have this available to someone with college funds (zero $$) haha. Thanks again and feel free to check out any of the work I’ve been working on with the help of your script! Thanks and stay happy my friend!

Hey Luca! Thanks for this amazing script🙂 It’s nearly perfect, but I’ve stumbled unto a small problem. I want to use the picker for a character with a lot of controls, so I’ve created three tabs: one for the body, one for the face, and one for the hands. These are all in the same reference file and look fine. However, when I open a new scene and reference the file with the picker, only the first tab (body) looks the same, but in the other two tabs the colors are gone and the order is all wrong. Do you have any idea what might be causing this problem? All the connections all still there, i.e. when I select something from the face-tab it still selects the right control. It’s just the UI that’s messed up.

Hi LineLijn!
Thanks for the kind words🙂
The problem you are facing is due to how namespaces are treated when building the UI and there is no workaround for that at the moment. I’ll try to address it in the future if I get the time to update the script again.
Cheers!

About

Hi! My name is Luca, I’m an italian currently living in Granada (Spain) and I’m a 3d artist specialized in lighting and compositing.
I’ll be posting all those nerdy stuff I do while working hoping that they can be useful to someone.