Categories
code of the day cotd

Code of the Day: AniMan

AniMan 1.4 script by manus: http://www.creativecrash.com/maya/downloads/scripts-plugins/animation/c/-animan

AniMan 1.4 is a toolset for creating procedural and rig skeletons through a UI interface. It has a number of options that are unique to the tool, such as adding wing, tentacle or tail rigs, options to create 2 or 4 arm rigs and a few more options. It is also interesting in that the majority of functionality is not a completely separate interface but is built into the ChannelBox.

Language: MEL
Type: Maya Editor Script
Script Files: 137
Number of lines: 23164

Functionality: 7.5
There are lots of functions and a number of unique features which is interesting to see. Unfortunately, with so many things in the tool, it does not give very much information about how to guide the user, and the error messages are not very clear about what mistakes where made (usually involving something like a “Error: No object matches name: ” which sometimes causes the progress bar to also freeze). The tool also has a pose library which also would benefit from some better debug messages to help guide the user in what mistakes they are making (or where in the code to look).

Design: 6.5
The code is broken up into a number of files, and while I do think this is a better design than a monolithic approach, it seems like a number of files only contain a single function, and in some cases the function body is a single line. While the focus on small functions is ideal, so is grouping logical functions together in the same file. For example, all standalone string manipulation functions, all LegIK, or BackFK, or ArmIK could be grouped together in the same file, especially since there is a number of areas of code duplication between the files.

Style: 7.5
The code style is pretty good, although I find the commenting structure a bit odd (where the comments are not nested with the same spacing as the rest of the code), but otherwise fine. The code does make use of mostly small functions and does a good job of commenting the code internal workings, and uses good descriptive names for variables and functions.

Documentation: 6.5
The code documentation is good, but with the website down, it makes it more difficult to understand how the functionality is supposed to be used. Overall, the code gives some good info into the structure, but would also benefit from giving some more explicit error messages to the user to help guide what went wrong.

Reusability: 7
The script would likely be easy to maintain once you had a better handle on what every file does. The code base isn’t huge, and for the most part has a number of areas that could easily be reused. Global variables are kept to a minimum and there is a good separation of logic between the UI and rest of the functionality. As I mentioned there is a bit of code duplication which may result in the same bug fix in a number of places, but otherwise is fine.

Overall: 7
The tool offers a number of intersting functions and has some powerful features. This is a toolset that does require a bit of a learning curve to figure out how it is supposed to be used, but the results are interesting and does offer some unique attributes not seen in other pieces. With a little more guideance to minimize user’s ability to make an error (or guiding them through their mistakes) it would be quite a useful tool, although I realize the ChannelBox approach might not be everyone’s favorite.

Until next time,
Michael Hubbard
https://michaelhubbard.ca

Leave a Reply

Your email address will not be published.