3D World

WHAT ARE PROXY ATTRIBUTES AND HOW DO I USE THEM?

Lisa Bloom, Wakefield

-

Antony Ward replies

Adding custom attributes to our rigs may be a fundamenta­l part of the rigging process, but it’s also an extremely useful one, and can give the animator an extra level of control as they bring their creations to life.

The most basic attribute is one which will blend the character’s limbs between the IK (inverse kinematics) and FK (forward kinematic) controls, so they can plant the hands, or make walk and run cycles easier by fixing the feet in place.

Having this attribute is useful, but if you’re animating with one of the FK controls for example, but then have to move back to the main arm control to switch to IK, it adds an extra level of complexity. Instead, wouldn’t it be easier if we could access the IK/FK attribute from any control on the limb?

To achieve this, the obvious approach would be to add more custom attributes to each control, and then connect these to the main attribute. However, the problem with direct connection­s is that they would first lock the main attribute, making it useless, but we would also end up with the same problem of only having access to one attribute.

This is where a proxy attribute would help. What these do is create a new attribute which is simply linked to the master one, so each has control. The problem is they can’t be created through the main Maya UI, instead you need to use a bit of scripting.

All you do is select a control and use the following code. The -ln flag specifies the name of the new, proxy attribute which will be added to the selected control. The -proxy flag dictates the location of the main attribute it will be linked with, so in this case it’s linking to the Ik_fk_switch attribute on the l_arm_ctrl control.

addattr -ln “Ik_fk_switch” -proxy “l_arm_ctrl.ik_fk_ Switch”

Adding a proxy attribute to both the IK and FK controls means the animator can quickly and easily switch no matter what they have selected.

EXPERT TIP KEYFRAMES SHARED

Another useful feature of the proxy attributes is that they also share keyframes. This means that if you are animating on one control, any keys added to the proxy attribute will also be added to all the other connected attributes.

Wouldn’t it be great if you could have access to an attribute from multiple other controls? Well, with proxy attributes you can

 ?? ??
 ?? ??

Newspapers in English

Newspapers from Australia