Created
October 14, 2014 11:34
-
-
Save nathanielanozie/d076e4615a7c10fe4cae to your computer and use it in GitHub Desktop.
create ik sc use selected root, assumes has child (MEL)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//create ik sc use selected root, assumes has child | |
//inspired by Anop A.K (codecg dot com) learning about iksc drawing in mel | |
string $sel[] = `ls -sl`; | |
if(size($sel) == 1){ | |
string $root = $sel[0]; | |
select -r $root; | |
string $check[] =`listRelatives -children -type joint $root`; | |
if(size($check) != 1){ error("Error Nothing to Draw IK SC with, check end"); } | |
pickWalk -direction down;//using this so get full path | |
string $children[] = {}; | |
$children = `ls -sl -type joint`; | |
if(size($children) != 1){print("Error Nothing to end IK SC at");} | |
else{ | |
string $end = $children[0]; | |
select -r $root $end; //make ik sc | |
ikHandle -sol ikRPsolver; | |
select -cl; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment