Tuesday, September 2, 2014

Tip: scripting to help search rigging hierarchies

Hi,

Here is a handy little script i wrote today in Maya to help with selecting parents of selected things.

Hope you find it helpful.
//select parent of each thing selected, expects a parent no error checking
string $icon[] = `ls -sl`; //no error checking
if(size($icon) > 0){
string $result[] = {};
for($arg in $icon){
string $grp[] = {};
$grp = `pickWalk -d up $arg`;
$result = stringArrayCatenate( $result, $grp );
}
select -r $result;
}

I used this by isolating some finger controls, working out their orientations and grouping via script, then i wanted to unparent the curves group parents back to the world. This was helpful with that. (side tip: isolate select is really helpful to have simpler work area to work with during rigging)

Cheers,
Nate