Dataclay — Automating Digital Production
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Register
    • Login

    Linking text color and and layer transparency.

    Scheduled Pinned Locked Moved
    Data Sources
    2
    6
    656
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • darrencaseundefined
      darrencase
      last edited by

      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.

      1 Reply Last reply Reply Quote 0
      • darrencaseundefined
        darrencase
        last edited by

        Here’s what my json file looks like.

        Screen Shot 2019-12-13 at 4.09.07 PM.png

        Here’s the warning I get to all of my layers that’s linked to the json file:

        Screen Shot 2019-12-13 at 4.12.19 PM.png

        Jonundefined 1 Reply Last reply Reply Quote 0
        • Jonundefined
          Jon @darrencase
          last edited by

          @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).

          darrencaseundefined 1 Reply Last reply Reply Quote 0
          • darrencaseundefined
            darrencase @Jon
            last edited by

            @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.

            1 Reply Last reply Reply Quote 0
            • darrencaseundefined
              darrencase
              last edited by

              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.

              Jonundefined 1 Reply Last reply Reply Quote 0
              • Jonundefined
                Jon @darrencase
                last edited by

                @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.

                1 Reply Last reply Reply Quote 0
                • First post
                  Last post