Skip to main content
New Participant
March 6, 2020
Answered

Json files and sourceText issue

  • March 6, 2020
  • 1 reply
  • 564 views

Hi ,I have been working with json files inside my AE Project ,i get the data inside the json file this way:

thisComp.layer("Bullets.json")("Datos")("Outline")("Number")("Numero_3").value

That returns into the sourceText Proeprty in my text layer the value ("Bullet 3") with the style in the character windows pressets but i want to drive the source text with expression like this text.sourceText.createStyle().setFontSize(300).setFont("Impact");

But when I preview the the Comp the text just disapear.

 

This topic has been closed for replies.
Correct answer Adirai Maji

Just create a variable for the line which returns actual text.

and the last line apply it inside the setText property of style.

 

 

myText = thisComp.layer("Bullets.json")("Datos")("Outline")("Number")("Numero_3").value;

createStyle().setText(myText).setFontSize(300).setFont("Impact");

 

This should work.

1 reply

Adirai Maji
Adirai MajiCorrect answer
Inspiring
March 9, 2020

Just create a variable for the line which returns actual text.

and the last line apply it inside the setText property of style.

 

 

myText = thisComp.layer("Bullets.json")("Datos")("Outline")("Number")("Numero_3").value;

createStyle().setText(myText).setFontSize(300).setFont("Impact");

 

This should work.