Script paint

 
 
 

You script paint by selecting a script and painting strokes on the surface with the Paint Scripts Tool.

To script paint

  1. Make sure that the script you want to paint with is in your script directory:

    (Windows) Drive:\Documents and Settings\username\My Documents\maya\2013\scripts

    (Linux) ~username/maya/2013/scripts

    (Mac OS X) /Users/username/Library/Preferences/Autodesk/maya/2013/scripts

    NoteDo one of the following to open the Preferences directory using Mac OS X Lion:
    • Select Finder > Go > Go to Folder and type the directory path (/Users/<username>/Library/Preferences).
    • From the Terminal window, navigate to the Preferences directory and type open.

    (Mac OS X) /Applications/Autodesk/maya2013/Maya.app/Contents/scripts/paintEffects

    (Windows and Linux) mayapath/scripts/paintEffects

    NoteThe sample scripts are in:
    • (Windows) Drive:\Program Files\Autodesk\Maya2013\scripts\others
    • (Linux) mayapath/scripts/others
    • (Mac OS X) /Applications/Autodesk/maya2013/Maya.app/Contents/scripts/others

    You do not need to move them to your personal scripts directory, however, any new scripts you create should be stored there.

  2. Select the surface you want to script paint on.
    Note

    If you are going to paint with the geometryPaint or spherePaint sample scripts, you must freeze the transform of the surface before proceeding. For information on freezing transforms, see the Basics guide.

  3. Select the Paint Scripts Tool (Modify > Paint Scripts Tool) and define tool settings, if required. For details on defining tool settings, see Set Paint Scripts Tool settings.
  4. Go to the Setup section.
  5. In the Tool Setup Cmd box, type the name of the MEL script (without the .mel extension), and then press Enter (Windows and Linux) or Return (Mac OS X). This box is case sensitive.

    For example, for the sample scripts type geometryPaint, spherePaint, or emitterPaint.

    A script window may open, depending on the script. Entries may also appear in the boxes in the Setup section. These are MEL procedures and come from the script. You do not need to modify them. For more information on these procedures, see Script Paint MEL procedures.

  6. Change any settings in the script window then drag the brush across the surface. For details on the settings in the sample script windows, see geometryPaint sample script settings and emitterPaint sample script settings.