Secure File Loading

The features in the Security Preferences keep your system secure by preventing specific user-flagged MEL or Python commands from executing without your knowledge at the time of import: either by asking you permission to continue, or denying the command from executing entirely and then halting the import operation. Secure MEL loading is enabled by default, but before opening/importing files that originate from untrusted sources (such as internet websites or forums), we recommend manually enabling Python security as well.

To enable Python security

  1. Go to Windows > Settings / Preferences > Preferences.
  2. Click the Security > Python section.
  3. Set Python to Check before executing (secure) to enable Python security.
  4. (Optional) Set the desired Default action for flagged commands to determine how Maya reacts when it encounters a flagged command.

Once your file has been loaded, you can repeat the same procedure to disable Secure Python loading.

Customizing MEL / Python security

While simply enabling/disabling MEL / Python security with the default values will provide a good level of protection, you can also customize each type of security to best suit your needs. You can find these customization options in the Security Preferences sub-sections.
Note: These options only have an effect when Secure MEL loading is enabled, and Python is set to Check before executing (secure).

To enable/customize Secure Python built-in function loading

  1. Go to Windows > Settings / Preferences > Preferences.
  2. Click the Security > Python section.
  3. Turn on Secure built-in functions.
  4. (Optional) Check or uncheck items in the Flagged built-in functions list to have Maya alert you when they attempt to execute.
  5. (Optional) Set the desired Default action for flagged commands to determine how Maya reacts when it encounters a flagged command.

To enable/customize Secure Python module importing

  1. Go to Windows > Settings / Preferences > Preferences.
  2. Click the Security > Python section.
  3. Click the boxes in the Flagged built-in functions list to flag/unflag them (flagged functions will have a checkmark next to them).
  4. (Optional) Click the Add button next to Trusted modules and add a module name to make it trusted, or click an existing module in the list and click the Remove button to make it untrusted.
  5. (Optional) Set the desired Default action for flagged commands to determine how Maya reacts when it encounters an untrused module.

To enable/customize Secure MEL loading

  1. Go to Windows > Settings / Preferences > Preferences.
  2. Click the Security > MEL section.
  3. Turn on Secure MEL loading.
  4. (Optional) Click the Add button next to Flagged commands and add a command name to flag it as untrusted, or click an existing command in the list and click the Remove button to make it trusted.
  5. (Optional) Set the desired Default action for flagged commands to determine how Maya reacts when it encounters a flagged command.

Related topics