-
interpolated vertices/anchorpoints of shape path
Hello,
Does anyone know where this vertex/anchor point of my animated shape path is coming ?
i think it has to do with some keyframe interpolation, anyways is there a way to disable it?i just found out that the number of these vertices (which are only visible if the cursor is between the keyframe) equals the number of vertices which are added in the next keyframe… but I still dont know avoid them.
I made a script to manage it somehow but thats not the best solution. Id prefer a non script option.
// G L O B A L S
var theComp = app.project.activeItem;
var theLayer = theComp.layer(1);
var thePath = theLayer.property("ADBE Root Vectors Group").property("ADBE Vector Group").property("ADBE Vectors Group").property("ADBE Vector Shape - Group").property("ADBE Vector Shape");for (var i = 1; i <= thePath.numKeys; i++) { var getVerts =thePath.keyValue(i).vertices; if (getVerts.length > 2) {
for (var n = 0; n < (getVerts.length-2); n++) { // Mittelpunkt zwscihen Vertex n und n +2 berechnen var middle_x = getVerts[n][0]-((getVerts[n][0]-getVerts[n+2][0])/2); // absolute differenz between x = coordinated var middle_y = getVerts[n][1]-((getVerts[n][1]-getVerts[n+2][1])/2); // überprüfen ob der dazwischenliegende Punkt dem errechneten Mittelpunkt entspricht var test_x = Math.round(getVerts[n+1][0]); var test_y = Math.round(getVerts[n+1][1]); if (Math.round(middle_x) == test_x && Math.round(middle_y) == test_y) { //alert("found"); getVerts.splice((n+1),1); n--; } } } var myShape = new Shape(); myShape.closed = false; myShape.vertices = getVerts; thePath.setValueAtKey(i,myShape); }have a nice day,
Alf
