Ebberts, you’ve done it again. I’ve attached a gif below, of the arc script in action. Maybe it’ll play here, I’m not sure.
I’m happy to have the script working, but do you think you can explain to me why your script (with minor edits) works flawlessly:
var topArcPos = effect("Top Arc Position")("Point");
var botArcPos = effect("Bottom Arc Position")("Point");
var pts = effect("Arc resolution")("Slider");
var timeMult = effect("Timescale")("Slider");
//Create containers; set base values
var myArray = [];
var myArray2 = [];
var myNewArray = [];
var i;
var i2;
//Add values to Arrays
for (i=0;i<pts;i++){
myArray[i] = topArcPos.valueAtTime(time-i*timeMult);
myArray2[i] = botArcPos.valueAtTime(time-i*timeMult);
}
//Flip myArray2
myArray2.reverse();
//Join myArray2, now reversed, to the end of myArray
myNewArray = myArray.concat(myArray2);
createPath(points = myNewArray, inTangents = [], outTangents = [], isClosed = true)
And mine, when I try to build the same thing, returns an error that says “Error: Error: createPath requires the points, inTangents, and outTangents to contain at least 1 point, and all be the same size”? I’ve also made the array dead-simple in my attempt to rule out weird stuff with the more complicated things in the working version. It kicked back the same error regardless.
var arcTop = effect("Arc Top toComp")("Point");
var arcBot = effect("Arc Bottom toComp")("Point");
var pts = effect("Points")("Slider");
var timeMult = effect("timeMult")("Slider");
//Create containers; set base values
var myArray1 = [];
var myArray2 = [];
var myNewArray = [];
var i;
//Run loop to build both arrays
for (i=0;i<pts;i++) {
myArray1[i] = [i,i];
myArray2[i] = [i,i];
}
myNewArray = myArray1.concat(myArray2)
createPath(points = myNewArray, inTangents = [], outTangents = [], isClosed = true)
I feel like Creed in The Office being presented two identical pictures and then being asked to find the difference. Clearly there is one, but I can’t for the life of me find it.
Again Ebberts, you’re a life-saver.