code of the day cotd

Code of the Day: Ya Selection Manager

Ya_SelectionManager 1.7.0 script by yashu:–2
Ya Selection Manager 1.7.0 is a tool that adds a menu to the ChannelBox that allows selections to be saved and loaded. The saved set can be named or deleted through the interface.

Language: MEL
Type: Maya Editor Script
Script Files: 1
Number of lines: 397

Functionality: 7
The functionality is quite nice, although it seems to only work with older versions of Maya (likely due to changes in name from Maya ChannelBox in the newer versions. The selection options are quick and easy to use, and give functionality that would likely be very useful to have built into Maya.

Design: 7
The code design is decent, although it does not work in newer versions it is often difficult to predict how changes will occur through versions, and does not appear to have any obvious version dependencies. The code uses magic strings as parameters variables to use in if else statements, which may be useful to look at another less error prone approach.

Style: 6
The code style is a little inconsistent, with a number of areas that would benefit from a bit better spacing and organization. Overall, the code would benefit from more internal comments and perhaps a little bit more consistency with spacing from the scope of the function.

Documentation: 7
The code documentation has a long header with quite a bit of information and comes with a readme file which helps describe how to setup the script and how it is supposed to be used. A little more internal documentation on what the functions are doing would be helpful, but otherwise the rest of it is quite well done.

Reusability: 6
The script is tiny, but already suffers from some compatibility issues with newer versions. The fixes would likely involve modifying the code that interacts with the ChannelBox, and this may require some additional logic in other places if the changes cascade down the line. The code shouldn’t be too hard to update or rework, but still the initial problems are a bit of a warning sign.

Overall: 6.5
The tool works well in older versions of Maya (2008), but has issues with newer versions (2012). Overall, the script gives a nice feature that is often wrapped into pose selection libraries, but does it in an easy and elegant way that works quickly and easily with many workflows. I would not be surprised to similar functionality eventually becoming built in, but in the meantime, this is a nice tool for speeding up using selections.

Until next time,
Michael Hubbard

Leave a Reply

Your email address will not be published. Required fields are marked *