Is there a way of showing what you have selected in the viewport (or outliner) in the reference editor in maya? I know you can show what you have selected in the ref editor in the outliner but is there a way of doing the opposite?
I have scenes with lots of duplicate refs and it's pain trying to find the right one to remove in the ref editor.
Replies
Sounds pretty straightforward to do too, since you can just do "referenceQuery -rfn <objectName>" and it'll return the reference node.
The "get the reference node" thing is the easy part, now I just need to figure out how to highlight it in the reference editor...
Get the script here: http://www.greveson.co.uk/scripts/maya/mopRevealReference.mel
Put it in your My Documents/maya/scripts/ folder. If you're running Maya currently, type rehash; into the MEL command line to reload the script folders so that it will detect the new file.
To run it just have a shelf button or hotkey set to run this command: The script will load the Reference Editor window if it wasn't open already. It will highlight the selected object's reference.
I tested it in a scene with 3 references and it appeared to work fine.
I'm working on the assumption that Maya's list connection for the Reference Editor is using the same order of files as returned from file -q -r, if it's different then the selected reference might be the wrong one. I haven't tested it extensively enough to be sure, but my test cases indicated it's correct.
Let me know if anything seems broken. I'll see about retrieving the proper selectionConnection rather than just assuming it's the same as the global reference list (although it should really be).