Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Collect all layers’ property value

  • Collect all layers’ property value

    Posted by Dan Turner on February 8, 2017 at 11:49 am

    Hi! So I am trying to animate a slider, based on the time remapping velocity values of the layers below it.

    I’m looking for something along the lines of:

    thisComp.layer(**All Layers**).timeRemap.speed

    If anyone can help it would be much appreciated!

    Thanks
    Dan

    Dan Turner replied 9 years, 2 months ago 2 Members · 4 Replies
  • 4 Replies
  • Dan Ebberts

    February 8, 2017 at 7:55 pm

    I’m not sure what you’re trying to do, but this would give you the layer directly below the layer with the expression:

    thisComp.layer(index+1).timeRemap.speed

    Dan

  • Dan Turner

    February 8, 2017 at 11:15 pm

    Thanks Dan, I’m actually looking to add together the values of ALL the layers below it.

    So index+1,100 or something (assuming that would add all in that range), but it will probably require a qualifier for layers that have time remapping applied.

  • Dan Ebberts

    February 9, 2017 at 12:04 am

    This might work:


    tot = 0;
    for (i = index+1; i <= thisComp.numLayers; i++){
    try{
    tot += thisComp.layer(i).timeRemap.speed;
    }catch(e){
    }
    }
    tot

    Dan

  • Dan Turner

    February 9, 2017 at 9:44 am

    Ah fantastic – that did work a treat, thanks Dan.

    It did run me into another problem however.

    I am trying to animate the rotation of an object based on the time remap properties of the other layers, so as they speed up, the rotation also speeds up etc.

    However, when using the speed value , it works when the value is increasing, but as the velocity value decreases the object returns to it’s original position.

    So I guess I need an accumulating only value – perhaps using a valueAtTime property, but I’m afraid it’s beyond me!

    Any suggestion much appreciated!

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