Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions expression for for setting automatic ins and outs of layers?

  • expression for for setting automatic ins and outs of layers?

    Posted by Gordon Bush on January 28, 2013 at 9:49 pm

    Hi Girls and Guys,

    i am currently working on a project, where i encountered a prob and thought if it could be solved using expressions. Here is what i have: Ive got one layer with a movie clip, which has been edited in premiere, with a lot of cue points, also set in premiere.

    i also have a lot of images on, let’s say, layer 1 to layer 100. The image layers ins and outs need to be adjusted according to the cue points, so that i have image layer 1 ranging from cue 1 to cue 2, image layer 2 ranging from cue 2 to 3 and so on.

    Doing this by hand needs a lot of work and i thought if this can be solved using an expression or script which does exactly that, check the cuepoints and place the imagelayers with the correct duration. Can anyone help me on this topic? Any help is appreciated.

    Gordon Bush replied 13 years, 3 months ago 2 Members · 2 Replies
  • 2 Replies
  • Dan Ebberts

    January 28, 2013 at 11:08 pm

    Assuming the layers you want to control start at layer 1 and are comp-length, the movie with the cues is named “movie”, each cue corresponds to a layer marker on “movie”, and there are no other markers, this opacity expression should work:


    m = thisComp.layer("movie").marker;
    if (m.numKeys > index){
    t1 = m.key(index).time;
    t2 = m.key(index+1).time;
    (time >= t1 && time < t2) ? 100 : 0
    }else
    0

    If you actually want to trim the layers, that would require a script.

    Dan

  • Gordon Bush

    January 28, 2013 at 11:34 pm

    Hey Dan,

    many thanks for this quick help. I will try this immediately when i’m back at my desk tomorrow morning!

    Best,
    Gordon

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