Highlighted

Can I use a Json file to create and place obects?

New Here ,
Apr 24, 2020

Copy link to clipboard

Copied

I am to visualize and animate data within after effects.

 

I am trying to place (x,y coordinates) thousonds of objects within a sequence. is it possible to create objects automatically by using a Json file (or possible another method)? I want to avoid creating the objects and then using an expression to link them back to the Json file. 

 

I may have to use different software.

Topics

How to, Import and export, Scripting

Views

397

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

Can I use a Json file to create and place obects?

New Here ,
Apr 24, 2020

Copy link to clipboard

Copied

I am to visualize and animate data within after effects.

 

I am trying to place (x,y coordinates) thousonds of objects within a sequence. is it possible to create objects automatically by using a Json file (or possible another method)? I want to avoid creating the objects and then using an expression to link them back to the Json file. 

 

I may have to use different software.

Topics

How to, Import and export, Scripting

Views

398

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Apr 24, 2020 0
Guide ,
Apr 24, 2020

Copy link to clipboard

Copied

You cannot create those objects with expressions/json but with scripting only.

With expression/json you can just alter objects, which are already there.

 

*Martin

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Apr 24, 2020 2
New Here ,
Apr 26, 2020

Copy link to clipboard

Copied

Thanks, Martin.

This clarifies that I should use another software to create the objects. 

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Apr 26, 2020 0
Adobe Community Professional ,
Apr 24, 2020

Copy link to clipboard

Copied

As Martin says, you have to write your own script if you want to automate that.

My free extension mamoworldJSON could help to some extend to create the links, but it would still stay a lot of manual work.

Depending on  the structure of your JSON file, you could also come up with a generic link expression that looks at the layer index.

 

Say your data looks like this

{

data1: value1

data2: value2

...

}

Then link the first layer of your comp to data1 with mamoworldJSON and you will get this expression

mamoworldJSONValue("data1");

...

 

If you replace this by

mamoworldJSONValue("data"+thisLayer.index);

if will use data1 on the first layer, data2 on the second layer etc.

That means you just need to duplicate the first layer as often as needed and don't need to worry about linking each individual layer to the data.

replace in the mamoworldJSON expression of

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Apr 24, 2020 1
Explorer ,
Apr 25, 2020

Copy link to clipboard

Copied

Always keep in mind, that when it comes to 'thousands' of objects/rows within the project, it comes with a price of defficiency, if links are created with expressions.

With scripting, you can improve it N times, literally. The more complex structure, the better improvement will be when it comes to scripting vs expressions. Something to consider going deeper into this.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Apr 25, 2020 0