Last Updated: February 25, 2016
·
1.414K
· vero4ka

MEL Script (Autodesk Maya): Go through hierarchy

// Add a prefix "myPrefix_" to all children elements of that joint.

string $stat_element = "joint1";
select -r $stat_element;
string $nodes[] = `ls -sl -dag`;
for($node in $nodes){
    rename -ignoreShape $node ("myPrefix_" + $node);
}

related gist: https://gist.github.com/ctrl-alt-delete/11099336