Pose 2 Shelf 1.1 script by boymaya: http://www.creativecrash.com/maya/downloads/scripts-plugins/c/pose-2-shelf
Pose 2 Shelf 1.1 is a script that allows the artist to save either selection information or set attribute information as a button on the shelf.
Type: Maya Editor Script
Script Files: 1
Number of lines: 204
There are really only two major functions in the UI (with the option of adding a label), but the script is quite powerful in that it gives a nice and quick to use result.
The code has a bit of duplication in the creation of the shelf buttons and moving some of the additional checking code could be even more concise and reusable if the duplicate code in creating the shelfbutton was moved to a separate function. Otherwise the code does a good job in keeping the logic into appropriate functions and encapsulates the functionality well in each of these.
The code style is pretty structured and the use of whitespace and comments is quite consistent. There are a few places where a bit more or less empty lines may help improve the spacing of the code, but otherwise it is quite well done. A few additional comments in the code would be nice, but otherwise is quite good.
The code documentation is ok is simple and effective. Some additional comments in the code would be nice, and while the use of ALL CAPS in the documentation is a little unusual, it is eye catching for those that only glance casually at the content.
The script is tiny and powerful, with a little additional refactoring, it is likely this script could be even smaller and more powerful. Maintenance on this code would be very easy, as it is quite logical and is great in it separation of interface and the rest of the code logic.
The code is pretty powerful and offers a nice option for those looking for something lighter and simpler than the complex selection and pose libraries from other solutions. If you need to create a lot of selections or poses it may not be the best approach as the shelf will grow very quickly, but for quick and rapid use, it is very nicely done.
Until next time,