Go to: Synopsis. Return value. Related. Flags. MEL examples.

Synopsis

openMayaPref [-errlog boolean] [-lazyLoad boolean] [-oldPluginWarning boolean]

openMayaPref is undoable, queryable, and editable.

Set or query API preferences.

Return value

int indicates success or failure

In query mode, return type is based on queried flag.

Related

loadPlugin, pluginInfo, unloadPlugin

Flags

errlog, lazyLoad, oldPluginWarning
Long name (short name) Argument types Properties
-lazyLoad(-lz) boolean createqueryedit
toggles whether or not plugins will be loaded with the RTLD_NOW flag or the RTLD_LAZY flag of dlopen(3C). If set to true, RTLD_LAZY will be used. In this mode references to functions that cannot be resolved at load time will not be considered an error. However, if one of these symbols is actually dereferenced by the plug-in at run time, Maya will crash. Defaults to false(off).
-oldPluginWarning(-ow) boolean createqueryedit
toggles whether or not loadPlugin will generate a warning when plug-ins are loaded that were compiled against an older, and possibly incompatible Maya release. Defaults to true(on).
-errlog(-el) boolean createqueryedit
toggles whether or not an error log of failed API method calls will be created. When set to true, a file called "OpenMayaErrorLog" will be created in Maya's current working directory. Each time an API method fails, a detailed description of the error will be written to the file along with a mini-stack trace that indicates the routine that called the failing method. Defaults to false(off).

Flag can appear in Create mode of command Flag can appear in Edit mode of command
Flag can appear in Query mode of command Flag can be used more than once in a command.

MEL examples

// Enable RTLD_LAZY binding when loading plug-ins
openMayaPref -lz true;

// Force RTLD_NOW binding when loading plug-ins
openMayaPref -lz false;

// Disable the warning about old plug-ins being loaded
openMayaPref -ow false;

// Turn on the Error log
openMayaPref -errlog true;

// Query the Error log
openMayaPref -q -errlog;

// Turn off the Error log
openMayaPref -errlog false;