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)

Some of the links on lesterbanks are "affiliate links", a link with a special tracking code. This means if you click on an affiliate link and purchase the item, we will receive an affiliate commission. The price of the item is the same whether it is an affiliate link or not. Regardless, we only recommend products or services we believe will add value to our readers. By using the affiliate links, you are helping support our Website, and we genuinely appreciate your support.