Linking text color and and layer transparency.
-
What’s the best way to link text color and layer opacity to a json file? I’ve been using the plug-in mamoworld.json, it’s nice, but when I set it up for Templater, the link breaks. I get this error… Error: TypeError: Cannot read property ‘1’ of null.
Not really sure how to fix the problem or if there’s just a better way to do this.
-
Here’s what my json file looks like.
Here’s the warning I get to all of my layers that’s linked to the json file:
-
@darrencase I’m not familiar with how that script works. Are you using the same data for both that script and Templater?
I think Arie linked you to our using data in expressions support page. Long and short, you can bring in values to your project as text in a text layer, then
parseInt()
(for numerical data) the sourceText of that text layer to use in numerical expressions on other layers. You can also do this directly with JSON data imported into AE, but be aware that AE’s JSON import support is actually finicky and prone to breaking in one particular way that makes it problematic for Templater (though I’m not sure that what you’re dealing with is the same issue). -
@Jon yeah Templater and AE are using the same json file. I’ve been dealing with a lot of “not a valid json” errors. This whole live data animation project has been very frustrating. Thanks so much for all your help!
I just started reading about parseInt(). Not being a developer, it all goes over my head pretty quickly haha. But it’s slowly starting to click.
-
SOLVED, kind of haha.
I’ve been using the double curly brackets in the JSON file to trigger the layer’s visibility. “layer_name”: “{{off}}”,
So far so good.Still trying to link text color to the JSON file.
-
@darrencase There are several ways to set text color. We’ve got a sample project on our GitHub repo that demonstrates one of the ways, but there are others as well.