Python "it" Scripting
Save All

return to main index

View Code:


This tutorial presents an example of a python script - called The script should be executed after several images have been rendered into "it". All the images, except those named "_preview", will be saved as a numbered sequence of good quality jpegs in the current Maya project. The images are saved in a date and time stamped directory, for example,

If the reader has followed the recommendations of the tutorial "RfM: Customizing" the python script presented in this tutorial will have been installed in the users maya/projects/RfM_it directory. If this is the case then no further action is required and the instructions on "Installing & Loading the Script can be ignored.

Using the Custom "Save All" Command

The next section explains how to install and load the python script. However, once that has been done the reader will have an extra "Save All..." menu item under the "Commands" menu - figure 1.

Figure 1

The menu item will raise the dialog box shown next.

Figure 2

After clicking the "Save All" button there will be a pause before an information dialoag opens - figure 3. If there are many images in the catalog it will take several seconds before the dialog appears. It will confirm where the images have been saved.

Figure 3

Installing & Loading the Script

Save the python script in your custom "it" scripts directory. For example, the "RfM: Customizing" tutorial recommends using this directory,
The users custom "it.ini" script must install the python script when Maya loads the RenderMan_for_Maya plugin. The "RfM: Customizing" tutorial recommends using the following path,

The "it.ini" script should contain a command of the following form (Windows).

    LoadExtension python "C:/Users/YOUR_NAME/Documents/maya/projects/RfM_it/"

If the user has set an environment variable called MAYA_USER_DIR that "points" to the location of their maya directory the following command can be used.

    LoadExtension python "[GetEnv MAYA_USER_DIR]/projects/RfM_it/"

© 2002- Malcolm Kesson. All rights reserved.