Tools of the Trade: AttrTransfer

One of the more mundane tasks in Maya is transferring extra attributes from one object to another. If you’ve set up a template of custom attributes on one object, there’s no easy way to copy the attributes and their values over to a new object, or multiple objects. Even more tedious is “jumping connections,” so that ControllerB now controls ObjectC instead of ControllerA. There are various ways to tackle this, from re-parenting shapes to manually re-creating attributes. Also annoying is re-ordering attributes in the ChannelBox. Michael Comet has a great AttrEditor script (and many others!) that got me by for a while, but it breaks on certain attribute types so never quite worked out for me. I decided to write a tool that would remedy all of the above situations:

attrtransfer1

While I hope the usage is pretty straight forward, let’s walk through some of the functionality. As you can see above, I’ve outfitted the high-poly “pCube1” model with every kind of custom attribute. With the tool open, start by loading the selected object as a new source. A full list of attributes that can be transferred and their types will populate the two columns. From there, you can select attributes in the tool and select whatever object(s) you want those attributes to appear on. The checkbox to include connections plays a big role here. If unchecked, the “Transfer” button will simply copy the attributes and their values onto whatever objects you have selected. This means the attributes will still exist on the source object, as well as any connections.

attrtransfer2

Checking on the “Include Connections” option will both delete the attributes from the source and transfer the connections to the new destination object, if any exist. The Channel Box section let’s you directly connect attributes by selecting both objects (driver then targets), and selecting the channels to be driven in the Channel Box. In this section you can also move your custom attributes up or down, and it supports all types. Do keep in mind that String attributes count for this, which is easier to see in the Attribute Editor.

attrtransfer3

That’s about it! You can download this tool from the main website, gitHub, or at the bottom of this post. Do you need more features, have requests, or find a bug? Mail any inquiries to CMiller@CzarOfTheUniverse.com and I’ll be happy to take a look.

Download AttrTransfer

Leave a Reply

Your email address will not be published. Required fields are marked *