code of the day cotd

Code of the Day: Advanced Loft

Advanced Loft 1.0 script by fileadmin:
Advanced Loft 1.0 is a lofting tool for creating and attaching lofts between two NURBS curves.

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

Functionality: 6
The function creates a loft between 3 NURBS surface curves and creates a slider for each of the lofts created for additional adjustment. This is really the barebones of the functionality, and it would be nice to have a few more options if using the tool.

Design: 4
The design is straightforward and while the functionality of creating the loft is somewhat separate, it would still benefit the overall structure to have it completely remove from the interface creation code. There are a few places where it seems that basic API functionality is not used (like looping through the selection list and incrementing a counter to get the size of the list, rather than using the MEL command “size”).

Style: 5.5
The code style does not seem to use much indentation and in a few places makes it difficult to read. The code naming conventions are decent and it does make use of comments in a number of places.

Documentation: 6
The code documentation is sparse, but useful where it exists. Some additional information about how the tool is supposed to be used would be helpful, as would a little bit more code documentation of how it is supposed to be used.

Reusability: 6
The script size is very small, which makes it easy to extend and grow if necessary. Some additional cleanup may be worthwhile if heavy maintenance is required, but overall the code is so small it could be entirely refactored if so desired.

Overall: 5
The code focuses on doing one thing, and the end results are alright, but only fills a very specific niche for this functionality. A few extra options would benefit it somewhat, but otherwise it give interesting results.

Until next time,
Michael Hubbard

Leave a Reply

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