Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Expressions for shapes

  • ayat fatima

    November 22, 2020 at 4:14 am

    Var shapeGroup = shapeLayer.property(“Contents”).addProperty(“ABDE Vector Group”);

    Var num=5;

    Var s=200.0;

    For(var i = num; i<=num; i++)

    .{

    CreateEllipse(shapeGroup, 100);

    ;

    .}

    Function CreateEllipse(shapeGroup, size)

    {

    Var ellipse=shapeGroup.Property(“Contents”).addPropertt(“ABDE Vector Shape – Ellipse”);

    Var ellipseSize=ellipse.property(“size”).setValue([size, size]);

    Var myProperty = shapeLayer.position;

    MyProperty.setValue ([s, 450,0]);

    S=s+200.0

    }

    I’m using this code to create 5 shapes in one layer using loop. But it is creating only one shape in the shape layer… Can anybody help me that why is it heppening?

  • Peter Robertson

    November 22, 2020 at 6:48 am

    Hi

    Your expression

    For(var i = num; i<=num; i++)

    Is starting its count at 5 so it can’t loop any more.

    You should have

    For(var i = 0; i<=num; i++)

    Peter

  • ayat fatima

    November 22, 2020 at 11:37 am

    TThank You so much for your time…

    I’ve corrected the mistake but still it is not working.

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