Excluding attrs from locked reference :(

305 views
Skip to first unread message

Berg Jones

unread,
Dec 6, 2012, 1:10:31 AM12/6/12
to python_in...@googlegroups.com
I want to free translateX (example) from being locked when referenced so that I can show/hide TX in the CB with setAttr while it is referenced. I get the following error


# Error: RuntimeError: file <maya console> line 15: setAttr: The attribute 'ref02:nurbsSphere1.translateX' is from a referenced file, and cannot be unlocked. #


I followed the directions on how to ovewrite the getLockReferenceExcludedNodeTypes mel proc but it doesnt do anything. However, if I query that proc I do get what I changed it to (translateX, translate, Translate, tx) but it has no affect on me being able to hide/unhide translate X


http://pastebin.com/2NHnxTy8


There are very few google hits on this procedure... :(

Jesse Capper

unread,
Dec 6, 2012, 2:39:00 AM12/6/12
to python_in...@googlegroups.com
Excluding attributes from reference locking only affects which attributes don't get locked when you lock a referenced file already in your scene.

If you right click on a reference in the reference editor and select Reference > Lock Reference, it locks (almost) all attributes for the nodes in that reference file. overwriting getLockReferenceExcludedAttributes tells maya not to lock certain attributes when performing a reference lock, and does not affect attributes that were locked in the referenced file's original scene.

From the docs:
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.
Reply all
Reply to author
Forward
0 new messages