MAYA - Convert joints into locators and groups

268 views Asked by At

I'm looking to set up two scripts (python or MEL) that convert joints to locators and joints to groups.

However, once transformed, they must have kept their hierarchical position in the outliner, the same names, the same positions and the same animation keys.

Here's an MEL script for transforming locators into groups. This would be to do the same thing but from joints to locator and from joints to group.

string $sel[] = `ls -sl`;
string $obj = $sel[0];
string $children[] = `listRelatives -ad $obj`;

for($c in $children){

    $t = `objectType -isType "locator" $c`;
    print($t);
    if($t){
       delete($c);
    }
}

Before (exemple with locators) After (exemple with locators)

Thank you very much and I hope someone can help me :D

0

There are 0 answers