code of the day cotd

Code of the Day: Rig-o-matic

More creative crash site today, I looked at the Rig-o-matic script by Jason Baskin:

This script is an autorigging solution for creating bipedal characters. This allows creation of FK, IK setup, automatic naming of joints and creation of controls.

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

Functionality: 6.5
The code offers a nice little UI of options for creating and mirror parts of a rig. The functionality works, but I managed to get stuck a few times on the example rig and could not get the legs and back to properly get the appropriate setup the first couple times. The script relies on very specific selections and hiearachy paths, but would benefit a little more from a wizard like setup of forcing the user to do the right thing.

Design: 5.5
The code uses a lot of variables and global variables, which makes a number of functions quite complex. Some of the functions are huge, there are only 29 functions in 4741, the longest being 1186 lines long. When functions get to this size they become very difficult to understand, and become more likely to be candidates of errors.

Style: 6
Inconsistent spacing and indentation makes some of the cod hard to read. The enormous length of some of the functions mean that even with consistent coding style it would be hard to read. The naming conventions and names of variables are appropriate, but when there are so many of them it is difficult to keep track of them all.

Documentation: 9.5
The script does has pretty good comments, and there are a lot of them, but what really stands out is the documentation and tutorial videos: The aspect that would help improve is the error messages when using the script.

Reusability: 4.5
There functions are simply too large and all inclusive to really be maintainable or reusable. There are a few smaller functions that might benefit from reuse, but for the most part it is pretty self contained.

Overall: 6
This functionality and documentation make this a nice little script in terms of usability, but it would be nice if it was a little more helpful when the user went astray. The documentation is helpful, but I still found I needed to do some trial and error to get everything to work. The source code is somewhat challenging, but from the comments the author does not want modifications to the script to occur. (The style may have been written it that way so only the author knows what is going on, or would dare attempt any updates or fixes).

Until next time,
Michael Hubbard

Leave a Reply

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