GetCurveLength MEL

From scripting
Revision as of 05:42, 22 April 2017 by Nickpisca (talk | contribs) (Created page with " global proc float GetCurveLength(string $InputCrv) { //Wing, Eric, Nick 2010 //string $InputCrv = "transform82"; float $LenDim; string $SNode[] = `lis...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
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;
}