[Mel]Controller Select Script


#1

Hi, Im new to Maya and I have a question regarding selecting the controllers.

From what Ive learned when selecting controllers through mel script, I had to list up all the controller names. For example if I have a Controller name A~Z…

select -add A ;

select -add Z ;

However instead of writing down all the controller names can I just use the select by type to nurbsCurve?

What is a good method for selecting all the controlers?

thx.


#2

A conveniant way is to give all the controllers a pre- or posfix. e.g. if they are named like this: ctrl_handL, ctrl_handR etc. you can select them by:

select "ctrl_*"

what will select the transform AND the shape node what is often not desired. So a better solution is to first get a list of all your objects and then select this list:

string $list[] = `ls -type transform "ctrl_*"`;
select $list;