Link attributes between controllers


#1

So I’m about to embark on creating a new rig for myself(and I’ll share once it’s ready), but one question I had was the ability to link attributes between two controllers.

For example. if I have two controllers, one(A) with a rotation channel and the other(B) with a bend channel that controls the rotation of A.

So when A is rotated, the value of bend in B updates accordingly and vice versa, so when the bend value in B is updated, the rotation of A changes.

How would one go about doing this?

Thank you!


#2

That would create a cycle and maya doesnt like cycles. Why not create a third attribute (possibly on a 3rd controller) and drive the other two with that? You can use a script job to automatically select the 3rd controller when you select one of the other two - if you really need the other two to be visible, that is.

David


#3

Thanks, that makes sense and yes, a switching scrip would actually work best like you mentioned.

How would I be able to script it so that when the user clicks on, let’s say, Bend on Controller B, it’ll automatically switch to Rotate Z of Controller A?

Also I could never find this before, but how can I rename the Basic SRT channels?

Thank you! I’m basically trying to create a rig that would be friendly to as many different types of animators as possible.


#4

Here’s a link that could be of interest http://lesterbanks.com/2010/12/scripttrigger-trigger-selections-in-maya/

or this one
http://www.djx.com.au/blog/zootoolbox-guide/zootoolbox-guide-tool-list/zootriggeredwalk-through-part-1/

For renaming the channels you can use the “aliasAttr” command.

David


#5

Thanks very much. I’ll take a look at those and see if I can get them to do what I want.
Much appreciated.


#6

You can create the functionality you describe without getting a cycle too, by using a scriptJob:
While objA is selected, transfer values to objB, while objB is selected, transfer values to objA. If both is selected at the same time, don’t transfer anything.

In 3DBuzz’s “Developing Modular Rigging Systems with Python”, the process of creating a mirror behaviour while moving controls on either of two sides of a mirror plane is described in detail. In case you need that extra kick in the right direction :wink:


#7

Thanks very much! That is a great idea and I’ll look into that DVD


#8

Sounds interesting but I’m just wondering if this actually is the right direction. Has anyone used rigs that utilize this functionality? (either the mirroring or the scriptjob transferring of values between different related controllers) Did they work well? I’ve used rigs that do this is a menu driven way - like ik fk matching or pose mirroring. But I’ve not seen it done as an automatic behavior of the rig.

David


#9

I have, to be honest, not used it as part of a rig, but as part of the rigging process. But I see no problem with using it in a rig as long as it is well thought out, as long as the animators know what’s going on, and as long as you can switch it on and off (as you mentioned David).


#10

This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.