Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Forums Adobe After Effects Expressions Join seperate mask paths together via ExtendScript

  • Join seperate mask paths together via ExtendScript

  • Emre Mutlu

    July 25, 2022 at 7:32 am

    Hi there,

    I want to add start and end vertices on a specific location and join them with the another mask path which i’ve created to create a single mask path. How can i achive it with script?

  • Andrei Popa

    July 26, 2022 at 10:56 am

    Did not test this function, but it should work. Save the values of your paths in an array and then use the function. It should return a path object that is the result of concatenating all the paths in the array, in order.

    function pastePathForArray(arrayOfPaths) {
    var finalPath = new Shape();
    for (var i = 0; i < arrayOfPaths.length; i++) {
    finalPath = pastePath(finalPath, arrayOfPaths[i]);
    return finalPath;
    function pastePath(path1Value, path2Value) {
    var bothPaths = new Shape;
    bothPaths.vertices = path1Value.vertices.concat(path2Value.vertices);
    bothPaths.inTangents = path1Value.inTangents.concat(path2Value.inTangents);
    bothPaths.outTangents = path1Value.outTangents.concat(path2Value.outTangents);
    return bothPaths;

  • Emre Mutlu

    July 29, 2022 at 6:27 am

    I’ll try it. Thank you Andrei.

Viewing 1 - 3 of 3 posts

Log in to reply.

We use anonymous cookies to give you the best experience we can.
Our Privacy policy | GDPR Policy