Versions Compared

Key

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

...

There are a few other flags as well which can be listed by typing help maxwell in the script command line, but they are used internally by the plug-in.

As explained in the camera documentation, custom Maxwell attributes such as camera ISO or object render flags are only added the first time they are set to a non-default value. If you need to set these attributes from a script, you can use the maxwellSetCustomScalar function instead of setAttr, to make sure the attributes are created first.

    maxwellSetCustomScalar("double", "cameraShape1", "mxFstop", 8.0);
    maxwellSetCustomScalar("long", "cameraShape1", "mxIso", 200);

The first parameter specifies the type of the attribute. Valid values are "long" for integers and enums, "double" for floating point numbers and "bool" for booleans. The following parameters are the node name, attribute name and value. For the complete list of custom attribute names, see the file maxwellCustomAttrs.mel in the scripts/others subdirectory of the Maya installation path.

To export a MXS file in the same way as the Export commands from the File menu, you can run the following MEL snippet:

...