Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Changing the order of the properties using extendscript.

  • Changing the order of the properties using extendscript.

    Posted by Andrei Popa on April 21, 2017 at 2:34 pm

    Hi there folks.
    I am creating a project in which i try to make all the letters of the alphabet as shapes and reveal them using “Trim Paths”. I did the create part and added the Trim Paths. The problem is that i need the Trim Paths to be right before the Merge Paths property in each letter, so all the lines start at the same time. Currently they start consecutively.
    I tried something similar to the layer moveBefore function but it does not work.
    The example here is for the B character.
    The B content consists in 3 Paths. The exterior of the character and the 2 inner shapes.

    myTrimPath = app.project.activeItem.layer(2)("Contents")("B")("Contents").addProperty("ADBE Vector Filter - Trim");
    myTrimPath.moveBefore(app.project.item(19).layer(2)("Contents")("B")("Contents")("Merge Paths 1"));

    Andrei Popa replied 9 years ago 2 Members · 2 Replies
  • 2 Replies
  • Xavier Gomez

    April 21, 2017 at 3:08 pm

    For properties, there is no moveBefore/moveAfter method, it is:

    myProperty.moveTo(newPropertyIndex).

    var trimPaths = app.project.activeItem.layer(2)(“Contents”)(“B”)(“Contents”).addProperty(“ADBE Vector Filter – Trim”);
    var mergePaths = app.project.item(19).layer(2)(“Contents”)(“B”)(“Contents”)(“Merge Paths 1”);
    trimPaths.moveTo(mergePaths.propertyIndex);

    Xavier

  • Andrei Popa

    April 22, 2017 at 7:35 am

    Thank you very much Xavier.

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