Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Adding a shape to shape layer

  • Dan Ebberts

    October 14, 2012 at 8:21 pm

    Try this:

    var shapeLayer = currentComp.layers.addShape();
    var shapeLayerContents = shapeLayer.property(“Contents”);
    var shapeGroup = shapeLayerContents.addProperty(“ADBE Vector Group”);
    var ellipse = shapeGroup.property(“Contents”).addProperty(“ADBE Vector Shape – Ellipse”);

    Dan

  • Sébastien Lavoie

    October 14, 2012 at 8:38 pm

    Excellent! This works perfectly, thanks a lot!

  • Hugo Tait

    December 27, 2013 at 12:24 pm

    I’ve got my script to add the shape vectors in a shape layer but I can’t find out how to get it to add a fill. can you point me in the right direction?

  • Dan Ebberts

    December 27, 2013 at 6:34 pm

    From your shape layer, assuming you have already added the “ADBE Vector Group” and the “ADBE Vectors Group” properties, it should look like this:

    myShapeLayer.property(“ADBE Root Vectors Group”).property(“ADBE Vector Group”).property(“ADBE Vectors Group”).addProperty(“ADBE Vector Graphic – Fill”);

    Dan

  • Sébastien Lavoie

    December 27, 2013 at 6:39 pm

    You will want to use the .addProperty("ADBE Vector Graphic - Fill") method. As in…

    var shapeLayer                  = currentComp.layers.addShape();  
    var shapeGroup                = shapeLayer.property("Contents").addProperty("ADBE Vector Group");
    var fill = shapeGroup.property("Contents").addProperty("ADBE Vector Graphic - Fill")
    

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