Skip to main content
Airweb
Participant
October 15, 2021
Question

How to set first vertex using extendscript?

  • October 15, 2021
  • 1 reply
  • 240 views

Hello,

How can I change the first vertex of a path using script?

I found the command:

// SetFirstVertex
app.executeCommand(2768);

But I don't know how to select a vertex using script.

Any Suggestions?

This topic has been closed for replies.

1 reply

Mathias Moehl
Community Expert
Community Expert
October 18, 2021

I guess you have to

1) read the value of the shape property

2) in the resulting Shape Object change the arrays for points, inTangents and outTangens as needed. (I.e. if the 4th vertex should become the first one, remove the first three from the beginning of the arrays and append them at the end again)

3) set the value of the shape property to your modified shape object.

 

 

Mathias Möhl - Developer of tools like BeatEdit and Automation Blocks for Premiere Pro and After Effects