Difference between revisions of "GetCurveLength MEL"

From scripting
Jump to: navigation, search
(Created page with " global proc float GetCurveLength(string $InputCrv) { //Wing, Eric, Nick 2010 //string $InputCrv = "transform82"; float $LenDim; string $SNode[] = `lis...")
 
(No difference)

Latest revision as of 05:42, 22 April 2017

global proc float GetCurveLength(string $InputCrv) {
    //Wing, Eric, Nick 2010
    //string $InputCrv = "transform82";
    float $LenDim;    
    string $SNode[] = `listRelatives($InputCrv)`;
    int $getspans = `getAttr($SNode[0]+".spans")`;
    string $tempobJ = `arcLengthDimension ($InputCrv+".u["+$getspans+"]")`;
    string $posAL = `getAttr ($tempobJ+".arcLength")`;
    delete $tempobJ;
    return $posAL;
}