So, I think I hit a limitation of MEL, but if there's a simple solution out there, it doesn't hurt to ask.
I was trying to animate the CVs of curve like so:
proc animateCurve( int $numFiles, int $numLines )
{
// Set keys for all CVs of the input curve.
for ( $i = 1 ; $i < $numLines ; $i++ )
{
setKeyframe "curveShape1.cp[$i].xv";
setKeyframe "curveShape1.cp[$i].yv";
setKeyframe "curveShape1.cp[$i].zv";
}
}
The problem with this is using variables to access an index doesn't seem to be possible (constants work fine). I've figured out a slight work around using expressions (tying the CVs values to the translate attributes of a locator), but if there's an easier workaround, I'd appreciate it much. This has to be in one entire script for this particular use, and it has to be in MEL.
