Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Getting all the shape layers

  • Getting all the shape layers

    Posted by Kabo Lam on September 18, 2017 at 11:58 am

    Hi,
    Is there any way I can call out the shape layers in my comp?
    something like:

    if(thisComp.this is a shape layer){
    sum up all the shapelayer.content(“rectangle 1”).size
    }else{ do nothing
    };

    Always learning

    Kabo Lam replied 8 years, 8 months ago 2 Members · 2 Replies
  • 2 Replies
  • Dan Ebberts

    September 18, 2017 at 1:09 pm

    Some variation of this, probably:


    sz = [0,0];
    for (i = 1; i <= thisComp.numLayers; i++){
    try{
    sz += thisComp.layer(i).content("Rectangle 1").content("Rectangle Path 1").size;
    }catch(e){
    }
    }
    sz

    Dan

  • Kabo Lam

    September 19, 2017 at 7:58 am

    Thanks you so much Dan Ebberts, it works great!

    Always learning

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