File references can be locked using a Lock option to prevent them from being accidentally modified when they are referenced in your scene. When on, the Lock option prevents edits to all attributes and nodes associated with the file reference. You can access the Lock option from the Outliner contextual menu, Create Reference Options window, and Reference Editor.
In the Outliner, an icon indicates that the reference is locked, while in the Reference Editor, an icon indicates that the reference is locked.
When using the Lock option be aware of the following:
- If you reference a file that has locked attributes, they remain locked regardless of whether or not you turn on Lock when you create the reference.
- You cannot assign reference edits to a locked reference.
- Loading and unloading references does not affect their locked state.
- You can use a MEL script to specify which attributes you want excluded from a reference's lock state. Regardless of which attributes are excluded, the Lock option always locks all of the nodes for the referenced file.
See Lock file references.
Customizing lock settings to exclude attributes
When a reference is locked, all nodes and attributes, with the exception of a few specific attributes and node types, are locked by default. You can use MEL procedures to customize the reference Lock option so that it excludes specific attributes. When excluded, these attributes can be edited.
There are two MEL procedures you can use to customize the lock settings to exclude attributes. One procedure specifies individual attributes to exclude, while another procedure specifies which attributes to exclude by node type. Using this procedure, an entire set of attributes for a given node type are excluded from locking. The MEL procedures are included with Maya, and can be found in the scripts folder of the Maya installation directory.
Note: You can override the MEL procedures that ship with Maya by creating your own customized MEL procedures. Your MEL procedures must be named exactly the same as the ones that ship with Maya. You must additionally ensure the files are placed in the Maya script path.
See Exclude attributes from locked references.
For more information on working with MEL procedures in Maya, see the MEL Overview guide. For more information on customizing the lock settings in your particular production environment see below.