You can lock unpublished attributes for nodes inside assets so that their contents cannot be changed. This is a useful precautionary measure when you want to protect sensitive components from accidental changes.
When an asset’s unpublished attributes are locked, you cannot:
- Alter the values of unpublished attributes.
- Publish/Unpublish attributes.
- Bind/Unbind attributes.
- Unlock or remove encapsulated nodes.
- Add nodes to the asset.
- Delete incoming connections to unpublished attributes.
- Modify the parenting of published parent or child anchors for nodes inside the asset (starting Maya 2014).
- Delete encapsulated nodes.
- Rename the asset or its nodes.
- Modify the parenting of unpublished nodes.
- Change views, view modes, or other asset attributes.
You can:
- Modify the parenting of published parent or child anchors for nodes inside the asset (versions previous to Maya 2014 only).
- Change values and connections of published attributes.
- Delete outgoing connections from internal nodes to external nodes.
- Delete external source nodes for incoming connections (this deletes the incoming connection as well).
Any published attributes and nodes are unaffected when an asset is locked. Thus, locking unpublished attributes is an easy way to promote the use of an asset’s interface over modifying its internal node attributes.
To lock all unpublished attributes
- Select an asset or any object in the asset.
- Select
All unpublished attributes for nodes in the asset are locked.
.
To unlock all unpublished attributes
- Select an asset.
- Select
All unpublished attributes for nodes in the asset are unlocked.
.
Locking and referencing
You can lock all unpublished attributes when saving an asset for use when an asset is referenced by a parent file. This allows you to lock all unpublished attributes from the parent file’s perspective, without locking them in the working (child) file.
In general you cannot lock/unlock a referenced asset’s attributes from a parent file.
To lock unpublished attributes for referencing
- Create your geometry and place it in an asset.
- Publish the appropriate attributes to the asset.
Make sure to publish any attributes that are needed by the parent scene.
- Select File > Save Scene As >
.
- In the Save Scene As Options (Referencing Options section) set Asset unpublished to Lock.
- Optionally, you can set Lock File to Lock as well.
This prevents users from saving any reference edits to this file from the parent file.
- Select File > Save Scene As and enter a name for the file.
When the file is saved, all the unpublished attributes for all asset in the scene are locked. These attributes cannot be unlocked from the parent file.