Pages

Wednesday, February 1, 2012

Code of the Day: Shot View

ShotView 2.3.0 script by cammm: http://www.creativecrash.com/maya/downloads/scripts-plugins/c/shotview

ShotView 2.3.0 is a tool that creates a separate window for working on cinematic camera movement, including a navigator camera (zoom/pan) , playblast options, locking the shot camera and more.

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

Functionality: 7.5
The functionality is quite interesting, especially the navigator window which mimics some of the functionality and design of Photoshop's navigator. There is a fair bit of functionality although the majority of it is related to setting up a separate modelEditor to keep track of the shot.

Design: 6.5
The code uses a number of external preferences files, which is great for reusability, although it uses eval to parse them, which makes me wonder in this particular case why the prefs were not MEL files that were invoked directly. The code makes use of a number of global variables, and in a few places does a lot of index referencing which in a few places makes the code difficult to follow (it is hard to remember what is at array index[9] for example).

Style: 5
The code formatting, spacing and indentation are not consistent and makes the code difficult to read in a few places. The formatting and structure actually improve towards the end of the file, but some of the earlier code would benefit from the standards of the later code. There are areas of code that are commented out, which is unfortunate to see without any additional information about why the code was removed.

Documentation: 6.5
The code documentation is sparse and in a few places some of the comments are just two letters, which doesn't really help except to serve as a marker. The installation file is helpful, and a few places of the code (especially the preferences window), has a lot of information in the interface to help guide the user to the correct actions and explain the code.

Reusability: 5.5
Some areas of the code have small encapsulated functions, which would be reusable. The use of globals and the uncommented array indexing makes a few parts of the code obscure and would likely benefit from a little more information or commenting. A few areas of the code have quite long functions and do not take any parameters, which makes them unlikely to have much reusability.

Overall: 6
The code has a number of nice features, particularly the navigator and playblast, but the majority of the code wraps a separate modelEditor panel with some additional options. Overall, I think a number of people would find it useful, and while there might be a few additional features that could make it a little more flexible, but as it stands, it does have its uses.

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

No comments:

Post a Comment