Example stand-alone applications
 
 
 

Stand-alone applications are those that contain the main routine for the application and make API calls to access Maya in batch mode. They are compiled in a slightly different manner than plug-ins (as covered in Using a debugger to debug your plug-ins), but utilize the same API as plug-ins, and in the same way.

Note(Linux) It is important to note that in order to run one of these applications it is necessary to set the environment variables MAYA_LOCATION and LD_LIBRARY_PATH. The former should be set to “/usr/autodesk/maya” (or the alternative location into which Maya was installed), and the later should be set to “$MAYA_LOCATION/lib”.

If these variables are not set, you will get errors when you attempt to start a stand-alone application.

The following sample applications are provided to demonstrate how to create and use stand-alone applications.

helloWorld

the required hello world example.

surfaceCreate

the surfaceCreateCmd plug-in converted to a stand-alone application.

surfaceTwist

the surfaceTwistCmd plug-in converted to a stand-alone application.

readAndWrite

an application that reads in a Maya scene file and writes it out again in different file. This application is quite useful for upgrading Maya scene files from a previous version.

asciiToBinary

an application that reads in a Maya scene file in ascii format and write is out again as a binary file.