Highlighted

Create layers/comps based on JSON

New Here ,
Sep 25, 2020

Copy link to clipboard

Copied

Hi everyone!

I'm looking to make an instruction template using JSON in the style of How-To videos.

 

I have been doing this manually but it's very repetitive and got me wondering if this could be done as expressions and gathering the data from an external source file. 

For the most part this is a slideshow with some slides having various steps inside it, I would like to make the template adapt depending on how many items there are in the instructions. 

 

I've made a sample of the JSON file structure, but I foresee it containing stages slides and steps. A finally thought; I imagine at the level of the step: images and description texts could be null (interchangeable).

 

I imagine the data structure to be something like this:

 

{
	"instructionTitle":  "how to make a self-populating video",
	"mainImg": "%pathtoimg%/main.png",
	"stages": {
		"slide":{
			"step": {
			   "duration"; 100,
			   "img": "%pathtoimg%/0100.png",
			   "text": "Start with  JSON file",
			}
			"step":{
				"duration"; 400,
				"img": "%pathtoimg%/0102.png",
				"text": "Scratch your head",
			}
		  }
		"slide":{
			"step": {
			   "duration"; 800,
			   "img": "%pathtoimg%/0200.png",
			   "text": "Ask for help",
			}
		}
	}
}

 

 

What I'd like to know is, is it possible to count the stages and create comps based on the number of stages, import the images based on the image count etc?

Most Valuable Participant
Correct answer by Mylenium | Most Valuable Participant

Expressions cannot create anything, so this is utterly moot in the first place. If you really have to use this so much, finsd a script on AEScripts.com or write your own.

 

Mylenium

TOPICS
Expressions, How to, Resources, Scripting

Views

73

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

Create layers/comps based on JSON

New Here ,
Sep 25, 2020

Copy link to clipboard

Copied

Hi everyone!

I'm looking to make an instruction template using JSON in the style of How-To videos.

 

I have been doing this manually but it's very repetitive and got me wondering if this could be done as expressions and gathering the data from an external source file. 

For the most part this is a slideshow with some slides having various steps inside it, I would like to make the template adapt depending on how many items there are in the instructions. 

 

I've made a sample of the JSON file structure, but I foresee it containing stages slides and steps. A finally thought; I imagine at the level of the step: images and description texts could be null (interchangeable).

 

I imagine the data structure to be something like this:

 

{
	"instructionTitle":  "how to make a self-populating video",
	"mainImg": "%pathtoimg%/main.png",
	"stages": {
		"slide":{
			"step": {
			   "duration"; 100,
			   "img": "%pathtoimg%/0100.png",
			   "text": "Start with  JSON file",
			}
			"step":{
				"duration"; 400,
				"img": "%pathtoimg%/0102.png",
				"text": "Scratch your head",
			}
		  }
		"slide":{
			"step": {
			   "duration"; 800,
			   "img": "%pathtoimg%/0200.png",
			   "text": "Ask for help",
			}
		}
	}
}

 

 

What I'd like to know is, is it possible to count the stages and create comps based on the number of stages, import the images based on the image count etc?

Most Valuable Participant
Correct answer by Mylenium | Most Valuable Participant

Expressions cannot create anything, so this is utterly moot in the first place. If you really have to use this so much, finsd a script on AEScripts.com or write your own.

 

Mylenium

TOPICS
Expressions, How to, Resources, Scripting

Views

74

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
Sep 25, 2020 0
Most Valuable Participant ,
Sep 25, 2020

Copy link to clipboard

Copied

Expressions cannot create anything, so this is utterly moot in the first place. If you really have to use this so much, finsd a script on AEScripts.com or write your own.

 

Mylenium

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...
Sep 25, 2020 1
New Here ,
Sep 25, 2020

Copy link to clipboard

Copied

Thanks, Mylenium for your quick response.   I figured that was the case, I have spent most of the morning trying to find if it was possible but never concretely finding what I wanted to know.  Thanks again for the support. 

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...
Sep 25, 2020 0
Adobe Community Professional ,
Sep 26, 2020

Copy link to clipboard

Copied

Yes, expressions cannot do that but scripts can.

 

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...
Sep 26, 2020 0
Adobe Community Professional ,
Sep 26, 2020

Copy link to clipboard

Copied

Tenplater is probably the most powerful option you have
https://aescripts.com/templater/

 

For an overview of alternatives see the "Is Text2Spreadsheet the right tool for me?" section in the product page of my script Text2Spreadsheet here

https://aescripts.com/text2spreadsheet/

 

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...
Sep 26, 2020 1