Share
 
 

Overview of MEL script painting

A MEL script is a file that contains MEL commands, MEL procedures, or both. Typically, you use a MEL script to create custom effects.

Using the Paint Scripts Tool, you can paint these effects on your surfaces the same way you paint weights.

A number of sample scripts are stored in the following directories:

  • (Windows) Drive:\Program Files\Autodesk\Maya<version>\scripts\others
  • (Linux) mayapath/scripts/others
  • (Mac OS X) /Applications/Autodesk/Maya<version>/Maya.app/Contents/scripts/others

Here are notes about a few particular scripts:

  • spherePaint – Use this script to paint spheres on a selected NURBS surface. It is included as an example just to help you write your own MEL scripts.
  • geometryPaint – Use this script to select predefined objects in your scene and then paint them on a selected surface. For example, if the object is a cone, you can paint cones on the surface using the geometryPaint script. The Paint Scripts Tool settings determine the size, position, angle, and density of the cones.

    See geometryPaint sample script settings.

  • emitterPaint – Use the emitterPaint script to paint emitters on surfaces. Emitters generate particles. The attributes of the emitter control the position, direction, quantity, and initial velocity of the emitted particles when they are born. After the particle is born, the attributes of the particle object that the emitter is connected to control the particle’s appearance. For more details about emitters, see Emit nParticles.

    See emitterPaint sample script settings.

These scripts have not been thoroughly tested, and therefore are not supported, but they should be helpful when you are writing your own MEL scripts. For details on creating your own scripts, see Write MEL Scripts for the Paint Scripts Tool.

Was this information helpful?