Here is an example of a shape I'd like to modify. It has three Bezier points.
If I use document.moveSelectedBezierPointsBy() it works as expected, however, for my script I need to be able to automate this for each layer and frame, so I would need to use JSFL to select Bezier Points, and I have not found a method in the API for doing this.
As I can select an element with element.selected, I thought I could change the shape using the vertices of the selected element. With this code, it returns an array of 12 vertices, which is different than the length of the Bezier points (3).
var verts = an.getDocumentDOM().getTimeline().layers.frames.elements.vertices
an.trace(verts.length); // 12
This is also the same length when getting the length of the shape's edges which is unexpected (I'd expect 2 vertices / 1 edge). If I try and move those 12 vertices, it will not move the Bezier handles of the vertices.
var shape = an.getDocumentDOM().selection;
for (i=0; i<shape.edges.length; i++)
var hEdge = shape.edges[i].getHalfEdge(0);
var vertex = hEdge.getVertex();
x = vertex.x-20;
y = vertex.y-20;