ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

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

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Gerald Mark Soto
Controller Layer Scale In & Out, on a layers in & out point, ??
on Dec 21, 2017 at 5:43:21 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}


Return to posts index

Dan Ebberts
Re: Controller Layer Scale In & Out, on a layers in & out point, ??
on Dec 21, 2017 at 7:02:22 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



Return to posts index

Gerald Mark Soto
Re: Controller Layer Scale In & Out, on a layers in & out point, ??
on Dec 21, 2017 at 7:23:33 pm

You da Man....! +1


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2018 CreativeCOW.net All Rights Reserved
[TOP]