Maya & Python Scripting / Character FX & Animation / Maya / Python
Assigning Blend Shapes to Character using Python in Maya
Written guide

Playing loads YouTube content. YouTube processes data after activation.
Watch on YouTubeIf the player is blocked or unavailable, use Watch on YouTube.
The preceding import tool brings facial target meshes into Maya, but importing geometry does not connect it to the character. This lesson adds a named blend-shape node to the base mesh and inserts the imported targets into distinct indexed slots. The final test activates the targets individually.
You need the existing import script, its object-name variable, the intended base mesh and compatible target meshes. The lesson assumes that those shapes were prepared for this character. It does not demonstrate topology validation or establish an exact Maya release.
Update the naming assumption before extending the importer
During 00:00–01:02, the instructor explains a change made between lessons: the OBJ files have been re-exported without their leading underscores. He comments out the earlier code that stripped the first character from each imported name.
That correction must happen before assigning targets. A name-cleanup rule that matched the old dataset would now damage otherwise correct names. Inspect the actual imported object names and the string passed to the blend-shape operation, rather than carrying a prior workaround forward automatically.
The demonstration clears prior experimental history on its base mesh before the test. That is a controlled reset of this example, not evidence that deleting an arbitrary production mesh’s history is a safe prerequisite.
Create the receiving node, then edit it
Around 01:02–03:01, the instructor creates a named blend-shape node on the intended base geometry. The node initially has no imported targets assigned to it. Its presence establishes the receiving deformer, not the finished facial setup.
Inside the existing import/filter logic, a later blend-shape command refers to that named node in edit mode. This separates creating the deformer from adding target entries to it.
Inspect the intended base mesh and node name before populating it. A successfully created node on the wrong object would not make the character respond as intended.
Give each imported target a distinct index
From approximately 03:01–05:01, the target specification identifies the base geometry, an index, the imported target mesh and the demonstrated target weight value of one. An index variable begins at zero and increments after an entry is added.
The index distinguishes the target slots. Without advancing it, the loop would not describe the intended sequence of separate entries. The imported object’s name identifies which mesh supplies the target shape; it is not interchangeable with the index.
The transcript describes the components of this operation but does not preserve a complete audited command expression. Follow the final on-screen syntax for the target argument rather than inferring punctuation from spoken code.
Correct syntax and verify actual deformation
At approximately 05:01, the first test reports that a positional argument follows a keyword argument. The instructor identifies a missing equals sign on a flag. A second error comes from capitalization in the object-name variable. Correcting those produces the target list in the blend-shape controls.
He then activates the shapes one by one and observes their effects. This closes the gap between imported geometry, target assignment and a responding base mesh. Seeing the source objects in the Outliner alone would not establish that the deformer uses them.
The final remarks defer a dedicated control interface and skeletal mouth or ear behavior to later lessons. The result here is the target-assignment stage. Review the current naming rule, receiving node, distinct indices and individual deformation responses before extending the rig further.