Copy link to clipboard
Copied
Under paragraph menu, there is an option to align text to the left, center or right. There is also an option to justify text.
How can this me done with expressions or Extendscript?
I noticed that if I set Anchor point to the top left, additional text added on the same line is left aligned. If I set anchor point to the left-center, all the lines added in the future are left justified, but current text remains as it is. Align options under paragraph don't move anchor point and also work for the text already typed.
I guess you could save the text, delete it, move anchor point, paste the text back and move anchor point back where it was to achieve the same effect. But there is probably a better way?
These options are not accessible with expressions. They are part of the text panel and stored in teh source text compound keyframes, not as separate properties. therefore the only way to address them programmatically is to use scripts. Check the script help for the various properties. Otherwise one would simply use text animators to create the illusion.
Mylenium
Copy link to clipboard
Copied
These options are not accessible with expressions. They are part of the text panel and stored in teh source text compound keyframes, not as separate properties. therefore the only way to address them programmatically is to use scripts. Check the script help for the various properties. Otherwise one would simply use text animators to create the illusion.
Mylenium
Copy link to clipboard
Copied
Hi Tim Sx
With Extendscript you can justify the following way:
var myLay = yourTextLayerGoesHere;
var txtProp = myLay.property("Source Text");
var txtDoc = txtProp.value;
txtDoc.justification = ParagraphJustification.CENTER_JUSTIFY; // change here to the value you need based on the list below
txtProp.setValue(txtDoc);
The justification can be any of the below options:
ParagraphJustification.LEFT_JUSTIFY
ParagraphJustification.RIGHT_JUSTIFY
ParagraphJustification.CENTER_JUSTIFY
ParagraphJustification.FULL_JUSTIFY_LASTLINE_LEFT
ParagraphJustification.FULL_JUSTIFY_LASTLINE_RIGHT
ParagraphJustification.FULL_JUSTIFY_LASTLINE_CENTER
ParagraphJustification.FULL_JUSTIFY_LASTLINE_FULL
I hope this helps.
Cheers
Henrique
Copy link to clipboard
Copied
Thank you both. I am learning so much.
Copy link to clipboard
Copied
In Ae ver. 2020 some new text properties were added in the expressions menu:
https://helpx.adobe.com/after-effects/using/expressions-text-properties.html
I still can't find a way to control the paragraph direction via code 🤔
Am I missing something or is it still not possible?
Copy link to clipboard
Copied
This is currently in the beta verson of AE 2025.
Paragraph styling in Expressions is now available for testing and feedback. Try it now in After Effects (Beta).
In addition to text style attributes, there are also paragraph attributes. These can only be applied to the entire Text layer. The paragraph attributes are only available in After Effects (Beta).