Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
6

BUG: setJustification() broken when combined with setText()

Contributor ,
Feb 05, 2025 Feb 05, 2025

Copy link to clipboard

Copied

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])

 

 

setJustify.gifexpand image

 

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)

 

setText.gifexpand image

 

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~!

Bug Investigating
TOPICS
Expressions

Views

268
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
community guidelines

correct answers 2 Pinned Replies

Adobe Employee , Feb 05, 2025 Feb 05, 2025

Hi @_nicdean,
Thanks for the post. I’m Kevin from support, a moderator here.

 

Since I'm not an expert in expressions, we may need the team or a specialist to reply.

 

In the meantime, may the team have more information?It oculd help them reproduce the error more easily.

 

If you have time, see the post, How do I write a bug report? to list the details that would be helpful for us to know in order to solve your problem.

 

I hope the community or the team will respond shortly. Sorry for the frustr

...
Status Needs More Info

Votes

Translate
Adobe Employee , Feb 06, 2025 Feb 06, 2025

Hi @_nicdean 

Thanks for reporting this issue. We are aware of the issue and have a ticket open to investigate potential fixes. We will update this thread with any new information.

Cheers,

Theresa

Status Investigating

Votes

Translate
4 Comments
Adobe Employee ,
Feb 05, 2025 Feb 05, 2025

Copy link to clipboard

Copied

Hi @_nicdean,
Thanks for the post. I’m Kevin from support, a moderator here.

 

Since I'm not an expert in expressions, we may need the team or a specialist to reply.

 

In the meantime, may the team have more information?It oculd help them reproduce the error more easily.

 

If you have time, see the post, How do I write a bug report? to list the details that would be helpful for us to know in order to solve your problem.

 

I hope the community or the team will respond shortly. Sorry for the frustration.
 
Thanks,


Kevin

Kevin Monahan - Sr. Community & Engagement Strategist – Pro Video and Audio
Status Needs More Info

Votes

Translate

Report

Report
Contributor ,
Feb 05, 2025 Feb 05, 2025

Copy link to clipboard

Copied

Thanks @Kevin-Monahan . This quirk is easy to repro on any machine and documented in https://ae-expressions.docsforadobe.dev/text/style/#textstylesetjustification.

 

I chose to classify as a bug (not a feature idea) because the current implementation is unintuitive. It feels like an accidental oversight while building text style expressions.

Votes

Translate

Report

Report
Adobe Employee ,
Feb 05, 2025 Feb 05, 2025

Copy link to clipboard

Copied

OK, thanks. I hope a community member like @Dan Ebberts or the team might chime in. I'm sure we can get an answer for you in short order. Sorry for the wait and I appreciate your patience.

 

Thank You,
Kevin

 

Kevin Monahan - Sr. Community & Engagement Strategist – Pro Video and Audio

Votes

Translate

Report

Report
Adobe Employee ,
Feb 06, 2025 Feb 06, 2025

Copy link to clipboard

Copied

LATEST

Hi @_nicdean 

Thanks for reporting this issue. We are aware of the issue and have a ticket open to investigate potential fixes. We will update this thread with any new information.

Cheers,

Theresa

Status Investigating

Votes

Translate

Report

Report