-
argument 2 to createPath() must be 2 numbers
I’m really sorry to be posting this, but I’ve been banging my head against it for hours, and I’m still missing something. I have a path that needs to get its first however many points and tangents from a previous path; then I need to build a second path using all but the last point/tangents from that first path. It kinda sorta worked when I just grabbed, say, something like _prev.points()[0] (when knew I just wanted the first point), but with the code below, something’s gone haywire. I copied all of this to a text layer just to see what it was outputting, and it looks legit: each array has the same number of elements. I would really appreciate some help! Thank you!
_dd = thisComp.layer("N exp controls").effect("Diverge distance")("Slider");
_dcs = thisComp.layer("N exp controls").effect("Diverge curve strength (%)")("Slider");
_mult = 0.5;
_prev = thisComp.layer("Sh primary route").content("Group 1").content("Path 1").path;
_knots = _prev.points().slice(0, -1);
_knotIns = _prev.inTangents().slice(0, -1);
_knotOuts = _prev.outTangents().slice(0, -1);
_knot01 = [0, 3300 - 480]; // 3300 is (7680 * 0.5) - 540, which is where the "source" starts
_knot02 = _knot01 - [_dd, _dd * 1.547] * _mult;
_knot03 = [_knot02[0], thisComp.height * -1.0];
_points = _knots.concat(_knot01, _knot02, _knot03);
_ins = _knotIns.concat([0, 0], [0, _dd * _dcs * _mult], [0, 0]);
_outs = _knotOuts.concat([0, _dd * -_dcs * _mult], [0, 0], [0, 0]);
createPath(_points, _ins, _outs, false);