This is a personal project about F1 Champions, where each video corresponds to a decade of champions. So, 7 decades, 7 videos, 1 AE project file with a single controller layer. That's the idea.
I had 7 JSON files corresponding to each decade and I wanted to use the control layer name as a source which would pull data automatically from the JSONs
The layer names for each driver was in the format driver_0, driver_1, driver_2 etc where I use the number as index later on while accessing the data from the JSON. The code line that that accesses the data is this:
var driverNameinJSON = comp("F1_Rig") . layer(thisJSON) ("Data") ("Outline")(thisYear) ("Driver_1") ("Driver") . split(" ");
thisJSON and thisYear are set based on the control layer name and the index from current layer name (driver_0, driver_1 etc.,).
I just have to write the code for one name and for one year, copy and paste this on all the driver layers and voila, we have a rig that updates all the names for each decade.
This was one of my most favourite parts to work on. I had all the circuits in one composition and I wrote a code to pick a circuit based on a slider.
And I used another slider in controller layer as a seed for random choice so we just have to change the random seed value and the circuits, and their names update automatically.
Here comes the final part of the puzzle. This is the end card. This scene also takes the control layer name as input and updates the years, and the car in the background.
And that's it. Here's a functional rig that just needs one controller layer to produce 7 different videos.
Thank you for reading this :)