Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Controller Layer Scale In & Out, on a layers in & out point, ??

  • Controller Layer Scale In & Out, on a layers in & out point, ??

    Posted by Gerald mark Soto on December 21, 2017 at 5:43 pm

    I want to have a layer to be controlled by another layer, via the in point & out point. I understand how to make a layer respond to another layers and have it start on its inpoint. But im tryin to make it respond to 2 controllers one pointed to the inpoint and the other to the outpoint. So in the controller layer there is a 3 keyframe animation of a scale up. and in the other controller layer there is a 4 frame scale down. So I want a layer to look at both these scale properties and perform them via inpoint for the scale up and then the outpoint for the scale down. its something like this, but its not working. I also want the animation to all happen within the length of the layer.

    if (time >= inPoint){
    thisComp.layer("Control_Scale_In").transform.scale.valueAtTime(time-(inPoint));
    }
    else
    if (time >= outPoint){
    thisComp.layer("Control_Scale_Out").transform.scale.valueAtTime(time-(outPoint));
    }
    else{scale}

    Gerald mark Soto replied 8 years, 4 months ago 2 Members · 2 Replies
  • 2 Replies
  • Dan Ebberts

    December 21, 2017 at 7:02 pm

    Try this:


    cIn = thisComp.layer("Control_Scale_In").transform.scale;
    dIn = cIn.key(cIn.numKeys).time - cIn.key(1).time;
    cOut = thisComp.layer("Control_Scale_Out").transform.scale;
    dOut = cOut.key(cOut.numKeys).time - cOut.key(1).time;

    if (time < inPoint+dIn){
    cIn.valueAtTime(cIn.key(1).time + time - inPoint);
    }else if (time < outPoint - dOut){
    cOut.valueAtTime(cOut.key(1).time);
    }else{
    cOut.valueAtTime(cOut.key(cOut.numKeys).time - (outPoint - time));
    }

    Dan

  • Gerald mark Soto

    December 21, 2017 at 7:23 pm

    You da Man….! +1

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