Set Values for AE Infographic Comps with Templater
-
Hi @Ben-Forman!
While I personally have not used Essential Graphics panel with Templater, you should be able to do this by using some kind of numerical expression control that you can add to Essential Graphics. That expression control can be driven by data read by Templater from your data source.
Have you had an opportunity to read this article in our knowledge base about using Templater data in expressions?
Does this help? Would love to learn about the results you get.
-
@ariestav at a high level this makes sense but I’m getting lost pretty quickly when trying to implement.
Is there a video tutorial?
-
@Ben-Forman Unfortunately, we don’t have a video tutorial on this, but we do have plans to produce more this year.
My suggestion is to create a simple project with one layer that has an expression which uses data Templater is reading, and see how you can push that technique from there.
Our support team can help you along the way — the documentation does outline how to get data from Templater into an expression. Also, please check out some very rudimentary pre-rigged projects in our GitHub repository (you can download them) and inspect the layers that have expression enabled. I think you will gain insight into how it can be implemented. In particular, check out the
drive-test-color
project folder which shows how you can use Templater data to drive color of text. -
I’ll take a look at those.
In this article there are code snippets for pieces of the expressions. What would the full expression codings be?
-
Ben,
I’ve been doing some testing with the Essential Graphics panel and how it interacts with Templater, and while I think you can use Templater to set the graph variables, you’ll most likely have to do it in the timeline directly.
If you right-click on the value that you want to change in the Essential Graphics panel and choose “Reveal in Timeline” that should display the value in the project that is controlling the graph size. Once you know the location of that value, you should be able to get more direct access to changing it.
First, you’d want to add a text object to the project and apply Templater to it. This will be the value you’ll change in the graph setting, so 25, 70, etc. Next, you’ll want to customize the Expression in the field we found earlier by clicking on the value while holding the Alt or Options key.
Once you’ve got access to that line, you’ll want to add a reference to the variable you brought in previously. In a test, I used something like:
parseInt(thisComp.layer("<variable layer name>").text.sourceText)
This replaces the value in that layer with the number that was brought in earlier. It’s a bit tricky, but those are the basics of using Templater to designate a variable in a project. It’s hard to give specific instructions without direct access to the file, but hopefully, that should get you started. If you have any other questions, please just let us know.
One final note. Once an expression is controlling the layer, you’ll no longer be able to change the value using the Essential Graphics panel.
-
@Jeff it’s working! Thanks!
-
Arie and Jeff,
Can I do this to call in complete comps ?? Or is there another way to call in complete comps from the same AEP?
-
Yes, in the data source, when you want to use an existing composition, write the comp name in the cell and wrap double braces around it.
Let say you have some animated pre comps of icons in the AEP. Maybe three comps named, “icon-email”, “icon-finish”, and “icon-web”. To reference them for a dynamic pre-comp layer, in the data source you would write their names in the cell, but with double braces. So in the data source, you would reference them like {{icon-email}}, {{icon-finish}}, {{icon-web}}.
We call these flags, and they are documented here:
Let us know if this helps!
-
Wow - can’t wait to try this!
-
Can you remind me the syntax to do this with HEX color codes properly?
-
Sure! You can use a few different Expressions, but the basics are relatively similar.
For solids, the mapping is automatic, so you can apply Templater to a solid and then directly input the hex code you’d like to use in the data source. For other layers, the process is a bit more complex. First, you’ll want to create a text layer with the Templater Effect applied and map it to your data source. For the purposes of this example, we’ll call that layer “color” (with no quotes).
Next, you’ll want to add the “Fill” effect to the layer whose color you want to change. Finally, you’ll want alt/option click the “Color” value of the “Fill” effect and add this expression:
hexToRgb(""+thisComp.layer("color").text.sourceText+"")
This should change the value of the “Fill” effect to the hex code brought into the “color” text layer.
Hopefully, that’s enough to get you started, but if you have any issues or additional questions, feel free to let us know.
Thanks!