ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

cycling layers

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Vojtěch Palme
cycling layers
on Mar 19, 2020 at 5:31:58 pm

Helo, I need an elegant solution for a template I work with daily.
There are 3 lines (today, tomorrow, Day) each with time and name and description that I have to fill out. And for each version of this template, I must open the latest one, and copy-paste each individual text field to the line above (old today disappears, tomorow data goes to today..).
I don't think there is a way to move the text source alone, at least not if I keep making new and new versions of the template for every day. But since the lines look the same there might be a way to move them with a slider for example. So when I was to add 1 to the slider value, 2nd and 3rd line would move a position higher and the top one would go to the bottom and it would be the only one I'd have to rewrite.
any suggestions?

Return to posts index

Andrei Popa
Re: cycling layers
on Mar 22, 2020 at 8:35:10 am

What I suggest you do is make a csv, tsv or json file and use it to populate your text fields. You can easily make csv and tsv with google sheets.

This post shows you how to use them inside after effects.

You can put the day in column 1 and the text for that day in column 2.
If you have multiple text layers for each day, you can even use more columns.

Then, with a slider inside after effects you select the day.
And with some expression inside each text layer you can get the before and after day text(by replacing myDay with myDay-1 or myDay-2). They should look similar to this:

myDay = thisComp.layer("Controls").effect("Slider Control")("Slider")

With this setup, all you have to do is open After Effects, change slider and render.
And you have all past days and unlimited future days saved inside a file.

If you wish me to help you with the setup, you can contact me and we can work something out.

My Envato portfolio.

Return to posts index

Vojtěch Palme
Re: cycling layers
on Mar 25, 2020 at 2:18:48 pm

Thank you, this was an approach I used the first time I was in the mood for tackling this issue a few months ago. I think it worked quite well with the exception of numbers starting with zero - the minutes field, that is a separate layer from hours. It would always load without it - 08 : 05 would load as 8 : 5
I don't think I've managed to resolve it before but I'm gonna try again.

Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2020 All Rights Reserved