ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

JSON expression project-

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Sam Hall
JSON expression project-
on Aug 25, 2019 at 1:56:50 pm

Hi guys,

I have a recent JSON after effects project that I am trying to hack to fit my purposes. From CSV spreadsheet conversion to JSON I am reading in the text of different Rows into their assigned Text boxes in a after effects composition.

So far the JSON to TEXT BOX is not the issue and works accordingly... I can copy and paste as many new text boxes... link them to the new CSV/JSON fields and it will work just fine.... But the same is not working for the next accompanying

the other side to this JSON magic is that I have 80+ different comps with a different animation inside each one. Which are also activated by the CSV row/JSON field...

So a maximum of 80 comps are ALSO being simultaneously triggered by the JSON BUT it's problem is that only one composition at a time is appearing in the comp...

As soon as I copy and paste an existing comp with "working code" assigned in it, change its name/linking to the JSON.... it doesn't work... after much trial and error (being a newbie to expressions) I realized that this particular expression only works with ALLOWING one comp activated by JSON at a time....

As soon as I disable the expression it works fine just like a composition should... but enabled with the current JSON code... Only one comp can be instructed via the JSON appearing in the comp.


My goal is to introduce new comps that are triggered by new fields that I will add to the JSON code as I go along.

posted in the code box are the two entries from the comps - "Time remap" and "Opacity" editor box - I speak of.

I suspect the problem obviously lies with the opacity expression which is on all of my 80+ comps.


-------------

Time remap - loopOut(type = "cycle", numKeyframes = 0)

Opacity - if (thisComp.layer("Group_1off").text.sourceText == (thisLayer.name)) {100} else 0;


---------------------

loopOut(type = "cycle", numKeyframes = 0)

if (thisComp.layer("Group_1").text.sourceText == (thisLayer.name)) {100} else 0;


Return to posts index

Tomas Bumbulevičius
Re: JSON expression project-
on Aug 26, 2019 at 1:21:19 pm

Hey Sam, sorry to hear you have headaches. Take a look at the last post in this thread:
https://forums.adobe.com/thread/2632080

This might give you some ideas how to address the situation. Cheers!

Find out more:
After Effects Tutorials: motion design, expressions, scripting.
Boxer - Dynamic Text Boxes Template with a Live Preview


Return to posts index

Sam Hall
Re: JSON expression project-
on Sep 8, 2019 at 3:22:56 pm

Hi Thomas, thanks for your reply, but that link has nothing to do with my question/problem.

That post points to a bug with JSON/after effects- which i know about and have experienced within my project from trial and error, but I do not believe it's my problem here.

To sum it up, the main problem here is that I am not fully understanding how the expression code written is functioning hence why I am unable to provide a solution. I am a beginner to expressions and this code is a bit too advanced for me. ☹

Many thanks


Return to posts index


Tomas Bumbulevičius
Re: JSON expression project-
on Sep 9, 2019 at 10:13:16 am

Sam, as long as you sure its not about the incorrect JSON mapping, here are my thoughts:

1. Could you clarify what is the difference for these two values below:
if (thisComp.layer("Group_1off").text.sourceText
if (thisComp.layer("Group_1").text.sourceText


What values stands at 'Group_1' and 'Group_1off' fields?

2. What expression you do copy to every new comp and how do you change 'json path' for new comp? Assuming it should be somewhat incremental to access/point to next item.

Find out more:
After Effects Tutorials: motion design, expressions, scripting.
Boxer - Dynamic Text Boxes Template with a Live Preview


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2019 CreativeCOW.net All Rights Reserved
[TOP]