Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The callback information is stored in a global MEL string array called g_maxwellExportCallbacks. It doesn't matter who creates this variable, if it's Maxwell or your plug-in. Maxwell will just look for it at export time and call the commands as necessary. The strings stored in this array have a special format:

plug-in name:type:language:command

The plug-in name is needed to distinguish between callbacks registered by different plug-ins. This is a string you provide when you register the callback, so it's recommended (but not enforced) to use the name of your plug-in here. The type field is a numeric value corresponding to the MaxwellMayaAPI::ExportCallbackType enum. You should only have one callback of each type for a given plug-in name. The language field is an integer corresponding to the MaxwellMayaAPI::ExportCallbackLanguage enum and specifies if the callback command is MEL or Python. The final field is the command string which is executed by the Maxwell plug-in.

...