Isaac Lovy

Technical & VFX Artist



Selection Buddy

Python, Tools

 

 

A short summer project to get into using python to create editor scripts for Maya. “Selection Buddy” allows a user to save a selection of objects for easy reselection later– via a JSON library that allows selection libraries to be shared across maya file & project.

The imagined use case for this is to allow animators to quickly select all of a rigged character’s fingers, hair, or clothes controls quickly. In that case a rig could be passed around with the selection library to allow it to be easily used between animators as well.

 

As opposed to the default Maya selection sets, Selection Buddy’s JSON library format allows for the selections saved for a rig to be transferred differently than the scene file. This library format allows different artists with different wants and needs to keep their own versions. All in a human readable format. A library might look something like this DemoLib.json

{
    "tips": ["finger_1_tip", "finger_3_tip", "finger_2_tip"],
    "bases": ["finger_2_base", "finger_1_base", "finger_3_base"],
    "finger 1": ["finger_1_base"],
    "finger 2": ["finger_2_base"],
    "finger 3": ["finger_3_base"]
}

The second advantage this has over selection sets is it lets me add some logic at the time of selection. Such as selecting only what the camera can see, or selecting all of the child & grandchild objects below the selected objects in the scene.

I structured Selection Buddy across 2 classes. One main “Selection Buddy” class to contain the window and the UI, and a “Selection Options” class to contain repeatable UI for each selection saved.