// Creation Date: Nov-22-2001 // Last Updated: Nov-22-2001 // Revision: 1.0 // Tested on Maya: 4.01 // // Author: Gino Dammers - gdammers@xs4all.nl // // Procedure Name: // // copyTangent // // Description: // equalizeTangentsEnds -- Copies the tangents value of the first frame // on the animCurve and paste it to the last frame on the animCurve. // // Use: // Select an animCurve in the GraphEditor for it to work on. // global proc equalizeTangentsEnds() { // Get Curve Name string $animCurve[] = `keyframe -q -n -sl`; int $sCurves = `size($animCurve)`; if (!$sCurves == 0) { // Get Tangent Values float $tangents[] = `keyTangent -q -outAngle $animCurve[0]`; // How many what (Size)? int $sKeys = `keyframe -q -kc $animCurve[0]`; float $timeKey[] = `keyframe -q -tc $animCurve[0]`; keyTangent -e -a -t $timeKey[$sKeys - 1] -outAngle $tangents[0] -outWeight 1 $animCurve[0] ; } else { print "Select an animCurve.."; } } /* global proc equalizeTangentsEnds() { string $animCurve[] = `keyframe -q -n -sl`; float $tangents[] = `keyTangent -q -outAngle $animCurve[0]`; int $sCurves = `size($animCurve)`; int $keys = `size($animCurve)`; if (!$sCurves == 0) keyTangent -e -a -t $keys -outAngle $tangents[$keys] -outWeight 1 $animCurve[0] ; else print "Select an animCurve.."; } */