Built-in way to save a namespace as a reference?

I have developed a little tool to track all node creation and wrap some metarigging around it.

This is primarily to allow new riggers on my project to create polish/custom rigging without needing to know the system or python.

Also, we have some ncloth setups for cinematics, and i like to capture all those new nodes in a namespace to keep track of the stuff. Maybe it’s the ‘film pipeline’ side of me, but I would like to take all that sim stuff in it’s namespace, and convert it to a reference, retaining the ref edits that parent it in place, etc…

Does Maya have a built-in way of doing this?

I googled around a bit, it seems not, but I think it should. Is this the reason there’s an ‘export selection’ option in the ref editor window? Are you supposed to export selected, then delete them then re-import as a ref?

Let me try and understand. You’ve got elements that are local to your scene with connections to referenced items, and you’d like to extract the locals items and put them back in as references while maintaining their connections to the original references?

Depending on your level of connections, if they’re connected on both their input and output side, this shouldnt be too difficult to script if you’ve got the time.

A script would: export your selection with namespaces, replace their namespace (as to allow the reference to fill their shoes), reference the items back into the scene with their original namespace and transfer the connections from the originals to the newly referenced ones.

Another way would be to: export your selection with namespaces, remember (or, more likely, save out the names of those nodes), save your scene as ma, remove those nodes from the file, append a loading as a reference your exported meshes and reload the scene. Maya would treat the now referenced nodes as the originals, and simply connect the same connections to those instead.

All theory of course. Would’ve been easier with an amount of foresight! Good luck!