← Learn library

Maya & Python Scripting / Maya / Python

Merge Shape Nodes | Maya Python Tutorial

Channel: TD Superheroes ·

Written guide

Original TD Superheroes video thumbnail
Merge Shape Nodes | Maya Python 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 merge in this lesson places several curve shapes beneath one transform so that they can be selected and moved as one control. It does not join their points into a single continuous curve. The shape nodes remain separate beneath the surviving transform.

The examples use editable curves such as circles and arrows. You should understand the distinction between a transform and its shapes and be comfortable inspecting the Outliner. The exact Maya version and behavior on arbitrary non-curve objects are not established.

Inspect transforms and shapes as separate lists

During 00:00–03:01, the instructor stores the selected transforms and prints the result. A relatives query with the shape option retrieves their shape nodes instead.

These lists serve different operations. The source transforms are candidates for eventual cleanup, while the shapes are the content to preserve. Confusing them would turn a shape-parenting tool into a different hierarchy operation.

The first implementation parents one shape to another selected transform. The appearance changes unexpectedly, so the instructor undoes the result and revises the preparation. That initial parent call is not the complete working procedure.

Freeze the test curves before relative shape parenting

Around 03:01–05:01, a loop applies the demonstrated freeze-transform operation to the selected objects, including translation, rotation and scale. The shape-parenting call uses the shape and relative options. The instructor also corrects an accidental absolute-versus-relative setting during testing.

The resulting curves retain the intended arrangement in his example. Inspect their appearance after parenting, because successful execution alone does not prove that the shape coordinates were interpreted in the intended transform context.

Freezing transforms changes scene data. The video tests simple constructed curves, not animated or constrained production controls with dependencies. Use that scope when evaluating whether this preparation is appropriate for another selection.

Use the last selected transform as the destination

From approximately 05:01–08:00, the two-object version is expanded to process the shape list beneath the last selected transform. The instructor tests it with additional curves and with another shape added to an already merged result.

The surviving object is chosen by selection order. Inspect that order before running the tool, especially if the surviving transform’s identity matters to later rig code.

A second loop deletes the other selected transforms while skipping the final one. That cleanup belongs after the shapes have been successfully moved. The demonstrated source transforms are expendable curve containers; deletion is not a general guarantee of safety for arbitrary objects with other children or dependencies.

Center the pivot and choose the final selection

Around 08:00–10:01, the script centers the surviving transform’s pivot. The instructor then demonstrates two possible finishing behaviors: leave that object selected or clear selection.

Those are UI preferences, separate from the merge itself. Check the resulting Outliner structure and shape arrangement before choosing which finishing behavior is more useful in your tool.

The closing demonstration uses more than two curves, but does not establish a numerical maximum or validation for every possible selection. A useful review checks that the intended shape nodes remain beneath the chosen transform, their arrangement is preserved, obsolete containers are gone and the pivot is where expected.

This structure is particularly useful when several visible curve pieces should behave as one control while remaining distinct shape nodes. Later tools that edit only the first shape, such as a simple color helper, may need separate consideration for such a control; that is an implication of the resulting hierarchy, not an additional feature implemented in this video.