FORUMS: list search recent posts

Possible to execute sequential linear calls

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Josh Peters
Possible to execute sequential linear calls
on Mar 8, 2016 at 5:17:11 am

Basically I'm trying to templatize some really simple moves for a bulk project. The concept is to use linear to build in animations based off the in/out point of a layer. The code below is just playing around at the moment but I can't figure out a way to get it to execute more than one linear command, is this possible?

key1=inPoint;
key1end=inPoint+.3;
key2=outPoint;
key2end=outPoint-.3;
Width=width*scale/100;
posx=640-(Width[0]+Width[0]/2);


linear(time, key1, key1end, [posx, 360],[640,360]);

linear(time, key1end, key2end, [640, 360],[850,360]);


Return to posts index

Dan Ebberts
Re: Possible to execute sequential linear calls
on Mar 8, 2016 at 7:28:10 am

You have to combine them such that only one of them executes, so the last part would be like this:


if (time < key1end)
linear(time, key1, key1end, [posx, 360],[640,360])
else
linear(time, key1end, key2end, [640, 360],[850,360]);



Dan



Return to posts index

Josh Peters
Re: Possible to execute sequential linear calls
on Mar 8, 2016 at 4:28:06 pm

Thanks Dan! I needed to get multiple else if statements in there and I think I was just structuring my conditionals incorrectly, what I posted below seems to be working pretty well. Now it's just a matter of building in some variables for positions.

key1=inPoint;
key1end=inPoint+.3;
key2=outPoint;
key2end=outPoint-.3;
Width=width*scale/100;
posx=640-(Width[0]+Width[0]/2);


if (time &lt;= key1end && time>=key1)
linear(time, key1, key1end, [posx, 360],[640,360])
else if (time>key1end && time&lt;=key2end)
linear(time, key1end, key2end, [640, 360],[850,360])
else if (time>key2end && time&lt;=key2)
linear(time, key2end, key2, [850, 360],[1050,360])


Return to posts index

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