ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

Time Remap Expression for Versioning

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Bobby Bowry
Time Remap Expression for Versioning
on Feb 12, 2020 at 11:08:54 am

Hello,

I did the School Of Motion, Advanced Motion Methods course, and Sander Van Dijk uses an expression in it where you can change the frame in a comp shown by using an expression on the time re-map which reacts to the comp name. This is really handy for versioning and localising projects.

For example, if you changed the title from 'DE' to 'UK' it would change it from German to English.

When I first inputted the expression, it worked, however when I change the comp name to change the title, I get the error notification in the image. I hope this makes sense, let me know if it doesn't, and thanks in advance!

(btw, the course has now finished hence why I can't get any of their support.)





n = thisComp.name.split(" - ")[1];
if(n == "US"){0};
if(n == "UK"){1};
if(n == "CA"){2};
if(n == "QC"){3};


Return to posts index

Dan Ebberts
Re: Time Remap Expression for Versioning
on Feb 12, 2020 at 2:22:00 pm

In your screenshot, it appears that the first line of your expression is:

n = thisComp.name.split("-")[1];

not

n = thisComp.name.split(" - ")[1];

which means that the value of n would be " CA" not "CA" (without the quotes of course). In any case I think the problem is in the first line not matching up with the way the comp name is formatted.


Dan



Return to posts index

Bobby Bowry
Re: Time Remap Expression for Versioning
on Feb 14, 2020 at 4:55:54 pm

Thanks for your help Dan!

I've tried taking the spaces away on the comp name (Main-CA) and in the expression "-" and I'm still getting the same error weirdly. Not sure if there's something else I'm doing wrong.

The top line of the expression works fine when it's just a number so it's definitely to do with reading the 2 letters in the title.



Return to posts index

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