Using the saved script file
 
 
 

You can apply the makeRoll procedure to any geometry quickly by selecting the object to apply makeRoll to, and executing the makeRoll_create_UI global procedure. Before using a script in your scene, you must source it. Sourcing executes all the commands within a script file.

You can only access global procedures declared in the script file from the Script Editor. Any local procedures cannot be accessed from the Script Editor, and must be called from global procedure within the script file.

NoteGlobal procedures only have access to local procedures declared before them in a script file.

To source and use a script file

  1. Select File > Source Script
  2. In the Source Script dialogue box that opens, select
    makeRoll_create_UI.mel
  3. Create geometry to test the makeRoll procedure on by creating a new scene and typing the following:
    polyPyramid;
  4. Execute the makeRoll_create_UI global procedure to create the user interface by typing the following in the Script Editor:
    makeRoll_create_UI;

    The user interface you created opens.

  5. Set the frame to greater than one to view the effects of the makeRoll procedure.
  6. Set the following values in the makeRoll user interface:
  7. Click the “Execute” button to setup the makeRoll expressions.
  8. Move the pyramid in X and Z to view the results of the makeRoll procedure.

Explore different results that occur when you apply the makeRoll procedure with different user interface control values. Since you cannot undo the makeRoll procedure, you will have to create new geometry every time to apply the makeRoll procedure.

When you open a new Maya session, the makeRoll user interface procedure is no longer defined and must be sourced to use it.