Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions After Effects Effects Properties setting scripting.

  • After Effects Effects Properties setting scripting.

    Posted by Jace Bradley on April 19, 2023 at 12:10 am

    I am trying to create a simple animation and change a setting on the stroke effect. But the following function is only applying the effect itself but not setting keyframes and animating it and also not changing the Paint Style to “Reveal Original Image”. What am I doing wrong ? Thank you very much.

    // Set brush hardness and paint style


    strokeEffect.property(“Brush Hardness”).setValue(100);

    strokeEffect.property(“Paint Style”).setValue(2); // Set to “Reveal Original Image”

    strokeEffect.property(“Path”).setValue(maskPath);

    // Set keyframes for the “End” property

    var startTime = comp.time;

    var endTime = comp.time + 1;

    var endProp = strokeEffect.property(“End”);

    endProp.setValueAtTime(startTime, 0);

    endProp.setValueAtTime(endTime, 100);

    }

    Dan Ebberts
    replied 1 year, 11 months ago
    2 Members · 1 Reply
  • 1 Reply
  • Dan Ebberts

    April 19, 2023 at 6:34 am

    This works for me:

    var comp = app.project.activeItem;
    var strokeEffect = comp.layer(1).property("Effects").property("Stroke");
    strokeEffect.property("Path").setValue(1); // set to "Mask 1"
    strokeEffect.property("Paint Style").setValue(3); // set to "Reveal Original Image"
    var startTime = comp.time;
    var endTime = comp.time + 1;
    var endProp = strokeEffect.property("End");
    endProp.setValueAtTime(startTime, 0);
    endProp.setValueAtTime(endTime, 100);

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