![]() ![]() ![]() ![]() ![]() |
|||||||||||||
![]() ![]() |
|
||||||||||||
|
As most MEL scripters know, Maya's Script Editor window is a pretty bare, featureless environment for developing MEL scripts.
While this may be adequate for very short scripts, using a third party Editor provides a superior environment for developing MEL scripts. For example, Crimson Editor supports highlighting of MEL syntax, display of line numbers, Search and Replace, formatting and layout, and many other useful features.
A common workflow is to write and edit a script in an external Editor (such as Crimson Editor), and then copy-and-paste it into Maya's Script Editor. This provides an adequate workflow for beginners, but becomes tedious and impractical for larger scripts, or multiple procedures. The MEL Assistant provides some automation for integrating Maya with an external Editor. It provides buttons within Maya for creating a new script, opening an existing script, or executing the current script. All these features are 'linked' to the user's preferred external editor, so that you can test the script you're developing with the click of a single button.
For instructions on installing the MEL Assistant, and a tutorial on how to use it, refer to the readme.txt file which accompanies it.
This MEL script enables you to create Display Layer Bookmarks, which store the state of all the display layers in your scene.
Display Layer Bookmarks are similar to Camera Bookmarks, except that they store Display Layer information. You can create different Bookmarks for different tasks, e.g. Animation (when you only want to see layers containing joints and low-resolution geometry), or Rendering (when you need all layers containing renderable geometry to be visible). Once the script has been installed, you can simply click on a button on your shelf to open the Display Layer Bookmarks window:
For assistance in using Display Layer Bookmarks, click on the Help button in the bottom right corner of the window. For instructions on installing the script, see the readme.txt file which accompanies it.
Down here in New Zealand, we tend to work at the PAL framerate of 25 fps. But every time we open a scene file created in the USA, Maya changes the time units to NTSC - not just for that scene, but for every subsequent new scene! Before you know it, you're knee deep in peculiar playback ranges (such as a start frame of 0.83), and animating at 30 fps without realising it. This script enables you to overcome this problem. It provides you with the following window, in which you can specify your preferred time units and playback range.
Unlike the settings in Maya's Preferences Window (which are liable to change unpredictably, depending on which scenes you've opened recently), the settings in this window are guaranteed to remain the same until you change them yourself. And if you check the "Load on Startup" checkbox, these settings will be automatically loaded every time you start Maya. For instructions on installing the script, see the readme.txt file which accompanies it.
On some occassions, you may wish to animate the colour or position of the swatches on a Ramp texture node. In these situations, it can be very helpful to control the ramp's attributes via a Set Driven Key. (A classic example would be creating an eyeball shader, adding an attribute called 'dilate', and using it to drive the pupil diameter).
Unfortunately, Maya will not allow you to load these two attributes (Selected Color and Selected Position) into the Set Driven Key window. My rampSDK.mel script provides a user-friendly solution to this shortcoming. By executing the script, the following dialog box will be displayed.
Simply click on the Enable button to extend Maya's functionality. You will then be able to use Set Driven Key to set up powerful animation of your ramps, e.g.
Note that you are now able to control both the colour and/or position of the swatches on your ramp, using Set Driven Key. For instructions on installing the script, see the readme.txt file which accompanies it.
|
|||||||||||||