Add intermediate vertices on a shape with a script
- December 2, 2021
- 2 replies
- 489 views
Hello everybody,
I know how to read the position values of the vertices on a path, but I'm trying to figure out how to automatically add intermediate points on a mask shape with a script.
In other words, as shown in the attached image, I need to start from a simple shape with 2 or 3 vertices (fig.1) and with a script, automatically add further vertices (fig.2).
I tought to add with a script, a pointOnPath expression on the mask path layer, and programmatically change the percentage value to store the values into an Array and finally re-create the mask path using the stored data. I didn't try it but it should work, however I'd like to ask you if there's a different and "smart" approach without reading the expression from the script. So, is there a "pointOnPath" alternative on extendscript? Thank you very much
