Set or query API preferences.
|Long name (short name)||Argument Types||Properties|
toggles whether or not an error log of failed API method calls will be created. When set to true, a file called OpenMayaErrorLogwill 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 have multiple arguments, passed either as a tuple or a list.
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).
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).
Derived from mel command maya.cmds.openMayaPref
import pymel.core as pm # Enable RTLD_LAZY binding when loading plug-ins pm.openMayaPref( lz=True ) # Force RTLD_NOW binding when loading plug-ins pm.openMayaPref( lz=False ) # Disable the warning about old plug-ins being loaded pm.openMayaPref( ow=False ) # Turn on the Error log pm.openMayaPref( errlog=True ) # Query the Error log pm.openMayaPref( q=True, errlog=True ) # Result: [True] # # Turn off the Error log pm.openMayaPref( errlog=False )