Issue:
setJustification() is broken if it is set after setText().
Solution:
Allow setJustification() to control paragraph alignment, irrespective of setText().
Adobe After Effects version number
25.xx
Operating system
Mac/Win
Steps to reproduce
This expression controls the Justification from a Dropdown Menu control and ignores the layer's Properties > Paragraph settings.
var myString = "myText" + "\r" + "on a new line";
var menu = effect("Dropdown Menu Control")(1);
var myArray = ["alignLeft", "alignCenter", "alignRight"];
text.sourceText.style
.setText(myString)
.setJustification(myArray[menu - 1])


If you reverse the order of the final 2 lines, the Justification does not update from the Dropdown Menu but can still be controlled from the layer's Properties > Paragraph tab.
var myString = "myText" + "\r" + "on a new line";
var menu = effect("Dropdown Menu Control")(1);
var myArray = ["alignLeft", "alignCenter", "alignRight"];
text.sourceText.style
.setJustification(myArray[menu - 1])
.setText(myString)


Expected result
The order of these text style methods should not matter, because they are affecting 2 different properties (i.e. text string contents & paragraph alignment). If setJustification() is being used, it should be the sole control of the justification. You should not be able to override setJustification() from the layer's Properties > Paragraph tab.
Actual result
Described above, the justification is ignored.
How will the idea help your workflow?
It is common to combine both setText() and setJustification() in AE templates. Users are unlikely to stumble upon the correct order of operations organically, and would expect setJustification() method is broken.
Fixing this bug should not break older workflows and simply allows more flexiblity & ease of use moving forward.
Enlist support!
Vote on this fix~!