Writing a command line exporter



The Maya API can be used in one of two ways, either to create a plugin, or as a stand-alone application. This topic covers using MLibrary to create a command line application.

There are some obvious benefits in writing a command line based exporter. Primarily it allows you to create an automated graphics build process. It should be pointed out that there are a few ways of using mel scripts to automate the build process which will only require a file translator plugin. A simple command line exporter may be all you require though....





Using MLibrary

Essentially any application we write can gain full access to Maya's functionality by linking to and using MLibrary.

As an example, this simply initialises the Maya libraries, and then exits. The source code frameworks, and the simple exporter examples provide more information should you need it.



int main(int argc,char** argv)

// initialise the maya library

// we could use MFileIO to open & export files here

// cleanup maya before we quit


return 0;




What Next?

Writing A File Translator Plugin


Rob Bateman [2004]