Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Forums Adobe After Effects Expressions Finding Count of Shapes (Shape Elements) in a Shape Layer

  • Finding Count of Shapes (Shape Elements) in a Shape Layer

  • Patrick Grossien

    June 24, 2022 at 1:35 pm

    Hello smart folk,

    is there any way how I can count the amount of shapes in a shape layer? I have shape layers which contain an X amount of squares. I can address the fill of each shape for example by counting through x:

    thisLayer.content(x).content("Fill 1").color;

    But how do I find out the maximum number of “content”?

    (I did not group the shapes so I can count trough easier; so there’s no sub groups.)

    Any idea?

    Thx a ton

    Patrick

  • Dan Ebberts

    June 24, 2022 at 1:59 pm

    Try this:

    thisLayer.content.numProperties
  • Patrick Grossien

    June 24, 2022 at 2:08 pm

    aaaah! I tried the “numProperties” reference before, but it didn’t work (gave me a number that wasn’t correct). Maybe I had it linked wrong or some other reference before or between layer and content.

    Thanks Dan, you’re a life saver! This totally did it!

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