Unlimited AE and Premiere Pro templates, videos & more! Unlimited asset downloads! From $16.50/m
  1. 3D & Motion Graphics
  2. Maya

Quick Tip: Creating Compound Curve Icons in Maya

Read Time: 2 mins

In this quicktip tutorial, we'll walk through one way to create complex NURBS-based icons in Maya. Useful control icons can make or break a good rig, and are essential when creating in-interface GUIs. Putting together simple, one-piece shapes are easy, but making compound icons can be much more difficult. One method for combining multiple curves is to parent them under a single transform node. We'll first do this by hand, and then look at an easy MEL script that automates the process.

Step 1

Create a handful of Nurbs curves. For this example, I've used the Create > Text option box command, changed the text to Cgtuts+ and then selected the Curves type. With that done, hit Create to create this collection of Nurbs shapes:

Step 2

If you look in the Outliner (Window > Outliner), these curves are grouped by letters (in groups with the prefix "Char_"), and under a single "Text_" node, but each individual letter is selectable and moveable. When we hand over our final rig, we want the entire word to be the only thing that is selectable.

Step 3

To achieve this, we first start by selecting and un-parenting all the curves. The MEL code to do this is as follows:

So marquee select around all of your text elements, enter the above command into the command line at the bottom of your interface window, and hit Enter on your keyboard.

Step 4

With all of the curves still selected, freeze their transformations (Modify > Freeze Transformations).

Step 5

Next, open up the Hypergraph hierarchy.

Step 6

By default, only top-level transform nodes are visible in the hypergraph. To show the shape nodes, go to Options > Display > Shape nodes.

Step 7

First select all of the shape nodes for every curve except curve1. In this case I'll have 7 shape nodes selected. Now hold down Shift and select the first curve's transform node, in this case the curve1 node, to add it to your selection. It's very important to select the transform node last. Your hypergraph should now look like this:

Step 8

The following MEL command parents the first selected items (in our case the shape nodes), under the last selected item (the transform node). So type the following code into your command line and hit Enter to parent the shapes under the transform node:

Step 9

Now you can click on any of the letters and Maya will automatically select the entire word. Your control-icon is now ready! Here's a MEL script that automates the entire process. Just select all of the curves you want to group and run this script:

Did you find this post useful?
Looking for something to help kick start your next project?
Envato Market has a range of items for sale to help get you started.