How to Use Instanced Shapes for Rig Controls

Andrew Christophersen shows how you can use instanced shapes for rig controls.

When you are building rigs in Autodesk Maya and you want an IK/FK switch to control attributes on multiple controls, you’ll find that Maya only allows you to add attributes to a single transform. There is a way around this. That is to say, you can share attributes in Maya, by using instanced shapes in rig controls. How? Check out this new tutorial from Andrew Christophersen who details the process.

“When building rigs you want IK to FK switches to control attributes on multiple rig controls but Maya only allows you to add an attribute to a single transform,” Christophersen says. “To get around this limitation add your attributes to a single shape and use instancing to propagate this shape to any control that needs access to the shared attributes.”

Here is the Instancing example code from the tutorial;
def add_instance_to_control(curve, ctrl):
:param pm.PyNode curve: pynode of the object to instance
:param pm.PyNode ctrl: object the shape node of curve will be parented to
curve = pm.instance(curve, + ‘_switch’)[0]
curve.getShape().setParent(ctrl, r=True)

for ctrl in controls:
add_instance_to_control(instance_control, ctrl)

Like The Posts on LesterBanks?

Ensure You continue getting the most relevant tutorials, news, insights, and industry techniques by becoming a patron!