KK Controllers 1.7.0 script by karim kashefy: http://www.creativecrash.com/maya/downloads/scripts-plugins/character/c/kk_controllers–2
KK Controllers 1.7.0is a MEL script for creating various 3D rig control icons.
Type: Maya Editor Script
Script Files: 1
Number of lines: 1773
The script has some nice functionality in creating 28 different kinds of control icons as well as 1D and 2D sliders. The UI allows for selecting different colors as well as locking various transform, rotate, scale and visibility controls on the controls created. There are also options for mirroring and combining the controls.
The code has a lot of magic strings and builtin curves, but overall does a pretty good job of separating out the logic into separate small functions. There are a few quite large functions that have a number of long if/else checks that make the code a little more complex than it should be. In a few cases some of the functionality is repeated with one variable change (which should be separate out into a function that takes that variable).
The formatting and spacing is inconsistent and in a few places even some of the functions are intended which makes the code hard to read. The bracket nesting is not consistent and a few places make the code difficult to read. The naming of functions and variables could be a little more descriptive, since a function name b1-b28 does not really clearly state what is happening in those functions.
The code comes with a readme and a history example, but has very little comments in the code itself. Since there are such non-descriptive function and variable names, the code really needs some extra comments to help separate out what functionality is supposed to be doing.
The code has a few functions that could be reusable, but the code in a lot of places is not obvious what it is supposed to do based on the function names. The code style would also help improve how much debugging would be required in maintaining this script.
The functionality is actually quite nice, and the controls that are created are well done. The code itself works, but there might be a bit more room for improvement in making it more flexible for extensions and bug fixes.
Until next time,