← Learn library

Maya & Python Scripting / Character FX & Animation / Maya / Python

Changing Control Curve Colors | Maya Python Auto Rig Tutorial

Channel: TD Superheroes ·

Written guide

Original TD Superheroes video thumbnail
Changing Control Curve Colors | Maya Python Auto Rig TutorialTD Superheroes · Video hosted on YouTube

Playing loads YouTube content. YouTube processes data after activation.

Watch on YouTube

If the player is blocked or unavailable, use Watch on YouTube.

Software: Maya, Python

The auto-rig now creates and places its control curves, but they all have the default display color. This lesson adds color assignment to the existing control-creation helper: yellow for center controls, blue for the character’s left side and red for its right side. Those are the instructor’s conventions for this rig.

The starting scene already contains the controls made between lessons. The instructor states that they are not yet connected to the character’s behavior. Coloring them improves identification; it does not complete those rig connections. The exact Maya release is not established.

Identify the display attributes manually

During 00:00–03:02, the instructor demonstrates the desired colors with an existing shelf tool, then shows the underlying operation in the Attribute Editor. On the control’s shape, he enables Drawing Overrides and chooses a display color.

The override must be enabled as well as assigned a color. The two settings have different roles: one permits the override to affect display, and the other selects the indexed color. Inspect both when a scripted color assignment appears to do nothing.

This lesson uses indexed display colors. The later mention of RGB mode is an alternative to explore, not an implemented RGB-control interface.

Use the helper’s existing side designation

Around 03:02–07:01, the instructor considers finding all controls by their naming convention, then chooses to color each one as it is created. The existing helper already receives the side/alignment designation, so a condition can select the center, left or right case.

The script obtains the created control’s shape through a relatives lookup and takes the first returned item. It then sets the shape’s override-enabled and override-color attributes.

That first-shape approach matches the simple controls demonstrated here. The recording does not establish how to handle a transform with several shapes or an unexpected hierarchy. Inspect the returned shape when adapting the helper instead of assuming that any first relative is the curve you intend to color.

Verify the indices against the visible result

From approximately 07:01–11:40, the center branch is tested first. The caption initially says “7” for yellow, but the explanation then identifies the seventeenth index and the later code discussion again refers to 17. The recorded center controls become yellow. The supported intended value is therefore 17, with the earlier utterance treated as inconsistent rather than as a second palette choice.

The left branch uses 6 for blue and the right branch uses 13 for red. The instructor rebuilds the example and observes both side colors. These are indexed values in the demonstrated override setup; they are not RGB triplets.

Check one center control before copying the branch logic. Then inspect both sides using the character’s left and right, not the viewer’s screen position. A visibly correct color on one curve does not prove that every control received the correct side designation.

Keep color assignment separate from rig behavior

The completed change belongs inside the existing control helper and runs during creation. Its dependencies are the helper’s side argument, the control’s actual shape and enabled drawing overrides.

For review, inspect those inputs and the resulting center/left/right colors. The source does not add behavior connections, validate all possible control shapes or test current-version compatibility. Its useful pattern is to attach a small, consistent display rule to the point where the necessary naming and object information already exist.