Hi All,
I have a bit of the problem for the past several days and it seems like I can't get my head around it...
Tried looking everywhere and simply can't find any solution. I've went through AE Scripting guide that is written by Adobe and still can't get it...
Anyway, my problem is that I simply can't get the script to delete a vertex from a mask path that already existing in my project.
Here is the code I wrote for it:
var Ver = TarLayer.mask(1).property("Mask Path").value.vertices;
delete Ver[4];
alert (Ver[4]);
Practically, this code seem to run fine, but the specified vertex still exists in my project... Like nothing happened.
I've intentionally placed 'alert' at the end to see if there is any value in the specified array that was previously deleted, and the alert returns a message that the targeted array is undefined, which is fine. But the bloody vertex still exists in my project...
I've even tried placing the "alert (Ver[4]);" method before the delete operator and then once more after just to see what it will report, and it reports correctly. First alert gives me an X,Y coordinate of the specified vertex, then the second alert, which comes after the delete operator, gives me this message: "undefined", which should be alright considering it was just deleted, but the actual mask in the project on my composition still has that bloody vertex...
I presume that there must be some sort of a deconstruct method that should be used in order to remove a specific vertex, but I cant find it...
It would be much appreciated if someone could have a look at this and suggest some viable solution...